Skip to content

Redact values#1971

Merged
chelojimenez merged 3 commits intomainfrom
redact-values
Apr 28, 2026
Merged

Redact values#1971
chelojimenez merged 3 commits intomainfrom
redact-values

Conversation

@chelojimenez
Copy link
Copy Markdown
Contributor

@chelojimenez chelojimenez commented Apr 28, 2026

Note

Low Risk
Low risk: output formatting now runs through a redaction pass to avoid leaking tokens; changes are confined to CLI serialization paths and add a targeted test for Authorization header masking.

Overview
CLI server probe and server doctor now redact sensitive fields (e.g., auth headers/tokens) before printing results or writing JSON artifacts, including when RPC logs are attached.

Adds a regression test ensuring server doctor JSON payloads mask probe Authorization headers while preserving non-sensitive headers.

Reviewed by Cursor Bugbot for commit 79a93f4. Bugbot is set up for automated code reviews on this repo. Configure here.

@chelojimenez
Copy link
Copy Markdown
Contributor Author

chelojimenez commented Apr 28, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Apr 28, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bd84651e-f471-4461-9b3e-e3579776a470

📥 Commits

Reviewing files that changed from the base of the PR and between 09f8f9e and bb2829f.

📒 Files selected for processing (1)
  • cli/src/commands/server.ts

Walkthrough

The server commands now redact sensitive fields before output and persistence. The server probe forwards a redacted result into writeResult. The server doctor builds a rawPayload (RPC-attached or raw result), computes a jsonPayload by applying redactSensitiveValue, and uses that redacted payload for human-readable output and debug artifacts. A new unit test asserts that Authorization headers inside probe.transport.attempts[].request.headers are replaced with "[REDACTED]" while non-sensitive headers (e.g., Accept) remain intact.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Internal preview

Preview URL will appear in Railway after the deploy finishes.
Deployed commit: f1da357
PR head commit: 79a93f4
Backend target: staging fallback.
Access is employee-only in non-production environments.

@dosubot dosubot Bot removed the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 28, 2026
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Apr 28, 2026
@chelojimenez chelojimenez merged commit 5f659aa into main Apr 28, 2026
4 of 7 checks passed
@chelojimenez chelojimenez deleted the redact-values branch April 28, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant