fix(diagnostics): redact URL userinfo credentials in the debug bundle - #10041
Conversation
`nemoclaw debug` redacts every collected artifact with `redactFull` alone. That mode has no URL-userinfo pattern, so a credential carried inside a URL — for example `HTTPS_PROXY=http://svc:password@proxy.corp:3128` — is written to the bundle and echoed to the terminal verbatim. The repository already applies URL redaction ahead of `redactFull` at its other full-replacement sinks: `src/lib/actions/sandbox/gateway-restart.ts` and `src/lib/policy/preset-scope-render.ts`. Reuse that order in `src/lib/diagnostics/debug.ts`. Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe redaction library adds ChangesURL-aware redaction
Coverage shard update
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🟡 Moderate · up to This change centralizes redaction of URL credentials across diagnostic outputs and adds focused coverage. The focused tests and hooks pass, but the required broad CI gate is still rerunning, so merge should wait for that check or explicit acceptance. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
PR Review Advisor — Blocking findings reportedAdvisor assessment: Blockers require maintainer review E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite for the commit under review. Recommended E2E: Manual-only E2E: Blockers
|
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
cv
left a comment
There was a problem hiding this comment.
Reviewed the complete diff at commit 224320b. The shared full redactor removes valid and malformed URL userinfo before applying existing secret-pattern redaction, and the affected diagnostic, gateway restart, and policy-rendering callers preserve their control-character and terminal escaping boundaries. Tests cover username/password userinfo, userinfo-only URLs, malformed URL fallback, the debug-bundle boundary, existing secret assignments, and credential-free URLs. The required repository checks and aggregate CLI checks pass. CodeQL and CodeRabbit pass, all commits are GitHub Verified, the PR body includes the contributor DCO declaration, and no review thread or correctness, security, product-scope, or documentation blocker remains.
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
Resolved the automated advisor blocker on the current revision.
Udaya Tejas remains the original contributor and PR author. The original signed contribution is unchanged; this commit only addresses the maintainer review finding. |
|
Maintainer security and merge-result review remains PASS after updating the branch from current main.
The fork workflows were held for maintainer vetting. I approved only the runs for this reviewed revision through the normal GitHub path; required checks are now running. Udaya Tejas remains credited as the original contributor and PR author. Carlos Villela's review and branch-update work remains visible in the PR history. |
apurvvkumaria
left a comment
There was a problem hiding this comment.
Approved after the current branch update, security review, merge-result tests, and compliance review.
Udaya Tejas remains the original contributor. Merge will wait for every required check to pass.
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
CI blocker remediationThe first CLI shard failed on both #10035 and #10041 because the current Commit Validation for the current revision:
Udaya Tejas remains the original author of the redaction fix. The shard mechanism being recalibrated was introduced in #9950 by Rebecca Sliter and Prekshi Vyas; their existing work and repository history remain intact. |
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
cv
left a comment
There was a problem hiding this comment.
Reviewed the complete current diff and latest merge commit at 8ba445e83876c5559324eb2ff93c8dd560bed4c1. The six-file product diff correctly centralizes URL-userinfo removal before full secret redaction, preserves the existing control-character and terminal-escaping boundaries, and keeps URL parsing cases with the shared redactor while the debug boundary covers one credential-bearing and one credential-free URL. The earlier Advisor test-ownership finding is resolved. The linked accepted issue establishes this security-fix scope; no new supported integration or product surface is introduced. The PR body includes DCO declarations, the DCO check passes, every PR commit has a valid GitHub signature, CodeRabbit reports no actionable comments, and the complete review-thread snapshot has no threads. I found no correctness, security, test-design, product-scope, or writing defect that needs a code change.
I am leaving a neutral review rather than inheriting the earlier approval because complete exact-head automation evidence is not available: the current Advisor specialists failed before analysis when inference configuration was skipped, and the current CI changes job failed before classification; its downstream checks were skipped. The separate growth guard also failed while reading the PR files with GitHub HTTP 403. Local validation could not run in this isolated worktree because dependencies are absent. These are automation/evidence gaps rather than concrete defects in this diff. Approval should wait for a complete exact-head Advisor result and successful required CI, or an explicit maintainer waiver.
Security review: PASSI reviewed exact commit FindingsNo security findings. Detailed analysis
Files reviewed
Exact-commit evidence
|
Documentation Writer Review Receipt
Files reviewed:
Documentation disposition: No source-page documentation change is required. Existing documentation describes the intended secret-redaction control and tells users to inspect diagnostics before sharing them. This change makes debug output conform to that existing contract. It adds no command, flag, configuration, workflow, or supported surface. The post-merge documentation workflow can record the shipped security correction. Changed-text review: The helper documentation, debug redaction comment, case labels, and test titles are accurate and behavior-specific. PR-text review: The corrected description now matches the six-file diff. It identifies the debug bundle and terminal output as the corrected behavior. It accurately describes gateway restart and policy rendering as unchanged consumers of the shared helper. The stale integration-shard claims are absent. Product and security scope: Issue #10040 records the exact debug-bundle credential leak and reproduction. A repository member classified it as security-sensitive. The diff remediates that bounded defect without requiring a product, business, or architecture decision. Attribution and compliance: Udaya Tejas remains the author of commit Exact-commit validation:
The initial test and type-check failures resulted from absent compiled Blocking findings: None. Nonblocking suggestion: Replace “current revision” in the pending broad-gate item with “latest PR commit |
Summary
Fixes #10040.
nemoclaw debugsupport bundles and terminal output now remove credentials embedded in URL userinfo. A shared full-redaction helper owns URL parsing, fail-closed fallback, and known secret-pattern replacement. The gateway restart and policy-rendering callers now use that helper without changing their existing redaction behavior.Root cause and detection gap
The debug sink applied known secret patterns without parsing URL tokens. Its tests covered token and environment-assignment shapes but did not pass URL userinfo through the debug redactor.
Changes
Type of Change
Quality Gates
DGX Station Hardware Evidence
Verification
Signed-off-by:line and every published commit appears asVerifiedin GitHubnpm run validate:prpassed for the exact pull request commitgit diff --checkpassednpm run docsbuilds without warnings (doc changes only)Signed-off-by: Udaya Tejas udayatejas2004@gmail.com
Signed-off-by: Apurv Kumaria akumaria@nvidia.com
Summary by CodeRabbit
Security
Tests