Telemetry scrubber: case-insensitive mysql rule redacts an attached port (-P3306) and lets a real password survive in the same command
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- mysql, typescript
Research direction
Start in server/src/telemetry/scrub.ts and inspect the mysql credential rule alongside its sibling sshpass rule. Add coverage for the mixed -P3306 and -phunter2 command, lowercase attached -p3306, and mysql -p database; confirm the port and database name remain while actual credentials are redacted.
Written by the indexing model from the issue text.
Description
Summary
In server/src/telemetry/scrub.ts, the tool-anchored mysql credential rule keeps the i flag:
[
/(\bmysql(?:dump)?\b(?:[^|;&\\\r\n]|\\[\s\S])*?(?:[ \t]|\\\r?\n)-p)("[^"]*"|'[^']*'|[^\s'"-]\S*)/gi,
(_m, lead) => `${lead}${REDACTED}`,
],
i makes (?:[ \t])-p match the uppercase attached port form -P3306 (mysql's syntax for --port attached to a single dash). Because the g continuation after the first match never sees another \bmysql\b anchor, a real password later in the same command line is not redacted.
Repro (upstream tree at e8bb2736)
scrubCommand("mysql -h db -P3306 -phunter2 app")
→ "mysql -h db -P[REDACTED] -phunter2 app"
The port is redacted as if it were a secret, and the actual password -phunter2 survives into OTLP export — contrary to the module header's stated priority ("a secret that survived costs a rotation") and to the sibling sshpass rule, which is deliberately case-sensitive with the comment "Case matters here: -P is sshpass's prompt".
Suggested fix
Drop i from the mysql rule (/gi → /g), matching the sshpass rule's convention:
mysql -h db -P3306 -phunter2 app→mysql -h db -P3306 -p[REDACTED] app- lowercase
-p3306(attached password form) is still redacted mysqldump -phunter2 dbunchanged
Tests worth pinning: the mixed -P/-p command above, the lowercase attached form, and mysql -p database (space form = interactive prompt, database name must not be redacted).
Context: we hit this in a downstream deployment while extending coverage for SSHPASS=… sshpass -e and docker <global-options> login -p …; the case-sensitivity divergence was found by a full-scope review pass. Happy to send a PR if wanted.
- Dominant language
- TypeScript
- Stars
- 6.6k
- Forks
- 914
- Avg merge
- 22h 44m
- Merged PRs (30d)
- 137
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No 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 CopilotKit/OpenBot
-
Wrong key location at startupPossibly taken @charan-rathore claimed this 3 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100
CopilotKit/OpenBot#800 ·
Maintainers usually reply within 1 day
-
setup-learning.ts fails on Windows with "spawn npx.cmd EINVAL"Possibly taken @Caldas claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
CopilotKit/OpenBot#792 ·
Maintainers usually reply within 1 day
-
Remote AG-UI Bots can't use the browser in chat: `computer_*` calls refused as "unavailable for this headless turn"Possibly taken @charan-rathore claimed this 3 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
CopilotKit/OpenBot#804 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 Over a week Newbie friendliness 22/100
CopilotKit/OpenBot#786 ·
Maintainers usually reply within 1 day
-
server/tests leaks database connections: 55 files open a pool and never close itPossibly taken @adamsiwiec1 claimed this 5 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 70/100
CopilotKit/OpenBot#785 ·
Maintainers usually reply within 1 day
All issues in CopilotKit/OpenBot
Similar issues
-
check:passed streams:edit
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area:mcp bug has repro platform:vscode regression
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anthropics/claude-code#103970 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextOpenbug javascript
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day