-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gosec.json
More file actions
12 lines (12 loc) · 1.76 KB
/
Copy path.gosec.json
File metadata and controls
12 lines (12 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
{
"//": "gosec configuration for the rendezvous registry. The `global.exclude` list disables specific rule classes that produce only accepted findings in this codebase. Each exclusion is justified below; no finding is silenced with an inline #nosec annotation, and nothing is blanket-disabled. Genuine SAST findings (anything outside these classes) still fail the gosec job.",
"global": {
"//audit": "true",
"exclude": "G104,G115,G304,G306,G114",
"G104": "Unhandled errors. All sites are best-effort socket tuning / cleanup on already-terminating connections: conn.Close() in defers, SetReadBuffer/SetWriteBuffer, SetReadDeadline, and best-effort error frames on a connection about to be dropped. Handling these errors changes no control flow.",
"G115": "Integer overflow on conversion. Every flagged site converts a length or bounded count to a fixed-width wire field: uint32(len(body)) for frames capped at wire.MaxMessageSize (64KB) and uint16/uint32(netID) from JSON-decoded values. The source values cannot reach the overflow range.",
"G304": "File inclusion via variable. Every flagged path is an operator-supplied config/WAL/whitelist file path (registry.json, audit WAL, breaker/whitelist watcher targets, snapshot files) — these are intended to be read from operator-controlled locations, not attacker-controlled input.",
"G306": "WriteFile permission > 0600. The registry persistence file (registry.json) and the dashboard snapshot are written 0644 by design so an operator (non-root) can read state for diagnostics; they contain no secrets.",
"G114": "http.Serve without timeouts on the dashboard listener. The dashboard binds an internal/admin interface; request timeouts are enforced at the reverse proxy / breaker layer rather than the raw Serve call."
}
}