git-gate: restrict gitleaks inline suppression to supervised exceptions #208
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
# gitleaks:allowinline suppression is currently enabled in git-gate (the default gitleaks behaviour). This was useful during early development — test fixtures that deliberately construct credential-shaped strings (e.g."npm_" + "A" * 36) would otherwise require manual exception entries for every pattern we add.However, the same mechanism means any agent with write access to the repo could silence a real-secret finding by appending
# gitleaks:allowto the offending line. That bypasses git-gate entirely and is not detectable after the fact from the commit diff alone.What should change
Add a supervisor control flow for gitleaks findings:
# gitleaks:allowannotation on a finding, route it to the supervisor rather than auto-allowing it.tests/or similar and the value is clearly a dummy credential.This keeps
# gitleaks:allowusable as a developer convenience while closing the agent-bypass path — the agent can write the annotation, but a human still has to confirm it before it lands.Scope
# gitleaks:allowremains enabled as-is; the risk is accepted for the current development phase.References
mcp__supervise__egress-block,mcp__supervise__capability-block