Skip to content

Commit 076a4c7

Browse files
haasonsaasclaude
andcommitted
fix: suppress gosec false positives (G101 dev DSN, G704 config-only URL)
G101 flags the default DSN which is a dev placeholder overridden by env vars in production. G704 flags SSRF on a Vouch client that only calls URLs from validated config, not user input. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 92e97fc commit 076a4c7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/vouch/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (c *Client) buildRequest(ctx context.Context, deviceID string) (*http.Reque
215215
func (c *Client) executeWithRetry(ctx context.Context, req *http.Request) (*http.Response, error) {
216216
var resp *http.Response
217217
retryErr := retry.Do(ctx, c.config.RetryConfig, func() error {
218-
r, err := c.httpClient.Do(req)
218+
r, err := c.httpClient.Do(req) // #nosec G704 -- URL is from validated config, not user input
219219
if err != nil {
220220
return err
221221
}

services/inventory/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
const (
1313
defaultBindAddr = ":8080"
14-
defaultDSN = "postgres://postgres:postgres@postgres:5432/keep?sslmode=disable"
14+
defaultDSN = "postgres://postgres:postgres@postgres:5432/keep?sslmode=disable" // #nosec G101 -- dev-only default, overridden by env var in production
1515
defaultTLSCert = ""
1616
defaultTLSKey = ""
1717
defaultAuthzJWKS = ""

0 commit comments

Comments
 (0)