ci(security): add reviewed npm audit exceptions - #7345
Conversation
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
|
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. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis change adds reviewed npm audit policy evaluation, integrates it into mcporter graph audits and Docker builds, records audit metadata in provenance, and expands related tests, documentation, build triggers, and ownership rules. ChangesReviewed npm audit and provenance
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant DockerBuild
participant ReviewedAudit as reviewed-npm-audit.mts
participant Npm
participant Provenance
DockerBuild->>ReviewedAudit: audit mcporter-runtime with exceptions
ReviewedAudit->>Npm: run npm audit --json
Npm-->>ReviewedAudit: report and findings
ReviewedAudit-->>DockerBuild: policy status, accepted advisories, policy SHA
DockerBuild->>Provenance: write audit fields and recipe
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
|
@apurvvkumaria Could you please confirm whether this approach will cover our needs for upcoming CVEs? The default exception list is empty, and any temporary exception must match the exact advisory, production graph, package, installed version, and severity. It also requires an owner, tracker, rationale, compensating controls, and an expiry within 30 days, while unrelated or future findings continue to fail the audit. Does this give us the reviewable control needed to proceed with E2E for a known, temporarily accepted CVE without weakening the audit gate for other vulnerabilities? Please flag any additional control you think is required. |
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
scripts/lib/reviewed-npm-audit.mts (1)
455-461: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winAdd a
timeoutto thenpm auditspawn.spawnSynccurrently has no bound, so a stalled registry or hungnpmprocess can block this security gate indefinitely. Sinceresult.erroris already thrown, a timed-out run fails closed.♻️ Suggested change
const result = spawnSync("npm", ["audit", "--omit=dev", "--json"], { cwd: options.directory, encoding: "utf-8", env: { ...process.env, NPM_CONFIG_UPDATE_NOTIFIER: "false" }, maxBuffer: 64 * 1024 * 1024, stdio: ["ignore", "pipe", "pipe"], + timeout: 5 * 60 * 1000, });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/lib/reviewed-npm-audit.mts` around lines 455 - 461, Update the spawnSync invocation in the npm audit execution flow to include an appropriate timeout option, while preserving the existing result.error handling so timed-out audits fail closed. Keep the current command, environment, buffering, and stdio configuration unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/sandbox/build-context.ts`:
- Around line 276-279: Update the sandbox build-context staging flow around the
reviewed-npm-audit script copy to also stage ci/npm-audit-exceptions.json for
optimized contexts. Extend the corresponding fixture and assertion in the
sandbox build-context test so the policy file’s staged path and presence are
verified.
---
Nitpick comments:
In `@scripts/lib/reviewed-npm-audit.mts`:
- Around line 455-461: Update the spawnSync invocation in the npm audit
execution flow to include an appropriate timeout option, while preserving the
existing result.error handling so timed-out audits fail closed. Keep the current
command, environment, buffering, and stdio configuration unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f96555b0-f42f-47a7-97c1-34b7e0945fb1
📒 Files selected for processing (18)
.github/CODEOWNERS.github/workflows/base-image.yamlDockerfileDockerfile.baseagents/openclaw/dependency-review.mdci/npm-audit-exceptions.jsonci/reviewed-npm-audit.jsondocs/security/openclaw-2026.6.10-dependency-review.mddocs/security/openclaw-2026.7.1-dependency-review.mdscripts/audit-reviewed-npm-graph.mtsscripts/lib/reviewed-npm-audit.mtssrc/lib/sandbox/build-context.tstest/fetch-guard-patch-regression.test.tstest/mcporter-supply-chain.test.tstest/openclaw-dependency-review.test.tstest/openclaw-integrity-pin-suite.tstest/reviewed-npm-audit.test.tstest/sandbox-build-context.test.ts
There was a problem hiding this comment.
Blocking: expired exceptions do not fail closed on trusted-base reuse.
Dockerfile lines 320-357 hashes and directly parses the registry, derives the expected provenance, and reuses a matching trusted base without invoking the shared evaluator. If an exception was valid when Dockerfile.base produced the marker but is expired when this child image is built, the bytes/hash and accepted-advisory list still match, so USE_REVIEWED_BASE_RUNTIME becomes 1 and the expired high/critical exception remains accepted indefinitely. This contradicts the PR’s core contract that expired exceptions fail closed.
Please validate the registry with the shared policy parser at child-build time before provenance reuse (or bind and enforce a freshness/expiry value in provenance), and add a regression where a matching schema-3 base marker plus an expired mcporter exception cannot take the reuse path.
Non-blocking/fix-forward: bounding the npm audit spawn with a timeout would improve gate availability, but it need not block this PR.
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
|
@apurvvkumaria Addressed the blocking trusted-base expiry finding in 8e52364. The child build now parses the exception registry through the shared |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/openclaw-integrity-pin-suite.ts`:
- Around line 273-290: Update the embedded audit parser exported as
parseAuditExceptionRegistry to validate each entry.expires before constructing
expiresAt. Reject values that are not YYYY-MM-DD strings or produce a non-finite
date, while preserving the existing expired-date error for valid past dates and
the clean result flow for valid future dates.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 3bfc2aba-4f50-4947-9f7b-ed73b350cfb6
📒 Files selected for processing (2)
Dockerfiletest/openclaw-integrity-pin-suite.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- Dockerfile
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR adds the canonical dated release entry for NemoClaw v0.0.94 before the tag is cut. The entry reconciles all 26 commits since v0.0.93 and links each user-visible change to its owning documentation. ## Changes - Add `docs/changelog/2026-07-24.mdx` with the exact `## v0.0.94` heading, parser-safe SPDX comment, release summary, and detailed bullets. - Record sandbox restore and update behavior, onboarding and inference changes, network policy behavior, security evidence, Hermes build performance, DGX Station guidance, and E2E validation changes. - Preserve `docs/` as the source of truth without changing the AI-agent documentation routing skill. - Use [E2E run 30075443016](https://github.com/NVIDIA/NemoClaw/actions/runs/30075443016) for release QA evidence at exact tested SHA `04e6dfa883071dda9df429c66e73168e1a995cba`. ### Source summary - [#7461](#7461) -> `docs/changelog/2026-07-24.mdx`: Record the ownership-preserving Hermes image layer reduction and hosted timing comparison. - [#7460](#7460) -> `docs/changelog/2026-07-24.mdx`: Record removal of candidate Hermes swap setup from E2E validation. - [#7458](#7458) -> `docs/security/fern-5.80.1-dependency-review.md`, `docs/changelog/2026-07-24.mdx`: Record the reviewed Fern CLI update. - [#7457](#7457) -> `docs/changelog/2026-07-24.mdx`: Record periodic runner-pressure telemetry. - [#7455](#7455) -> `docs/changelog/2026-07-24.mdx`: Record non-blocking absent Fern previews. - [#7450](#7450) -> `docs/changelog/2026-07-24.mdx`: Record stable cancellation handling for live-test child processes. - [#7449](#7449) -> `docs/changelog/2026-07-24.mdx`: Record parallel plugin EXDEV coverage. - [#7448](#7448) -> `docs/changelog/2026-07-24.mdx`: Record isolated long-running E2E lanes. - [#7444](#7444) -> `docs/changelog/2026-07-24.mdx`: Record exact-head Hermes swap validation. - [#7437](#7437) -> `docs/manage-sandboxes/backup-restore.mdx`, `docs/changelog/2026-07-24.mdx`: Record gateway pairing and authenticated verification after cross-sandbox restore. - [#7436](#7436) -> `docs/manage-sandboxes/backup-restore.mdx`, `docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record selected stale-state cleanup and Hermes virtual-environment access repair. - [#7385](#7385) -> `docs/network-policy/customize-network-policy.mdx`, `docs/changelog/2026-07-24.mdx`: Record the read-only agent-variant route check. - [#7371](#7371) -> `docs/changelog/2026-07-24.mdx`: Record host-artifact verification for session exports. - [#7359](#7359) -> `docs/changelog/2026-07-24.mdx`: Record platform validation for managed vLLM model overrides. - [#7356](#7356) -> `docs/changelog/2026-07-24.mdx`: Record token-shaped value redaction for `sandbox doctor --json`. - [#7354](#7354) -> `docs/security/advisory-early-warning.md`, `docs/changelog/2026-07-24.mdx`: Record advisory correlation and retained audit provenance. - [#7352](#7352) -> `docs/network-policy/customize-network-policy.mdx`, `docs/network-policy/integration-policy-examples.mdx`, `docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record preset reapplication and bounded `tls: skip` guidance. - [#7345](#7345) -> `docs/security/openclaw-2026.6.10-dependency-review.md`, `docs/security/openclaw-2026.7.1-dependency-review.md`, `docs/changelog/2026-07-24.mdx`: Record reviewed npm audit exception enforcement. - [#7340](#7340) -> `docs/network-policy/customize-network-policy.mdx`, `docs/changelog/2026-07-24.mdx`: Record the repaired CLI-reference route. - [#7334](#7334) -> `docs/get-started/dgx-station-preparation.mdx`, `docs/changelog/2026-07-24.mdx`: Record the qualified OTA metadata fallback and narrowed override wording. - [#7322](#7322) -> `docs/changelog/2026-07-24.mdx`: Reconcile the gateway source tag added to plugin registration banners. - [#7284](#7284) -> `docs/manage-sandboxes/update-sandboxes.mdx`, `docs/changelog/2026-07-24.mdx`: Record read-only `upgrade-sandboxes --check` behavior and recorded-gateway selection. - [#7277](#7277) -> `docs/changelog/2026-07-24.mdx`: Reconcile deterministic gateway TCP refusal coverage. - [#7234](#7234) -> `docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-24.mdx`: Record preserved DGX Spark managed vLLM Express intent on resume. - [#7185](#7185) -> `docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-24.mdx`: Record IPv4 fallback DNS selection and exact resolver probing. - [#6820](#6820) -> `docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record the versioned, redacted `--events=jsonl` onboarding stream. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — justification: `npx vitest run test/changelog-docs.test.ts` passed 6/6 tests. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: `docs/changelog/2026-07-24.mdx`; the writing rules, documentation style, exact release range, skip terms, published routes, and product scope were reviewed; the changelog test passed 6/6; `npm run docs` passed with route checking OK, zero errors, and two existing warnings. - Agent: Codex Desktop <!-- docs-review-head-sha: 65368f9 --> <!-- docs-review-agents-blob-sha: 9c9b36d --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable - Station profile/scenario: Not applicable - Result: Not applicable - Supporting evidence: Not applicable. This PR does not change `scripts/prepare-dgx-station-host.sh`. ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run test/changelog-docs.test.ts` passed 6/6 tests. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: Not applicable to the dated changelog entry. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only). The build passed with zero errors and two existing Fern warnings. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only). Native dated changelog entries use the required parser-safe MDX SPDX comment and no frontmatter. --- Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added the v0.0.94 release changelog. * Documented improvements to sandbox snapshot and restore behavior. * Added updates for gateway selection, policy comparisons, onboarding event output, and DGX recovery workflows. * Documented enhanced diagnostics redaction, npm audit provenance, image assembly performance, and validation stability improvements. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Summary
Keep
npm auditrunning for reviewed production graphs while allowing only explicit, exact, short-lived exceptions for future high or critical advisories. The exception registry is empty in this PR. Currentmainincludes the OpenClaw 2026.7.1 dependency remediation, and the reviewed OpenClaw graph reports zero known vulnerabilities.Changes
ci/npm-audit-exceptions.jsonregistry and a shared evaluator for the reviewed CI graph and OpenClaw image builds.The current consumers are the required reviewed npm audit job and the mcporter install in
Dockerfile.baseandDockerfile. A rawnpm audit --audit-level=highcommand cannot express one-advisory risk acceptance without suppressing unrelated findings, so the shared evaluator performs exact matching.test/reviewed-npm-audit.test.ts, the mcporter supply-chain test, the OpenClaw provenance suites, and sandbox build-context tests protect this contract.Type of Change
Quality Gates
E2E / PR Gaterequires maintainer approval of the credentialedcloud-onboardskip in https://github.com/NVIDIA/NemoClaw/actions/runs/30031620717Documentation Writer Review
docs-updatedagents/openclaw/dependency-review.md,docs/security/openclaw-2026.6.10-dependency-review.md, anddocs/security/openclaw-2026.7.1-dependency-review.md; the final fix enforces their existing fail-closed expiry contract before trusted-base reuse and requires no additional documentation.DGX Station Hardware Evidence
scripts/prepare-dgx-station-host.shis unchanged.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed; official Hadolint v2.14.0 was run manually because it is unavailable on the hostnpm run docspassed (Fern reported zero errors and two non-blocking warnings)mainCurrent
maincontains the dependency remediations that previously blocked this PR. This PR deliberately adds no audit exception; it adds only the empty-by-default framework for future reviewed exceptions.Signed-off-by: Senthil Ravichandran senthilr@nvidia.com
Summary by CodeRabbit