Repository navigation
fix(telemetry): keep mysql's -P port and redact the real -p password (fixes #815) - #819
Conversation
The mysql credential rule's i flag let the attached port form -P3306 match as if it were -p, so the port was redacted as a secret and a real password later in the same command survived into OTLP export. Make the rule case-sensitive like the sshpass rule (mysql is the same shape: -p is the password, -P is the port). Fixes CopilotKit#815 Signed-off-by: Charan Rathore <180254320+charan-rathore@users.noreply.github.com>
Mixed -P3306/-phunter2 command keeps the port and redacts the password; lowercase attached form and mysqldump pinned alongside. Signed-off-by: Charan Rathore <180254320+charan-rathore@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
davidmckayv
left a comment
There was a problem hiding this comment.
Checked the rule before and after on real mysql commands: the attached port now survives and the password after it is redacted, with every other form unchanged. Thanks for the fix.
The mysql credential rule in server/src/telemetry/scrub.ts kept the
iflag, so the attached port form-P3306matched as if it were-p: the port got redacted as a secret and a real password later in the same command survived into OTLP export (gh-815).Make the rule case-sensitive like the sibling sshpass rule:
-pis mysql's password,-Pis its port. Pinned in server/tests/enterprise-controls.test.ts:mysql -h db -P3306 -phunter2 app->mysql -h db -P3306 -p[REDACTED] app-p3306still redacts,mysqldump -phunter2 dbunchanged, bare/space forms untouched.RED before (port redacted,
-phunter2survived), GREEN after; both scrub suites 52/52.