Repository navigation
Redactor hides key=value secrets that follow a slash, so /cso history stops printing them (GST-3297) - #4571
Merged
Conversation
… stops printing them (GST-3297) The shared redactor only recognized password=, api_key= or token= at the start of a line, so the same value after a slash (a symlink target ../password=..., cfg/api_key=..., a diff header path) came back raw, and gstack-cso history printed it from retained Git history. Review packets, telemetry and ship logs use the same redactor. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…path after a slash The regex-literal exemption now needs regex syntax before the closing slash, so values such as a Markdown link target or a YAML path keep their secret redacted. Review-Finding: p1/red-team#1 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 20, 2026
- Two /ship approval records stop needing workarounds. (#4549) - For contributors: the paid auto-decide check counts a start step that ran while the skill loaded. (#4543) - The destructive-command check closes three ways past its disk-wipe and force-push blocks. (#4534) - A green CI run still counts when the repository's artifact storage is full. (#4536) - `/cso` now audits repositories that track symlinks. (#4567) - A doc-sync eval stops failing when the audit child drops one field from its result line. (#4555) - The browse daemon no longer picks port 10080, which Chromium refuses to open. (#4554) - Opted-in telemetry now says why a skill run ended, which coding agent and model family ran it, and whether an upgrade worked. (#4542) - A preregistration with only its write-up and plain data now gets the write-up review: one reviewer, one round. (#4544) - When owner rulings don't clear a stopped review, `gstack-review-read` now says which findings are left. (#4553) - The prompt-routing hook now names your installed bug-fix skill on bug reports, alone, and never puts /verify ahead of it. (#4539) - Owner rulings now close a stopped review whose findings were logged in a findings file. (#4568) - /ship can finish after the owner accepts a stopped review's findings as open notes. (#4552) - /ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277). (#4565) - The prompt-routing hook no longer acts on words inside backticks. (#4566) - In Claude Code, a gstack skill's start step now runs when the skill loads, so the model can't skip it. (#4509) - gstack's telemetry backend only accepts writes through its own validated endpoint, and the community dashboard now counts real use. (#4537) - gstack now says what it's adding before it adds a background job or a browser extension. (#4538) - For contributors: every flaky pass in Free Tests is now recorded. (#4572) - For contributors: Free Tests on pull requests starts its test shards one round of small jobs sooner. (#4570) - Secret values written as `name=value` at the end of a path are now hidden. (#4571) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.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.
gstack's redactor now hides
password=…,api_key=…andtoken=…values that come after a/, such as a symlink target../password=…,cfg/api_key=…or a Markdown link to such a path.Why:
/cso's retained Git history went through this redactor and kept those values, sogstack-cso historyprinted them; review packets, telemetry and ship logs use the same redactor.Nothing to do.
What changed
env.kvinlib/redact-patterns.tsmay start a name right after a/, in addition to the line start, a diff marker or a comment marker. The name class excludes/, so each attempt stops at the next separator and the scan stays linear.isCommentText) now applies only when a comment marker really precedes the name, soa/token=…is checked like a line-start match. A comment marker that opens a quoted string still counts as a comment.isRegexLiteralBody: a/after an operator or opening bracket starts a regex literal only when the text before the closing/holds regex syntax (an escape, a character class, a group or a{n,m}quantifier). Code such ascontent.match(/authtoken:\s*(.+)/)stays clean, while a Markdown link or a YAML value whose path holds a secret still reports.Every exemption that existed before is unchanged for the matches it already handled; this PR adds a catch and narrows only the new over-catches.
Why
gstack-cso historyprinted key=value secrets that sat after a slash in a symlink target, a link that only exists in history, or ordinary file content. Keeping secrets out of what gstack prints and stores is the point of the shared redactor.Blast radius
Every caller of the shared redactor:
/csohistory and snapshots, review packets, telemetry, ship logs and the pre-push credential scan. A scan of every tracked file in this repository finds the same 212env.kvmatches before and after the review fix, so the repository's own checks are unaffected.Test Coverage
Test Coverage Audit: 8 new code paths, 7 covered before review (88% any test, 88% value-weighted). The one gap (a regex literal after
return) got a test row in the review fix. Tests: 1838 → 1839 (+1 new file).Pre-Landing Review
Pre-Landing Review: 4 issues — 1 auto-fixed, 0 asked, 0 deferred, 2 noted, 1 ruled note
Gate edits: none detected (1 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
return /…/control.Exploratory QA
Functional smoke on
bin/gstack-redact(7 captures, synthetic values): a link-target secret reports; a Markdown-link secret after(reported nothing before the fix (captures 002 and 003) and reports after it (005); a regex literal afterreturnstays clean (004, 007). Verdict: pass on current inputs.Scope Drift
Scope Check: CLEAN. Intent: hide key=value secrets that follow a slash. Delivered: the redactor change, its tests and a release note.
Review notes
Below the blocking floor or ruled as notes; recorded here and not fixed in this PR.
lib/redact-patterns.ts:1228):isRegexLiteralBodytakes the first/as the closing slash, so a regex whose character class holds/(/token=[A-Za-z0-9/]+/g) loses the exemption and is reported and redacted. This over-redacts a regex literal and loses no secret. Ruled on 2026-11-20 by the maintainers: over-redaction of a regex literal, not secret loss, so it is below the blocking floor; this PR ships at 060832a and the fix goes to the small-fix batch (the exact ruling is in the Agent notes). The fix is saved as a patch for that batch: handoffs/GSTA-675/outside-voice-1-fix.patch.lib/redact-patterns.ts:1227): the same delimiter rule, and regex literals that use only.,*,?or$(/AUTH_TOKEN=.*$/), now report. Over-reports, loses nothing; no repository file is affected.lib/redact-patterns.ts:1227): a path value after an opener whose text before the next/holds a backslash, group, class or{n}stays exempt, the same as before this change. Real tokens rarely contain those characters.Verification Results
No plan checks (bug fix, plan exempt). Automatic QA above.
TODOS
No TODOS.md items completed or deferred.
Documentation
Status: current. The documentation already matches this release, so no edits were needed.
Scope: base a529769 to head 060832a, 3 commits, 3 files (
lib/redact-patterns.ts,test/redact-kv-after-slash.test.ts,changelog.d/redactor-catches-secrets-after-a-slash.md). Nothing staged, unstaged or untracked.Documentation health:
CLAUDE.md(Redaction guard): Current. It describes the engine in general terms, which this change does not affect.docs/CONTRIBUTOR_REFERENCE.md(Redaction guard): Current. It lists tiers and calibration; no claim about whereenv.kvmatches.cso/SKILL.md.tmpl,cso/sections/audit-phases.md.tmpl: Current. They say history is redacted before it is shown, and this change makes that claim more accurate.changelog.d/redactor-catches-secrets-after-a-slash.md: Accurate against the code (left to the parent).Coverage debt: the new behavior is that a
name=valuesecret after a/is now redacted, while regex literals are exempt. It is documented only in the changelog fragment and code comments, with no reference or how-to doc. It is internal engine behavior, so this is low priority.Diagram drift: none.
Tests
bun run test: carried from CI run 44806444033/1 at tree 42fbe49c2050 (1720 files).test/redact-kv-after-slash.test.ts(written first; its four review-fix rows failed before the fix).Agent notes
Ruled note: lib/redact-patterns.ts:1228:outside-voice at 060832a ruled by Captain GStack Minder (GSTA-36) (relayed from GSTA-675:2026-11-20T19:57:40.761Z) at 2026-11-20T19:57:41.835Z: over-redaction of a regex literal with a slash in a character class, not secret loss; fix goes to the small-fix batch (approval a-0c5968b9a89a)
Lane GSTA-675 (GST-3297). Captain GStack Minder (GSTA-36) ruled p2/outside-voice#1 a shipped note at 060832a (approval a-0c5968b9a89a).
Step 13: the release note keeps one prose-lint style note (mid-sentence colon); a rewording commit was dropped so the reviewed, CI-green head 060832a ships unchanged.
Approvals
Approved: yes (record r-f03594882b02). The full approval record stays private.
Plan: exempt: bug fix with a failing-first test (kind fix)
Plan check: exempt bug fix