Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

MercuryTechnologies/mercury-cli
main @ 25cc254
3
Fixes
0
CVEs
HIGH
Peak severity
100.0%
Coverage
Highlights
Information Disclosure: 2 prior fixes. Scrutinize any change in this area.
internal/debugmiddleware/debug_middleware.go: most-fixed (2 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Information Disclosure: Debug middleware dumps HTTP responses without redacting sensitive headers, leaking credentials and cookies into logs. Two fixes were needed, indicating incomplete coverage that could regress with new headers or response paths.
Information Disclosure: Initial fix redacted sensitive headers but missed API keys and cookies; the follow-up added api-key, x-api-key, cookie, set-cookie. This shows the redaction list must be continuously maintained.
Terminal Escape Injection: JSON string values rendered to terminal without stripping control bytes allow terminal escape injection, potentially executing arbitrary terminal commands or spoofing output.