fix(security): bound reviewed lock transition - #8165
Conversation
Signed-off-by: Julie Yaunches <jyaunches@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. |
|
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 (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe audit metadata schema changes from version 3 to version 2. Locked graphs now store primary and optional replacement lockfile SHA-256 digests. Validation, lock selection, metadata assertions, and workflow tests use the new fields. ChangesReviewed npm audit digest handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit d04bf1f in the TypeScript / code-coverage/cliThe overall coverage in commit d04bf1f in the Show a code coverage summary of the most impacted files.
Updated |
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-locked-install.test.ts`:
- Line 380: Update the OpenClaw assertion in the test to locate the relevant
locked graph by its PACKAGE_SPEC or id, rather than using audit.lockedGraphs[0].
Assert that the identified graph does not have the legacy reviewedLockSha256
property, while preserving the existing graph identity validation.
🪄 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: 6e5f2db4-b4c3-435f-aad9-d4130ce0a259
📒 Files selected for processing (4)
ci/reviewed-npm-audit.jsonscripts/audit-reviewed-npm-graph.mtstest/openclaw-locked-install.test.tstest/reviewed-npm-audit-workflow.test.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
4 terminology differences from the second opinionAdvisory only. These are normalized differences from the primary terminology receipt.
Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate. 1 semantic terminology decisionTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: None 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>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
senthilr-nv
left a comment
There was a problem hiding this comment.
Approved at exact head 8524e9b. The reviewed npm lock transition remains bounded to one independently verified successor digest, rejects invalid, duplicate, and third digests, and preserves the selected digest through pre/post-install validation. The CodeRabbit graph-identity test finding is addressed. Focused tests pass 22/22 and npm run validate:pr passed on the preceding refreshed head; the final change is a test-only type annotation. No docs update is needed. This approval does not waive the expected reviewed-npm-audit bootstrap gate or other required CI.
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Maintainer bootstrap exception — exact head
|
|
Exception clarification for exact head |
<!-- markdownlint-disable MD041 --> ## Summary Close the high-severity npm audit gaps in the managed OpenClaw and mcporter production boundaries. This keeps the existing OpenClaw 2026.7.1 product scope and replaces only reviewed vulnerable dependency identities. PR #8126 is merged into this branch so San Dang and Apurv Kumaria retain their original root-remediation commits and authorship. ## Changes - Upgrade the OpenClaw locked runtime to `brace-expansion@5.0.9`, `fast-uri@3.1.5`, `undici@8.10.0`, and `ip-address@10.3.1` with exact registry URLs and SRI values. - Upgrade the mcporter lock to `fast-uri@3.1.5` and `ip-address@10.3.1` through exact manifest overrides. - Remediate Discord's direct and bundled `undici@8.5.0` across its manifest, shrinkwrap, `bundledDependencies`, and physical `node_modules` tree. - Fail closed when any reviewed source identity, dependency edge, engine, replacement archive, deterministic tree digest, or committed lock digest changes. - Update the security review records and regression contracts for the final advisory set and audit evidence. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [x] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [x] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: nine-category review completed on the exact diff; dependency provenance warnings are recorded below and no code-security blocker was found. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: no exception is currently recorded; required CI is authoritative on exact head `1d28516eac51effbd690f8bf1847e59571ac5118`. ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: `agents/openclaw/dependency-review.md`, `docs/security/openclaw-2026.7.1-dependency-review.md`, and `docs/security/sandbox-base-2026-07-25-dependency-review.md`; their content is unchanged from the exact head where `npm run docs` passed. The final doctor-boundary test passed 1/1, the load-timed-out setup test passed 1/1 in isolation, and normal pre-commit and commit-msg hooks passed. The final test-only hardening requires no additional documentation. - Agent: Codex Desktop <!-- docs-review-head-sha: 1d28516 --> <!-- docs-review-agents-blob-sha: 3dd7c24 --> ## Dependency Review | Concern | Verdict | Evidence | |---|---|---| | `brace-expansion@5.0.9` | PASS | Exact registry archive, SRI, corrected Node engine, source range, and deterministic lock/tree boundaries verified. | | `fast-uri@3.1.5` | WARNING | Full source range and exact BSD-3-Clause no-dependency archive verified; registry signature is valid, but the archive has no registry attestation. | | `undici@8.10.0` | WARNING | Exact MIT no-dependency archive, signatures, SLSA provenance, and source ranges verified. Upstream release CI had one flaky Node 24 test; 1,502 tests and the Node 22, types, lint, fuzz, release, and Scorecard lanes passed. NemoClaw's exact runtime tests and audit provide compensating proof. | | `ip-address@10.3.1` | WARNING | Full non-shallow `v10.2.0..v10.3.1` range, exact MIT no-dependency archive, two registry signatures, SLSA provenance, content-identical source build, and 3,571 upstream tests verified. The annotated tag is unsigned. | | Trusted lock transition | PASS | PR #8165 merged the governance-approved transition into `main`. The OpenClaw lock `759b31779f40867f35f15065b582eb1d3efb8fddb1fe43c207507c905fa2a421` and mcporter lock `962dee34f6b0a493521d1619d1cf030e2630cbdfce8bf0598217202f57078793` are now each the sole trusted `lockSha256`; temporary successor fields were removed. | Licenses remain compatible: MIT, BSD-3-Clause, and the existing graph licenses. No replacement adds a runtime dependency or lifecycle script. ## Security Review | Category | Verdict | Evidence | |---|---|---| | Secrets and Credentials | PASS | No secret-bearing values or credential paths changed; gitleaks passed. | | Input Validation and Data Sanitization | PASS | Archive paths, package identities, dependency edges, engines, bundled trees, deterministic tree hashes, and lock hashes reject drift. | | Authentication and Authorization | PASS | No authentication or authorization behavior changed. | | Dependencies and Third-Party Libraries | WARNING | Every affected production graph is outside the disclosed high-severity ranges; upstream signing and release-CI limitations are recorded in the concern ledger. | | Error Handling and Logging | PASS | Failures identify the exact source, replacement, tree, or lock boundary without exposing secrets. | | Cryptography and Data Protection | PASS | SHA-512 artifact integrity and SHA-256 lock binding remain mandatory; registry signatures and available provenance were verified. | | Configuration and Security Headers | PASS | Docker guards and reviewed-audit policy use the exact new locks; users, permissions, ports, and headers are unchanged. | | Security Testing | PASS | Source-shape rejection, physical bundled-tree replacement, deterministic tree integrity, installed-lock verification, registry audit, and signature checks passed. | | System Security | PASS | Managed images remove the high findings without weakening sandbox isolation or image hardening. | ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: - Station profile/scenario: - Result: - Supporting evidence: ## Verification - [x] PR description includes a `Signed-off-by:` line and every pushed commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run validate:pr` passed after refreshing `origin/main` when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set — 105/105 exact-head focused integration tests passed after merging #8165; 57/57 dependency and audit-documentation tests passed again after the final remote/main reconciliation. The package-contract probe also passed after increasing its Mac-local npm pack timeout from 90 to 120 seconds. - [ ] 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 reviewed dependency and integrity-boundary update; required CI remains authoritative. - [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) — 0 errors and 2 existing hidden Fern warnings. - [x] Doc pages follow the style guide (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Additional validation: - Exact Node 22.23.1 reviewed npm audit exited 0: - reviewed archive graph: 0 high, 0 critical, 13 moderate; - OpenClaw locked graph: 0 high, 0 critical, 7 moderate; - mcporter locked graph: 0 high, 0 critical, 1 moderate. - Registry signature checks completed for both locked graphs; mcporter reports 120/120 signed packages and 14 attestations. - `npm run build:cli`, `npm run typecheck:cli`, `npm run checks:repository`, focused documentation tests, and `npm run docs` passed. - Normal pre-commit and commit-message hooks passed, including Biome, hadolint, gitleaks, markdownlint, repository checks, and source/test budgets. - Live E2E was not run locally. Required image-build CI provides the platform-specific proof. - PR #8165 merged the base-trusted audit transition. This head removes the temporary successor hashes and retains each remediated lock as the sole trusted `lockSha256`. --- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Security** * Updated bundled and runtime dependencies to patched versions, including `brace-expansion`, `fast-uri`, `undici`, and `ip-address`. * Expanded protection for additional runtime and Discord-related dependencies. * Refreshed vulnerability reviews, integrity metadata, provenance records, and audit results. * **Bug Fixes** * Improved dependency validation and fail-closed checks for affected package versions. * **Tests** * Expanded coverage for patched packages, lockfile integrity, remediation behavior, and supply-chain validation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com> Co-authored-by: San Dang <sdang@nvidia.com> Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com> Co-authored-by: Apurv Kumaria <akumaria@nvidia.com> Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com> Co-authored-by: Aaron Erickson <aerickson@nvidia.com> Co-authored-by: Senthil Ravichandran <senthilr@nvidia.com>
Summary
Restrict each reviewed npm lock transition to its current digest and one optional replacement, then authorize the final OpenClaw and mcporter locks from #8156. This is the base-trusted bootstrap needed before the remediation PR can pass the reviewed npm audit gate.
Supersedes #8164.
Changes
lockSha256and optionalreplacementLockSha256fields.759b31779f40867f35f15065b582eb1d3efb8fddb1fe43c207507c905fa2a421.962dee34f6b0a493521d1619d1cf030e2630cbdfce8bf0598217202f57078793.The successor bytes were independently hashed from #8156 head
914d3471b561a5226cdf3b2bd8c776865ba9438d. After #8156 lands, promote each successor tolockSha256and remove its temporaryreplacementLockSha256.Type of Change
Quality Gates
d04bf1f7f36a8a54d4b593a35130e71e4bfde8d2; no blocker was found. The exact-head maintainer exception is recorded at fix(security): bound reviewed lock transition #8165 (comment).reviewed-npm-audit/ aggregatechecksfailure and unchanged image-build / downstream E2E failures. The rationale, limits, and removal condition are recorded at fix(security): bound reviewed lock transition #8165 (comment); the production npm audit remediation remains tracked by [Ubuntu 24.04][Security] npm audit --omit=dev reports 3 HIGH CVEs in production install (brace-expansion, fast-uri, js-yaml) #8116.Documentation Writer Review
no-docs-neededSecurity Review
DGX Station Hardware Evidence
Verification
Signed-off-by:line and every pushed commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed at exact headd04bf1f7f36a8a54d4b593a35130e71e4bfde8d2npm exec -- vitest run --project integration test/openclaw-locked-install.test.ts test/reviewed-npm-audit-workflow.test.tspassed, 23/23.npm run typecheck:cli,npm run checks:repository, andgit diff --checkalso passed.npm run docsbuilds without warnings (doc changes only)Signed-off-by: Julie Yaunches jyaunches@nvidia.com