fix(security): close P1 code scanning findings#4880
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Worried about impact? Review this PR in Change Stack to explore blast radius before you approve or request changes. 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 (6)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughHardens shell scripts and runtime modules by adding explicit guards for optional helpers, replaces direct imports with namespace imports to permit existence checks, sanitizes npm shim output and user-facing shim paths, and adds tests to verify redaction and guarded failure behavior. ChangesDefensive hardening and user-facing improvements
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 1 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Consider writing more tests for
This is an automated advisory review. A human maintainer must make the final merge decision. |
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Addressed the PR Review Advisor feedback in commit 5ba3895:
Local verification:
|
Selective E2E Results — ✅ All requested jobs passedRun: 27048227856
|
Summary
Close the P1 code-scanning buckets from #3654 by hardening small production correctness and logging paths plus the production-ish ShellCheck findings. The changes keep behavior intact while failing closed around shields helper availability and avoiding HOME-derived shim paths in TypeScript dev-shim logs.
Related Issue
Refs #3654
Changes
src/lib/actions/dev/npm-link-or-shim.tslogs and add regression assertions that HOME/repo paths are not emitted.SC2015shell patterns inagents/hermes/start.shandscripts/nemoclaw-start.shas explicit control flow.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Note:
npm testwas attempted, but the existing installer integration testtest/install-preflight.test.ts > warns on Podman but still runs onboardingfails in this environment because host CDI detection turns the expected Podman warning path into a missing-CDI issue path before onboarding.Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests