Repository navigation
fix(security): mask credentials, not sentences that mention them - #392
Merged
Merged
Conversation
The keyword rule matched any word of ten characters or more following `secret`, `token`, `password`, `bearer` or `api_key`. In prose that word is usually English, so the commit subject "unify secret resolution and manage Vault lease lifecycle" was rewritten to "unify <masked-token> and manage Vault lease lifecycle". That is not confined to a terminal. The changelog is masked on its way out and the release description is written from the changelog, so the corruption reached the published notes for v0.2.21 -- "Integrated client-side <masked-token> and capacity-aware dispatch" -- where it reads as though a credential had been caught rather than a phrase mangled. "secret storage" survived only because "storage" is seven characters, which is the kind of accident that makes the rule look like it works. A credential is distinguishable from a word: it carries a digit, a capital, or a separator, or it is longer than any English word. The value is now inspected instead of assumed. `Bearer ghp_A1b2...`, `token abc123def456ghi789` and a twenty-six character opaque string are still masked; "secret resolution", "token counting" and "password management policy" are left alone. The specific rules -- AWS keys, GitHub tokens, private key blocks -- are untouched, and a test covers one of them to confirm narrowing the general rule did not weaken them. Found while compiling the v0.2.22 changelog, where the same subject came through mangled again.
dan-petty
added a commit
that referenced
this pull request
Sep 22, 2026
…397) The published v0.2.22 release description reads "Secret <masked-token> & Vault Lease Lifecycle" and "Prompt Caching & Token <masked-token>". CHANGELOG.md holds the correct text -- "Secret Resolution", "Token Governance" -- and the masker corrupted it on the way out. #392 narrowed this rule by requiring the value after a credential keyword to carry a digit, a capital, or a separator. A capital was the wrong signal. Every ordinary word is capitalised at the start of a sentence or in a heading, and a changelog heading is exactly where this rule gets applied. I tested that fix against lowercase prose only -- "unify secret resolution", "token counting" -- so the case that was actually going to break it was never exercised. A leading capital marks a word. An internal capital, a digit, a separator, or a length no English word reaches marks a token. `Bearer ghp_A1b2...`, `token aBcDeFgHiJkL` and a twenty-six character opaque string are still masked; "Secret Resolution", "Token Governance" and "Password Management Policy" are left alone. The v0.2.22 release description is republished from the corrected changelog separately.
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.
The keyword rule matched any word of ten characters or more following
secret,token,password,bearerorapi_key. In prose that word is usually English, so the commit subject "unify secret resolution and manage Vault lease lifecycle" was rewritten to "unify and manage Vault lease lifecycle".That is not confined to a terminal. The changelog is masked on its way out and the release description is written from the changelog, so the corruption reached the published notes for v0.2.21 -- "Integrated client-side and capacity-aware dispatch" -- where it reads as though a credential had been caught rather than a phrase mangled. "secret storage" survived only because "storage" is seven characters, which is the kind of accident that makes the rule look like it works.
A credential is distinguishable from a word: it carries a digit, a capital, or a separator, or it is longer than any English word. The value is now inspected instead of assumed.
Bearer ghp_A1b2...,token abc123def456ghi789and a twenty-six character opaque string are still masked; "secret resolution", "token counting" and "password management policy" are left alone. The specific rules -- AWS keys, GitHub tokens, private key blocks -- are untouched, and a test covers one of them to confirm narrowing the general rule did not weaken them.Found while compiling the v0.2.22 changelog, where the same subject came through mangled again.