You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(security): a credential keyword at the end of a line no longer masks the first word of the next line #2450
redact_text (src/devops_cli/security/sanitizer.py) masks a value that follows a credential keyword with the pattern \b(?:token|bearer|secret|password|api_key)\s+([A-Za-z0-9_\-.]{10,})\b. The separator \s+ also matches a line break. So when a line ends with one of the keywords, the first word of the next line becomes its value, and _looks_like_a_credential takes any word with a dot, an underscore or a digit as a credential and masks it.
A terminal transcript hits this when a command line ends with a config key whose name ends in the keyword, and the output line starts with that key. On 2026-10-28, devops roadmap intake --title ... --body-file ... --confirm refused a bug report with such a transcript: "The candidate's body holds what looks like a secret, so intake sent it to no model and filed nothing." The body held no secret. The same rule rewrites the text of logs, published descriptions and every other caller of redact_text.
Reproduction Steps
Pass redact_text two lines: the first ends with the keyword (for example a devops config set command line for a key whose name ends in that keyword), and the second starts with a dotted word of 10 or more characters, followed by prose.
The second line's first word becomes <masked-token>.
Expected vs Actual Behavior
Expected: a keyword and its value sit on one line, so a line break ends the match, and the two lines come back unchanged. A one-line pair such as the keyword, one space and an opaque 24-character value is still masked.
Actual: the first word of the second line is masked, and intake refuses the body.
Use [ \t]+ in place of \s+ between the keyword and its value, in the data and the code pattern sets. Add a test for the two-line case beside the existing one-line cases, which keep their results.
Existing Tool Considered
The fix is one character class in an existing pattern of Python's re. Nothing is built.
Activity
dan-petty commentedon Oct 28, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
A bug in the security sanitizer that over-masks non-credential text.It blocks legitimate bug reports and corrupts logs, but does not expose secrets.It unblocks intake and prevents corruption of logs and published text, but does not fix a leak.The fix is one character class change in an existing regex plus one test case.Both fix regex patterns in the same sanitizer module, but #116 adds word boundaries to key patterns while this changes the keyword-to-value separator to exclude line breaks.fix(security): a credential keyword at the end of a line no longer ma…
fix(security): a credential value is masked also when the next line s…