Repository navigation
fix(security): redact fatal diagnostics at process boundaries - #11674
Conversation
Signed-off-by: Prekshi Vyas <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
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 (3)
Included review availability: Your plan provides up to 12 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change sanitizes fatal diagnostics from messaging build, reviewed npm audit, and OpenClaw npm remediation entry points. Tests verify revised messages, preserved exit statuses, unsafe-path omission, and credential omission. ChangesFatal diagnostic redaction
Priority: ⬆️ High Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: High Suggested reviewers: Merge Risk: ⚪ Minimal · up to Fatal failures now return sanitized operation-specific diagnostics without exposing environment-derived or child-process details. The revised behavior is covered by real-process regression tests and is ready to merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Prekshi Vyas <[email protected]>
<!-- markdownlint-disable MD041 --> ## Outcome PR Review Advisor specialists now retain a successful findings submission when the harness adds its configured tool-disabled prose repair. Model-emitted post-submit prose and tool activity remain rejected. ## Reason The harness asked for a prose-only repair when a specialist submitted its findings without required analysis. It then treated its own repair prose as forbidden activity after the successful submission. This contradiction caused specialist and artifact failures on PRs #11645, #11668, and #11674. ## Changes - Preserve the original model-turn flow for terminal-submit validation when the harness starts a tool-disabled assistant-text repair. - Clarify that the controlled repair continuation is separate from model activity in the terminal-submit contract. - Add a session regression test that submits successfully without prose and verifies that the controlled prose repair completes without a second submission. ## Verification - `npm exec -- vitest run --project integration test/automation/pull-requests/advisor-session-runner.test.ts test/automation/pull-requests/advisor-session-context-tools.test.ts` — 76 tests passed. - `npm run test:changed` — seven growth-guardrail tests passed; no changed CLI, plugin, or E2E-support tests were selected. - `npm run build:cli` — passed. - `npm --prefix nemoclaw run build` — passed. - `node --max-old-space-size=8192 node_modules/typescript/bin/tsc -p tsconfig.cli.json` — passed after required build artifacts were generated. - The installed pre-push hook passed publication validation and the plugin, JavaScript-config, and CLI TypeScript checks for commit `e1c82b5f309b4275235c6a594a2c908756a8d182`. - The diff contains no secrets, API keys, or credentials. --- Signed-off-by: Julie Yaunches <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Fixed terminal submission validation when required assistant analysis is missing after a successful submission. - Prevented assistant-text repair content from being incorrectly included in terminal-submit validation. - Ensured analysis repair runs without unnecessary terminal-submit repair actions. - **Documentation** - Clarified when assistant-text repair may follow a successful terminal submission. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Julie Yaunches <[email protected]>
Outcome
Standalone messaging build, reviewed npm audit, and OpenClaw npm remediation failures no longer print environment-derived error text. Failing messaging child-process output is contained before it reaches terminal or CI streams, existing nonzero exit codes remain unchanged, and stderr contains only fixed operation-specific or failure-class diagnostics.
Reason
Three direct process-boundary sinks allowed environment-controlled plan fields, paths, or child-process output to reach fatal stderr. CodeQL reported these flows as clear-text logging alerts 2025, 2026, and 2027. Review of the first candidate also showed that inherited child streams could bypass the outer messaging diagnostic.
Related issues
Fixes #11673
Changes
Verification
npx vitest run --project integration test/security/fatal-process-diagnostics.test.ts test/runtime/messaging/messaging-build-applier.test.ts test/runtime/messaging/messaging-build-applier-credential-env.test.ts test/runtime/messaging/messaging-build-applier-inactive-channel.test.ts test/runtime/messaging/messaging-build-applier-integrity.test.ts test/runtime/messaging/messaging-build-applier-render-safety.test.ts test/automation/releases/reviewed-npm-audit-entrypoint.test.ts test/automation/releases/reviewed-npm-audit-workflow.test.ts test/agents/openclaw/openclaw-npm-remediation.test.ts test/agents/openclaw/openclaw-2026-6-npm-remediation.test.ts test/agents/openclaw/openclaw-diagnostics-npm-remediation.test.ts test/agents/openclaw/openclaw-diagnostics-jaeger-runtime.test.ts --coverage=false --maxWorkers=2— 134 passed, 1 skipped.npm run test:changed— 7 growth guardrails and 15 changed CLI/plugin/e2e tests passed.npm run test:projects:check— passed; all 2,697 test files have exact project membership.npm run checks:repository— all 19 selected repository checks passed.NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli— passed.NODE_OPTIONS=--max-old-space-size=8192 npm run validate:pr— passed, including formatting, lint, secret scan, CLI/plugin builds, and selected TypeScript checks.git diff --check— passed.Review notes
This change touches sensitive
scripts/**andsrc/lib/messaging/**paths. On commit4f8248323b262c581118a845c50ea37ffd4f1ae9, CodeRabbit reported no actionable comments and 64 CI checks—including both JavaScript CodeQL systems—passed. Advisor findings about inherited messaging child output and overly generic recovery diagnostics were reproduced and repaired infa0e42403c01f144df8ce426a74099be723a7bb8. The Advisor audit-entrypoint finding was a false positive: the child eval assigns the filesystem path toprocess.argv[1], uses the file URL only forimport(), and the real-process status/diagnostic assertions pass. The prior Reduction and simplification specialist failed after emitting non-submit activity following its findings submission, so its expected artifact was missing. The current commit awaits its replacement CI and automated-review cycle; no independent human approval is claimed.Signed-off-by: Prekshi Vyas [email protected]
Summary by CodeRabbit