Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter: gosec, Rule: G112 - Potential slowloris attack. Should we enable it? #12899

Closed
zak-pawel opened this issue Mar 18, 2023 · 2 comments · Fixed by #12986
Closed

Linter: gosec, Rule: G112 - Potential slowloris attack. Should we enable it? #12899

zak-pawel opened this issue Mar 18, 2023 · 2 comments · Fixed by #12986
Assignees
Labels

Comments

@zak-pawel
Copy link
Collaborator

Use Case

This issue starts discussion about enabling:

Rule is mapped to CWE-400: Uncontrolled Resource Consumption.

Expected behavior

Decision if rule should be enabled or not.

Actual behavior

For this rule following findings were found in current code:

plugins/inputs/influxdb_v2_listener/influxdb_v2_listener.go:132:13  gosec  G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server
plugins/inputs/webhooks/webhooks.go:91:12                           gosec  G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server
plugins/inputs/zipkin/zipkin.go:93:14                               gosec  G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server
plugins/outputs/prometheus_client/prometheus_client.go:144:14       gosec  G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server

Additional info

For this rule no additional configuration can be provided.

@zak-pawel zak-pawel added feature request Requests for new plugin and for new features to existing plugins needs design review labels Mar 18, 2023
@powersj
Copy link
Contributor

powersj commented Mar 21, 2023

+1 seems wise to set

@zak-pawel zak-pawel added linter and removed feature request Requests for new plugin and for new features to existing plugins needs design review labels Mar 22, 2023
@zak-pawel
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants