Expand description
The push scan: what an agent’s git push is refused for.
A credential is what a person’s agent is most likely to leak, and no repository, public or private, is a place for one. The scan looks at the lines a push adds (never at what it removes or leaves alone) for the formats whose shape is certain, and says where and what kind, never the text itself: the refusal would otherwise put the credential in the agent’s transcript.
Structs§
- Finding
- One credential-shaped string a push would add.
Constants§
- MAX_
FINDINGS 🔒 - The most findings reported; a push with more is refused all the same.
Functions§
- combined_
new_ 🔒range (start, count)of the result side of a combined hunk header,@@@ -a,b -c,d +e,f @@@; a missing count is 1.- credential_
in - A category if
textholds a credential of a format whose shape is certain. - has_run 🔒
- Whether
textholdsprefixfollowed by at leastmincharacters ofclass, the prefix not being the tail of a longer word (risk-...is not a key). - hunk_
counts 🔒 (start, count)of the old and the new side of a hunk header’s-a[,b] +c[,d] @@; a missing count is 1.- is_
alnum 🔒 - is_
key_ 🔒char - refusal_
text - What a refusal says: where and what, never the text.
- scan_
diff - The credentials in the lines a unified diff adds (
git log -p -U0,git diff -U0).