redaction: credential patterns with a trailing word boundary miss a token followed by an underscore
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- security
Research direction
Start in packages/server/src/redaction.js at API_KEY_PATTERNS, then read the existing redaction tests and bounded-time tests. Add table coverage for each affected pattern with synthetic tokens between __ separators, at string boundaries, and beside letters and digits. Done means those cases redact correctly without ordinary-identifier false positives and the existing redaction tests pass.
Written by the indexing model from the issue text.
Description
Context
Identified during review of PR #9127 (S4 of #9112, closes #9119). This is hardening in the same scope as #8416 and #9109: the text reaches only the session's authorised clients and local logs. All examples use synthetic values.
Location: packages/server/src/redaction.js (API_KEY_PATTERNS)
Description
Several credential patterns end with a trailing word boundary. For example, the classic GitHub token pattern is ghp_ followed by 36 alphanumerics and \b. An underscore is a word character, so a token immediately followed by _ does not match and is not redacted.
The realistic case is a credential embedded in an identifier, such as an MCP tool name of the shape mcp__<token>__tool. Tool names reach clients in permission prompts, and since #9127 they reach the principal pending-permission snapshot. #9127 redacts tool names whole, but redaction cannot remove what the pattern does not match.
#9109 covers property names and clip-before-redact consumers. It does not cover this boundary case.
Acceptance Criteria
- Every prefix-anchored credential pattern with a trailing
\balso matches when the token is followed by_(or by another identifier character), without new false positives on ordinary identifiers. - A table test covers each such pattern with a synthetic token between
__separators, at the start and end of a string, and next to letters and digits. - Existing redaction tests still pass, including those for bounded-time guarantees.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 1
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 333
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from blamechris/chroxy
-
from-review tech-debt testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
blamechris/chroxy#9520 ·
Maintainers usually reply within 1 day
-
priority: low server
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
blamechris/chroxy#9340 ·
Maintainers usually reply within 1 day
-
documentation from-review
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
blamechris/chroxy#9237 ·
Maintainers usually reply within 1 day
-
agent-control client: notify() docstring should say the outbound gate applies only in principal modeOpenenhancement from-review
Difficulty 1/5 Under an hour Newbie friendliness 80/100
blamechris/chroxy#9227 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
blamechris/chroxy#9108 ·
Maintainers usually reply within 1 day
All issues in blamechris/chroxy
Similar issues
-
Documentation pleaseOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
Java Edition Tests
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JSPrismarine/JSPrismarine#4178 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Trac-Systems/main_settlement_bus#1278 ·
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apidly-ltd/apidly-mcp#5 ·