Skip to content

Conversation

@arianbeh
Copy link

Fixes #807.

This patch replaces a raw http.ListenAndServe() call in
internal/network_test_utils.go with an explicit http.Server
configured with ReadTimeout, WriteTimeout, and IdleTimeout to satisfy
gosec rule G114 ("Use of net/http serve function without timeouts").

This code is used only in test helpers and does not affect runtime
behavior.

Validated locally with:

  • make lint
  • go test ./internal/...

Signed-off-by: Aryan Behmardi

Signed-off-by: Aryan Behmardi <arianbehmard@gmail.com>
@arianbeh arianbeh requested a review from a team as a code owner December 10, 2025 18:50
Signed-off-by: Aryan Behmardi <arianbehmard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve G114 use of net/http serve function that has no support for setting timeouts

2 participants