Repository navigation
fix(gate): two hard rules stop firing on non-credentials; status names a stale copy (0.2.18) - #147
Merged
Merged
Conversation
…s a stale copy (0.2.18) credential-on-the-command-line read the wide assigned-secret redaction kind, which is case-insensitive and allows spaces round the equals sign, so source code in an inline script was a credential and a deny in seatbelt (#87). redact() now reports shell-assigned-secret beside it when the assignment is written as a shell, a long flag, a query string or a quoted form value writes one, and the bundled entry names that kind. Redacted text is unchanged. describeSensitivity no longer labels .env.example, .env.sample, .env.template or .env.tpl as environment_file (#98). bouncer status compares a policy's hard rules with the bundled ones by name and prints what differs and what is missing (#126). A copied policy keeps the rule it was copied with, and nothing said so. Six holdout cases, refrozen. Bench against the base bundle with the base policy: paired median +0.1 ms judged, +0.1 ms hard-rule, 30 pairs. Closes #87, closes #98, closes #126. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ough 0.2.18 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three of the four noisy hard rules. In
seatbelteach false positive here was a denied call. #122's remaining part (git branch -Dafter a squash merge) is not in this PR: it needs the hook to ask git a question, which is a design change to rules that are string operations today.What changed
#87:
credential-on-the-command-lineon source code. The entry read theassigned-secretredaction kind, which is as wide as redaction should be: case-insensitive, spaces allowed round the=.redact()now also reportsshell-assigned-secretwhen the same match has no space round the=and its name is all capitals, or follows--,?,&or an opening quote. The bundled entry names the new kind. Redacted text is byte-for-byte what it was.#98: templates labelled
environment_file..env.example,.env.sample,.env.templateand.env.tplcarry no label. The suffix is read last, so.env.example.localis still an environment file.#126: a copied policy keeps a superseded rule.
bouncer statuscompares hard rules with the bundled ones by name and prints each predicate that differs and each bundled entry the policy lacks. It runs only when asked, and says "differs", since it cannot tell an old copy from a deliberate edit.The built hook, seatbelt, mock backend
const tokens = list("tokens");node -e 'const password = readLine();'python3 -c 'c = Client(api_key=settings_value)'API_KEY=… ./run.sh,docker run -e DB_PASSWORD=…,--password=…,?api_key=…,-d 'token=…'cat deploy/.env.exampledeploy/.env.tpl, thengrepcat .env,cat deploy/.env.localWhat it gives up
A lowercase assignment in a bare argument (
password=hunter2 ./deploy.sh,curl -d token=value) no longer matches the hard rule and is judged by thesecretsquestion. That is the price of not readinglogin(password=value)as a credential. The changelog says so.For an existing install with a copied policy
The #87 fix does not reach a copy.
bouncer statuson this machine's~/.bouncer/bouncer.yamlprints:Checks
FROZENupdated in the same commit. Four of them are judged cases the mock asks on by keyword; the test's friction list names them and says why.bench --againstthe base bundle with--against-policythe base policy: paired median +0.1 ms judged, +0.1 ms hard-rule, 30 pairs.CACHE_VERSIONis 8 on both sides.Closes #87, closes #98, closes #126.
🤖 Generated with Claude Code