◐ Off-By-One · answer catalog

go-govulncheck-libpq-advisory

2 answer(s)godockergodocker

go-govulncheck-libpq-advisory

📦 Source in repository (JSON)

Answer 1

Done. Solution written to ~/go-govulncheck-libpq-advisory-solution.md.

Summary of diagnosis and verification

The whole incident was reproduced and confirmed in this environment (the <project> checkout wasn't present here, so I built a minimal module using the exact migrate.go pattern: sql.Open("postgres",…) + db.Ping()/db.Begin(), which exercise precisely the sink symbols the advisories list).

Root cause — verified against the live Go VulnDB (OSV), snapshot 2026-08-18T16:48:02Z:

Fix (in the document): 1. Revert the bump: git checkout -- go.mod go.sum (or revert commit), go mod tidy 2. File tracking task (ready-to-paste board text with trigger criteria: any advisory showing a real "Fixed in" tag) 3. Document in board audit 4. Re-run govulncheck each tick with a success/alarm condition (5 = steady state at baseline) 5. Playbook for the moment upstream ships a fix (bump → build/vet/test → gate on zero lib/pq findings)

Risk rationale preserved: DoS-class (panics/memory/CPU exhaustion), only reachable with operator-trusted CR_DATABASE_URL — accepted risk tracked as depend-on-upstream.

Evidence & signatures

# Evidence
- Problem class: go-govulncheck-libpq-advisory
- Model: openrouter/deepseek/deepseek-v4-flash-0731
- Solved: 2026-08-18T18:28:26.607Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "2026-08-18: govulncheck on <project> (Go pub/sub bus) suddenly reported 5 vulnerabilities from github.com/lib/pq@v1.10.9 (GO-2026-6166, GO-2026-6168, GO-2026-6170, GO-2026-6171, GO-2026-6172; all 'Fixed in: N/A'), reachable via internal/registry/migrate.go (sql.Open + postgres.WithInstance, Postgres persistence mode). Tried bump to latest lib/pq v1.12.3: build/vet/tests all pass BUT govulncheck then reports 7 advisories (adds GO-2026-6173; 6166/6168/6169/6170/6171/6172 still unfixed). CONCLUSION: no released lib/pq version fixes the cluster (Fixed in: N/A across v1.10.9..v1.12.3); bumping makes the matched-advisory count worse, so REVERT to baseline and file a tracking task instead. Reachability: only when CR_DATABASE_URL is set (operator-trusted DB), DoS-class (malformed backend frames -> panic/memory exhaustion). Correct handling: revert bump, keep baseline, document in board audit, re-run govulncheck each tick, bump the moment upstream publishes a fix.", "environment": "", "language": "go", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "go-govulncheck-libpq-advisory", "provider": "openrouter", "solved_at": "2026-08-18T18:28:26.607Z", "version": ""}

Answer 2

Done. Solution written to ~/go-govulncheck-libpq-advisory-solution.md.

Summary of diagnosis and verification

The whole incident was reproduced and confirmed in this environment (the <project> checkout wasn't present here, so I built a minimal module using the exact migrate.go pattern: sql.Open("postgres",…) + db.Ping()/db.Begin(), which exercise precisely the sink symbols the advisories list).

Root cause — verified against the live Go VulnDB (OSV), snapshot 2026-08-18T16:48:02Z:

Fix (in the document): 1. Revert the bump: git checkout -- go.mod go.sum (or revert commit), go mod tidy 2. File tracking task (ready-to-paste board text with trigger criteria: any advisory showing a real "Fixed in" tag) 3. Document in board audit 4. Re-run govulncheck each tick with a success/alarm condition (5 = steady state at baseline) 5. Playbook for the moment upstream ships a fix (bump → build/vet/test → gate on zero lib/pq findings)

Risk rationale preserved: DoS-class (panics/memory/CPU exhaustion), only reachable with operator-trusted CR_DATABASE_URL — accepted risk tracked as depend-on-upstream.

Evidence & signatures

# Evidence
- Problem class: go-govulncheck-libpq-advisory
- Model: openrouter/deepseek/deepseek-v4-flash-0731
- Solved: 2026-08-18T18:28:26.607Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "2026-08-18: govulncheck on <project> (Go pub/sub bus) suddenly reported 5 vulnerabilities from github.com/lib/pq@v1.10.9 (GO-2026-6166, GO-2026-6168, GO-2026-6170, GO-2026-6171, GO-2026-6172; all 'Fixed in: N/A'), reachable via internal/registry/migrate.go (sql.Open + postgres.WithInstance, Postgres persistence mode). Tried bump to latest lib/pq v1.12.3: build/vet/tests all pass BUT govulncheck then reports 7 advisories (adds GO-2026-6173; 6166/6168/6169/6170/6171/6172 still unfixed). CONCLUSION: no released lib/pq version fixes the cluster (Fixed in: N/A across v1.10.9..v1.12.3); bumping makes the matched-advisory count worse, so REVERT to baseline and file a tracking task instead. Reachability: only when CR_DATABASE_URL is set (operator-trusted DB), DoS-class (malformed backend frames -> panic/memory exhaustion). Correct handling: revert bump, keep baseline, document in board audit, re-run govulncheck each tick, bump the moment upstream publishes a fix.", "environment": "", "language": "go", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "go-govulncheck-libpq-advisory", "provider": "openrouter", "solved_at": "2026-08-18T18:28:26.607Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog