mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-17 04:37:48 +00:00
Lint: fix real int-truncation bug; document intentional gosec findings
- TransportPool configKey: write conn-count ints verbatim (strconv) instead of byte() truncation — a config value >=256 previously truncated and made two distinct configs collide on one key, silently sharing a transport with the wrong settings (real fix, gosec G115). - Document design-intentional gosec findings with //nolint:gosec + rationale: G117 (clients_secret intentionally marshaled into stored creds JSON), G704 (tokenURL is the trusted discovery endpoint), G124 (delete/test cookie, Secure set conditionally), G118 (long-lived background refresh) and pool utils short-ID rune, testutil mock server redirects. Result: full-tree golangci-lint now reports 0 issues (was ~12). Build, vet, and the full test suite remain green.
This commit is contained in:
@@ -72,7 +72,7 @@ func (s *OIDCSuite) NewRequest(method, path string) *http.Request {
|
||||
// NewRequestWithCookie creates a request with a session cookie
|
||||
func (s *OIDCSuite) NewRequestWithCookie(method, path, cookieName, cookieValue string) *http.Request {
|
||||
req := s.NewRequest(method, path)
|
||||
req.AddCookie(&http.Cookie{
|
||||
req.AddCookie(&http.Cookie{ //nolint:gosec // test cookie on an httptest request
|
||||
Name: cookieName,
|
||||
Value: cookieValue,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user