hyperhive/hive-priv/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 462f353c10 fix(priv): scan for a secret-shaped RUN, not a whitespace-delimited word
argus caught a false negative in the shape rule, and it sits exactly in
the property the change is sold on -- "a new secret type is caught by
default".

`split_whitespace()` yields `"<token>,"` for a token with punctuation
glued to it, and the comma fails the alphabet check for the whole word,
so the line passes unredacted with the credential in it. `[<token>]`,
`"<token>"`, `(<token>)` and a no-whitespace-at-all blob all defeat it
the same way.

Whitespace is not what delimits a secret; the alphabet is. So scan the
line for a maximal run of >=32 alphabet characters and let punctuation
reset the counter. Simpler than the version it replaces, and it closes
the gap by construction rather than by enumerating the delimiters
someone might glue on next.

The existing tests all passed against the broken version because I wrote
them from the same mental model that produced the bug -- every fixture
had a space before the token. The new test carries the six shapes that
used to slip through.
2026-08-09 20:02:18 +02:00
..
main.rs fix(priv): scan for a secret-shaped RUN, not a whitespace-delimited word 2026-08-09 20:02:18 +02:00