git-gate: AKIA-shaped key passed gitleaks pre-receive (unverified) #541
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?
Observed while re-recording the demo (#540). Not independently verified — see Caveat.
What happened
The demo's probe 4 commits a synthetic AWS access key ID and pushes it through the git-gate, expecting gitleaks to reject the ref in
pre-receive. In the recorded run the agent reported:So the push was rejected — but because the upstream does not resolve, not because the credential was detected. The gate forwarded it.
The committed value was
AKIAQRJHK7N5ZPM2VXTL:AKIAfollowed by 16 uppercase alphanumerics, which is the shape gitleaks'aws-access-tokenrule is written to match.Why it matters
If gitleaks genuinely does not flag this, the git-gate's pre-receive scan is not catching a canonical credential shape, and a push carrying one would be forwarded to a reachable upstream. The demo only appeared to pass because
upstream.invalidfails DNS — the rejection had nothing to do with the secret.Caveat — what is NOT established
I could not reproduce this standalone. Running
gitleaks detectagainst the same string insidebot-bottle-gateway:latesttimed out at 3 minutes under bothcontainer runanddocker run, so I have no direct confirmation of gitleaks' behavior on this input.Plausible explanations not yet ruled out:
********, which may be its own output redaction, or may mean something masked it before the commit.gitleaks detect --no-gitvs the protect/pre-receive path scan different inputs.Repro sketch
Expected: rejected by the pre-receive hook citing a detected credential.
Observed:
no leaks found, forwarded upstream, rejected only on DNS failure.First step
Confirm or refute by running gitleaks against that literal string with whatever config the gate uses. If it does flag it standalone, the bug is in how the hook feeds the pushed ref to gitleaks rather than in the ruleset.