Skip to content

feat(security): advisory early-warning correlation and audit provenance records - #7354

Merged
prekshivyas merged 10 commits into
mainfrom
dongniy/7338-audit-provenance
Jul 23, 2026
Merged

feat(security): advisory early-warning correlation and audit provenance records#7354
prekshivyas merged 10 commits into
mainfrom
dongniy/7338-audit-provenance

Conversation

@Dongni-Yang

@Dongni-Yang Dongni-Yang commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the non-operational, code-shaped acceptance criteria of #7338: a correlation library and local CLI that surface public advisories before they reach the reviewed corpus npm audit enforces, and provenance records for every audit so disclosure-to-detection timelines are provable from retained artifacts.

Scope note (review follow-up): per review, the scheduled workflow (issues: write) and its operating-policy documentation were split out to #7398, which stays draft until product/security owners record sign-off on #7338's scope / rescan-ownership / alert-destination / response-expectation criterion. This PR defines no operational surface: nothing here is scheduled, holds write permissions, or encodes policy.

Changes

  • Correlation module (scripts/lib/advisory-early-warning.mts, dependency-free): parses GitHub Security Advisory records and correlates them against the reviewed-graph package inventories (ci/reviewed-npm-audit.json specs + locked-graph package-locks, alias-aware). Exact npm package + parseable-range matches emit investigate signals; ambiguous or CPE-style matches stay informational — per the issue, ambiguous matches never block or mutate anything. Unparseable ranges fail safe (noisy, never silent).
  • Scan CLI (scripts/advisory-early-warning-scan.mts): local-file-only driver over the module. --list-packages emits inventory package names (the input for /advisories API queries); --advisories <file> [--output <file>] correlates fetched records and prints/writes structured signals. Exits 0 with or without signals; no network or tokens; it does not modify inputs or external state, and --output writes the requested local signals file.
  • Provenance sidecars: scripts/audit-reviewed-npm-graph.mts (reviewed graphs) and .github/actions/ci-wechat-runtime-audit/audit.sh (wechat runtime graph) now write a *.provenance.json next to each raw report: scanner identity, npm/node versions, configured registry and derived bulk advisory endpoint, run start/end times, audited package identity, raw report path, extracted GHSA ids — and a failure marker whenever the audit attempt itself failed, including npm's dominant failure mode of parseable error JSON (verified against a captured dead-registry npm audit --json output), so a failed attempt can never masquerade as a clean non-detection. Sidecars ride the existing artifact uploads.
  • Docs (docs/security/advisory-early-warning.md): how the correlation works, what each advisory type contributes, CLI usage, and the provenance recorded per audit. Scheduled operation and the proposed policy defaults now live in feat(security): schedule the advisory early-warning scan #7398's version of this page, gated on Detect public advisories before reviewed ecosystem mappings reach scanners #7338 sign-off.

Scope notes

  • Covered from the issue's acceptance criteria: pre-reviewed-advisory fixture + correlation signal, ambiguous-match non-blocking, reviewed-audit enforcement untouched and authoritative, per-audit provenance incl. actual endpoint (verified empirically: npm ≥7 posts to the bulk endpoint only — the sidecar records no fictitious fallback).
  • Moved to feat(security): schedule the advisory early-warning scan #7398 (gated on the product/security-owner criterion): scheduled rescans on advisory-data changes, alert routing, and the policy defaults (scope, rescan ownership, alert destination, response SLAs).
  • Explicitly left as proposals or follow-ups: the npm advisory database snapshot time (not exposed by npm audit; the sidecar records endpoints + run window instead, and "last comparable non-detection" comes from diffing advisoryIds across retained runs), per-upstream-repo advisory polling (needs a package→repo map; named in the doc as the natural extension), Trivy/image-digest provenance, and the fix(images): backport historical OpenClaw security patches #7276 post-mortem classification.

Testing

  • 67/67 across the two touched suites (advisory-early-warning 49, reviewed-npm-audit 18 incl. an integration-style test proving sidecar-write-before-rethrow with a fake npm); tsc strict clean; biome clean; shellcheck/bash -n clean.
  • Empirical verification on top of unit tests: live GitHub /advisories API calls (parameter semantics, pagination truncation repro, type=malware affects filtering), a captured dead-registry npm audit fixture for the failure-marker path, and standalone heredoc runs for the shell sidecar matrix.
  • Three adversarial local review rounds (premise incl. live-API ground-truthing, correctness incl. empirical repros, contract+security incl. injection tracing); final round dry apart from two Low findings fixed and re-verified before this PR.

Refs #7338

Signed-off-by: Dongni-Yang dongniy@nvidia.com

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added scheduled “Security / Advisory Early Warning” scan (every 6 hours) with manual trigger support, producing non-blocking correlation signals.
    • Added structured npm audit provenance sidecars (npm-audit.provenance.json) next to raw audit output, capturing timing, versions, and extracted advisory identifiers.
  • Bug Fixes

    • Improved resilience to malformed/non-JSON audit output and strengthened “fails closed” provenance failure reporting.
  • Documentation

    • Expanded security documentation to describe early-warning correlation logic and provenance artifacts.
  • Tests

    • Added/updated coverage for early-warning correlation and audit provenance generation behavior.

Public advisories can affect maintained packages weeks before they reach
the reviewed corpus that npm audit enforces (#7276 timeline). Add an
early-warning path and per-audit provenance so those windows become
visible and provable from retained artifacts:

- scripts/lib/advisory-early-warning.mts: dependency-free correlation of
  GitHub Security Advisory records (reviewed, unreviewed, and malware)
  against the reviewed-graph package inventories; exact npm name and
  parseable-range matches produce investigate signals, ambiguous or
  CPE-style matches stay informational and never block.
- .github/workflows/advisory-early-warning.yaml: six-hourly paginated
  scan of all three advisory types, correlated against the inventory,
  reporting into one rolling security-labeled issue (marker- and
  author-verified, deduplicated by advisory id plus package).
- scripts/audit-reviewed-npm-graph.mts and the wechat runtime audit
  action now write a *.provenance.json sidecar next to each raw report:
  scanner and npm/node versions, configured registry and derived bulk
  advisory endpoint, run start/end times, extracted advisory ids, and a
  failure marker whenever the audit attempt itself failed - including
  npm's parseable-error-JSON failure mode - so a failed attempt can
  never be mistaken for a comparable non-detection.
- docs/security/advisory-early-warning.md: how the path works plus
  proposed defaults (scope, ownership, alert destination, SLA) pending
  maintainer confirmation.

Refs #7338

Signed-off-by: Dongni-Yang <dongniy@nvidia.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds npm audit provenance sidecars with timing, registry, graph, advisory, and failure metadata. It also adds advisory-to-inventory correlation utilities, a non-blocking CLI, tests, and security documentation.

Changes

Security monitoring

Layer / File(s) Summary
npm audit provenance sidecars
.github/actions/ci-wechat-runtime-audit/audit.sh, scripts/audit-reviewed-npm-graph.mts, test/reviewed-npm-audit.test.ts, test/wechat-runtime-audit-workflow.test.ts, docs/security/advisory-early-warning.md
Audits record timing and status, generate provenance sidecars, extract GHSA IDs, preserve failure details, and pass graph/runtime context through audit calls.
Advisory parsing and correlation
scripts/lib/advisory-early-warning.mts, test/advisory-early-warning.test.ts
Advisories and reviewed inventories are parsed, semver ranges are evaluated, and exact or ambiguous signals are produced with corresponding actions.
Correlation CLI
scripts/advisory-early-warning-scan.mts, docs/security/advisory-early-warning.md
The CLI loads local inventories and advisory files, optionally writes signals, prints results, and remains non-blocking for correlation findings.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant Inventory
  participant AdvisoryFile
  participant Correlator
  CLI->>Inventory: load reviewed and locked-graph packages
  CLI->>AdvisoryFile: load advisory JSON
  CLI->>Correlator: correlate advisories with inventory
  Correlator-->>CLI: return sorted signals
  CLI-->>CLI: print or write signals
Loading

Possibly related issues

  • Issue 7338 — Covers the early-warning advisory correlation, provenance, and future alert-routing requirements implemented or documented by this PR.

Possibly related PRs

  • NVIDIA/NemoClaw#7345 — Both PRs modify the reviewed npm audit pipeline, including scripts/audit-reviewed-npm-graph.mts.

Suggested labels: area: docs, area: packaging

Suggested reviewers: cjagwani, apurvvkumaria, cv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main changes: advisory early-warning correlation plus audit provenance records.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dongniy/7338-audit-provenance

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

@github-actions

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit fd99f88 in the dongniy/7338-audit-p... branch remains at 96%, unchanged from commit f084837 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit fd99f88 in the dongniy/7338-audit-p... branch remains at 80%, unchanged from commit f084837 in the main branch.

Show a code coverage summary of the most impacted files.
File main f084837 dongniy/7338-audit-p... fd99f88 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/state/m...ock-identity.ts 95% 95% 0%
src/lib/state/m...lock-storage.ts 97% 97% 0%
src/lib/tunnel/services.ts 73% 73% 0%
src/lib/state/m...-acquisition.ts 84% 89% +5%

Updated July 23, 2026 22:31 UTC

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions
Status: Canonical ledger: 0 blocker(s), 1 warning(s), 0 suggestion(s).

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 2 warnings · 7 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 more warning, 7 more suggestions.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: None

1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Add a process-level test for the advisory scan CLI

  • Location: scripts/advisory-early-warning-scan.mts:51
  • Category: tests
  • Problem: The new CLI has unit coverage for its library, but no test invokes the CLI with its repository-relative inventory input and `--output` contract.
  • Impact: A regression in argument parsing, repository-relative inventory loading, exit behavior, or signal-file output can ship while library unit tests continue to pass.
  • Recommendation: Add a temporary-repository subprocess test that invokes the CLI with a fixture advisory and `--output`, then asserts status 0, emitted signal text, and the written JSON signals file.
  • Verification: Inspect test/advisory-early-warning.test.ts for a test that spawns scripts/advisory-early-warning-scan.mts and asserts its output-file behavior.
  • Test coverage: A Vitest subprocess test runs the CLI against a temporary repository fixture with an affected advisory and verifies exit status, stdout summary, and the JSON written by `--output`.
  • Evidence: scripts/advisory-early-warning-scan.mts lines 51-96 implement CLI argument parsing, repository-relative inventory loading, and `--output` writing. test/advisory-early-warning.test.ts tests correlation and parsing exports but does not invoke the CLI executable. The test context identifies runtime validation as recommended for changed process boundaries.

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@Dongni-Yang

Copy link
Copy Markdown
Contributor Author

Note on the build-sandbox-images failures — pre-existing advisory breakage, not introduced by this PR.

The failing step is Dockerfile.base's mcporter runtime gate: npm --prefix .../mcporter-runtime audit --omit=dev --audit-level=low. It fails on advisories that reached the GitHub-reviewed corpus after the runtime lock was pinned — the log shows @hono/node-server <2.0.5 (moderate, GHSA-frvp-7c67-39w9) and @modelcontextprotocol/sdk >=1.25.0 against the pinned mcporter@0.7.3 graph.

Why it fires here and not on sibling PRs: this PR adds a file under scripts/lib/, which is part of the image build context for that stage, so the Docker layer cache is invalidated and the audit actually re-runs against today's advisory database. PRs that don't touch the image inputs ride the cached layer and pass (e.g. #7353, ~30 min earlier). Any PR touching scripts/ or Dockerfile.base will now hit this until the mcporter runtime lock is remediated (related in-flight work: #7355, #7332).

For what it's worth, this is a live instance of the propagation-window problem this PR is about: the advisories existed upstream before the reviewed records started enforcing overnight — the early-warning scan added here would have surfaced them ahead of the red CI.

Signed-off-by: Dongni-Yang dongniy@nvidia.com

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/security/advisory-early-warning.md (1)

5-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff

Keep one sentence per line in Markdown source.

This page wraps sentences across multiple lines (e.g. Lines 5-11, 27-30, 46-57). The repository docs convention is one sentence per line, which keeps diffs reviewable. Please reflow the prose so each sentence occupies its own line.

As per coding guidelines: "Keep one sentence per line in Markdown and MDX source files."

🤖 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 `@docs/security/advisory-early-warning.md` around lines 5 - 11, Reflow the
prose in advisory-early-warning.md so every sentence is contained on a single
Markdown source line, including the sections currently wrapped across lines
5-11, 27-30, and 46-57. Preserve all wording, formatting, and content while
applying the repository’s one-sentence-per-line convention.

Source: Coding guidelines

🤖 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 `@docs/security/advisory-early-warning.md`:
- Line 1: Add the repository’s standard two-line SPDX license header to the top
of the Markdown document before the “Advisory Early Warning and Audit
Provenance” heading, using valid Markdown comment syntax and matching the
headers used by the other files in this change.

---

Nitpick comments:
In `@docs/security/advisory-early-warning.md`:
- Around line 5-11: Reflow the prose in advisory-early-warning.md so every
sentence is contained on a single Markdown source line, including the sections
currently wrapped across lines 5-11, 27-30, and 46-57. Preserve all wording,
formatting, and content while applying the repository’s one-sentence-per-line
convention.
🪄 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: d91862a4-76b0-493f-951a-8bb23eb5db11

📥 Commits

Reviewing files that changed from the base of the PR and between 5087eb4 and 79d6625.

📒 Files selected for processing (8)
  • .github/actions/ci-wechat-runtime-audit/audit.sh
  • .github/workflows/advisory-early-warning.yaml
  • docs/security/advisory-early-warning.md
  • scripts/advisory-early-warning-scan.mts
  • scripts/audit-reviewed-npm-graph.mts
  • scripts/lib/advisory-early-warning.mts
  • test/advisory-early-warning.test.ts
  • test/reviewed-npm-audit.test.ts

Comment thread docs/security/advisory-early-warning.md
CodeRabbit: every source file carries the SPDX header; match the
sibling docs/security file comment syntax.

Refs #7338

Signed-off-by: Dongni-Yang <dongniy@nvidia.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs the product/security scope gate resolved before it enters the approval path. #7338 is still labeled needs: triage; its acceptance criterion requiring product/security owners to define supported historical-image scope, rescan ownership, alert destination, and response expectations is unchecked. The PR also correctly describes those defaults as proposals pending confirmation. Because this adds a scheduled operational workflow with issues: write and documents its operating policy, green code/CI is not enough to establish the supported surface. Please obtain explicit product/security-owner sign-off on those choices, record it on #7338, and update the documentation from proposed to accepted behavior (or narrow the PR to non-operational/provenance-only pieces). Then refresh and rerun the cancelled WSL lane for the exact revision.

Dongni-Yang and others added 2 commits July 23, 2026 06:24
Narrow #7354 to its non-operational pieces per review: the correlation
module, the local scan CLI, and the per-audit provenance sidecars. The
six-hourly workflow (issues: write) and the proposed policy defaults
move to a follow-up PR that stays draft until product/security owners
sign off on #7338 scope, ownership, alert-destination, and response
questions.

Refs #7338

Signed-off-by: Dongni-Yang <dongniy@nvidia.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Dongni-Yang Dongni-Yang changed the title feat(security): advisory early-warning scan and audit provenance records feat(security): advisory early-warning correlation and audit provenance records Jul 22, 2026
@Dongni-Yang

Copy link
Copy Markdown
Contributor Author

@cjagwani Agreed the scope gate isn't mine to green-light, so I took the narrowing option:

  • This PR is now non-operational/provenance-only (05bcaf5, after a refresh merge of main): the correlation module, the local scan CLI (no network, no tokens, no writes), the per-audit provenance sidecars, and mechanics-only docs. The scheduled workflow (issues: write) and the operating-policy documentation are removed from this PR.
  • The operational slice moved to feat(security): schedule the advisory early-warning scan #7398, a draft stacked on this branch and explicitly marked do-not-merge until product/security owners record sign-off on Detect public advisories before reviewed ecosystem mappings reach scanners #7338. I've asked for that decision on the issue, with the previously-proposed defaults as a concrete starting point.
  • The branch is refreshed to current main, and the new revision re-runs every lane including wsl-e2e; if it gets cancelled by supersession again I'll rerun it for the final revision.

The PR body is updated to describe the narrowed diff.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@docs/security/advisory-early-warning.md`:
- Around line 56-58: Update the CLI behavior description in
advisory-early-warning.md to remove the claim that it never mutates anything.
Clarify that it does not modify input files or external state, while writing the
requested local signals.json output when --output is supplied.
🪄 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: 0a5df7f5-d153-4635-adce-2a3b393a3b33

📥 Commits

Reviewing files that changed from the base of the PR and between 1b53bb7 and 05bcaf5.

📒 Files selected for processing (2)
  • docs/security/advisory-early-warning.md
  • scripts/audit-reviewed-npm-graph.mts
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/audit-reviewed-npm-graph.mts

Comment thread docs/security/advisory-early-warning.md Outdated
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality labels Jul 23, 2026
Require a complete five-severity npm audit summary before treating provenance as comparable.

Preserve the sidecar before rejecting malformed or error reports.

Cover the trusted action path with focused regressions.

Co-authored-by: Dongni-Yang <dongniy@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria
apurvvkumaria requested a review from cjagwani July 23, 2026 19:26

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/security/advisory-early-warning.md (1)

7-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep each sentence on one physical line.

Several new sentences are hard-wrapped across multiple source lines. Reflow them to comply with the documentation convention while retaining the existing periods.

As per coding guidelines: “Keep one sentence per line in Markdown and MDX source files.”

Also applies to: 10-17, 19-20, 22-31, 33-36, 40-54

🤖 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 `@docs/security/advisory-early-warning.md` around lines 7 - 8, Reflow the
affected prose in the advisory document so every sentence occupies one physical
Markdown source line, including the sentences around the scheduled operation and
response policy. Preserve all existing wording, punctuation, and periods while
removing hard wraps across the referenced sections.

Source: Coding guidelines

test/wechat-runtime-audit-workflow.test.ts (1)

62-62: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use the established POSIX PATH separator.

Use : here rather than path.delimiter; these tests run on POSIX CI runners and the suite intentionally standardizes this construction.

Based on learnings, “prefer the established POSIX PATH separator :” in these tests.

🤖 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 `@test/wechat-runtime-audit-workflow.test.ts` at line 62, Update the PATH
construction in the test environment setup to use the literal POSIX separator
“:” instead of path.delimiter. Keep the existing targetRoot/bin and
process.env.PATH values unchanged.

Source: Learnings

🤖 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/wechat-runtime-audit-workflow.test.ts`:
- Around line 82-105: Update installFakeAuditNpm so auditReport can be supplied
as raw output text while preserving serialized JSON behavior for structured
reports; then add a table-driven test case using malformed output such as
"{not-json" that asserts the action reports a “parseable JSON report” failure.

---

Nitpick comments:
In `@docs/security/advisory-early-warning.md`:
- Around line 7-8: Reflow the affected prose in the advisory document so every
sentence occupies one physical Markdown source line, including the sentences
around the scheduled operation and response policy. Preserve all existing
wording, punctuation, and periods while removing hard wraps across the
referenced sections.

In `@test/wechat-runtime-audit-workflow.test.ts`:
- Line 62: Update the PATH construction in the test environment setup to use the
literal POSIX separator “:” instead of path.delimiter. Keep the existing
targetRoot/bin and process.env.PATH values 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: 42e35416-7d9e-4bbd-b939-ad51fca6e905

📥 Commits

Reviewing files that changed from the base of the PR and between 05bcaf5 and 20f2e8a.

📒 Files selected for processing (3)
  • .github/actions/ci-wechat-runtime-audit/audit.sh
  • docs/security/advisory-early-warning.md
  • test/wechat-runtime-audit-workflow.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/actions/ci-wechat-runtime-audit/audit.sh

Comment thread test/wechat-runtime-audit-workflow.test.ts
Exercise the action-level fail-closed path with genuinely malformed raw npm audit output.

Co-authored-by: Dongni-Yang <dongniy@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria
apurvvkumaria dismissed cjagwani’s stale review July 23, 2026 20:25

Dismissed as stale after exact-head revalidation. The operational scheduled workflow and issues: write scope were removed from this PR and moved to draft #7398 pending #7338 product/security sign-off. The current exact head 7b2a512 has zero unresolved threads, all required checks and E2E lanes green, Verified DCO commits, and fail-closed audit-report coverage.

@apurvvkumaria apurvvkumaria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-head re-review complete at 7b2a512. The prior blocking scope concern is satisfied: operational scheduling and issues:write moved to draft #7398, while this PR is non-operational. Exact-head WSL and all required CI/E2E/advisor checks pass, all commits are Verified/DCO-compliant, and there are no unresolved review threads. Remaining documentation/POSIX suggestions are nonblocking fix-forward nits.

apurvvkumaria and others added 3 commits July 23, 2026 15:11
Co-authored-by: Dongni-Yang <dongniy@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
…ce-fail-closed

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@prekshivyas
prekshivyas merged commit 0670d20 into main Jul 23, 2026
59 of 62 checks passed
@prekshivyas
prekshivyas deleted the dongniy/7338-audit-provenance branch July 23, 2026 22:39
Dongni-Yang added a commit that referenced this pull request Jul 24, 2026
Resolve to the rebase-equivalent tree after #7354 squash-merged: the
branch payload is exactly the scheduled workflow and the doc's
scheduled-operation/policy sections, applied on top of main's reviewed
#7354 wording (review amendments preserved).

Closes #7338

Signed-off-by: Dongni-Yang <dongniy@nvidia.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dongni-Yang added a commit that referenced this pull request Jul 24, 2026
Resolve to the restructured non-operational slice: the NVD
reconciliation library, scan-CLI plumbing (--nvd-records, --inventory,
cveId), tests, and the reconciliation-semantics + #7276 post-mortem
docs, rebased onto main after #7354 squash-merged. The scheduled
workflow's NVD step and the policy-defaults doc section move to the
sign-off-gated #7398, matching the #7354/#7398 split.

Refs #7338

Signed-off-by: Dongni-Yang <dongniy@nvidia.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@prekshivyas prekshivyas mentioned this pull request Jul 24, 2026
23 tasks
prekshivyas added a commit that referenced this pull request Jul 24, 2026
<!-- 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>
apurvvkumaria added a commit that referenced this pull request Jul 24, 2026
…-mortem (#7370)

## Summary

The **non-operational NVD slice** of #7338: NVD as a supplementary
reconciliation source (a pure library plus offline CLI plumbing) and the
**#7276 post-mortem** answering the issue's "Questions to answer" — the
post-mortem is an explicit #7338 acceptance checkbox.

**Restructured 2026-07-24** to match the #7354/#7398 split: this PR was
previously stacked on pre-narrowing #7354 and included the scheduled
workflow's NVD step. That step (and the policy-defaults doc section) now
belongs to the sign-off-gated #7398; this PR is rebased onto main and
carries only pieces that define no operational surface — nothing here is
scheduled, holds write permissions, or encodes policy. It can merge on
normal review.

## Changes

- **`scripts/lib/nvd-reconciliation.mts`** (new, pure, dependency-free):
parses NVD 2.0 API records (malformed → null, never throws;
live-verified against `services.nvd.nist.gov`, including a 358-criteria
CPE record and the reserved-id empty envelope) and reconciles each
signal: `corroborated` / `nvd-missing` / `nvd-divergent`. Annotations
are **informational only** — they carry no action or confidence and
cannot alter a signal's dedupe identity (test-asserted), per the issue's
requirement that ambiguous NVD/CPE matches never become authoritative
npm mappings.
- **Signal plumbing**: `AdvisorySignal` gains an optional `cveId` from
the GHSA record's `cve_id`; the scan CLI accepts `--nvd-records <file>`
(offline attachment — the CLI never performs network requests) and
`--inventory <file>` (hermetic test runs).
- **Docs**: NVD reconciliation semantics, and the #7276 post-mortem
classifying each finding per the acceptance criteria — `fast-uri`:
reviewed-mapping delay, directly demonstrated; `@opentelemetry/core`:
audit-coverage/execution-order gap; Jaeger: consistent but unproven;
`tar`: unproven, evidence not retained. Post-mortem wording states
plainly which covering mechanisms are merged and which ride the gated
#7398.

## What moved to #7398

The scheduled workflow's NVD reconciliation step (rate-capped fetch,
`NVD: unavailable` degradation, rolling-issue annotation) and the
proposed policy defaults — operational surface under #7338's
owner-sign-off gate.

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: `scripts/lib/nvd-reconciliation.mts` and
`test/nvd-reconciliation.test.ts` now traverse nested NVD configuration
nodes as an internal correctness fix for the documented vulnerable-CPE
parsing contract; no user-facing command, flag, configuration, output
schema, or workflow changes.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 389a282 -->
<!-- docs-review-agents-blob-sha: 9c9b36d -->

## Testing

- `test/nvd-reconciliation.test.ts`: 122 tests green across the three
suite files locally; tsc strict clean on both `.mts` entry points;
biome, SPDX, test-size-budget, title-style, and source-shape guardrails
verified locally.
- CLI smoke-verified: `--list-packages` runs against the repo inventory.
- Maintainer follow-up: `npx vitest run --project integration
test/nvd-reconciliation.test.ts test/advisory-early-warning.test.ts`
passes 93/93 with nested NVD configuration coverage.

Refs #7338 (the issue closes via #7398 once product/security owners
record sign-off)

Signed-off-by: Dongni-Yang <dongniy@nvidia.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Advisory early-warning signals can include an optional CVE identifier
when available.
* Added offline NVD supplementary reconciliation that annotates results
with corroborated, nvd-missing, or nvd-divergent.
* Added `--inventory <file>` for hermetic inventories and `--nvd-records
<file>` to attach pre-fetched NVD reconciliation data without network
access.
* **Documentation**
* Expanded early-warning correlation documentation, including NVD
reconciliation behavior and the updated `#7276` post-mortem.
* **Bug Fixes**
* Malformed inventory entries now fail the run instead of silently
shrinking the inventory.
* **Tests**
* Updated and expanded coverage for CVE extraction, NVD processing, and
CLI offline behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Dongni-Yang <dongniy@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Apurv Kumaria <akumaria@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants