fix(security): restrict reviewed lock transition - #8164
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe reviewed npm audit metadata changes from schema version 3 to version 2. Locked graphs now use primary and optional replacement lockfile digests. Validation, lock selection, metadata expectations, and workflow tests use the new fields. ChangesReviewed npm digest schema
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR Review Advisor — InformationalAdvisor assessment: Informational / low confidence Model lanes
Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: None 1 warning · 0 suggestionsWarningsWarnings do not block.
|
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
<!-- markdownlint-disable MD041 --> ## 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 - Keep schema 2 with required `lockSha256` and optional `replacementLockSha256` fields. - Reject a replacement digest that is invalid or duplicates the current digest, with driver-level regression coverage. - Authorize #8156's final OpenClaw successor `759b31779f40867f35f15065b582eb1d3efb8fddb1fe43c207507c905fa2a421`. - Authorize #8156's final mcporter successor `962dee34f6b0a493521d1619d1cf030e2630cbdfce8bf0598217202f57078793`. - Continue to accept only the current digest or its one exact successor and reject an unreviewed third digest. The successor bytes were independently hashed from #8156 head `914d3471b561a5226cdf3b2bd8c776865ba9438d`. After #8156 lands, promote each successor to `lockSha256` and remove its temporary `replacementLockSha256`. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] 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: - [ ] Docs updated for user-facing behavior changes - [x] Docs not applicable — justification: This changes an internal base-trusted CI audit policy and no supported user-facing behavior. - [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: Codex Desktop completed the nine-category security review at exact head `d04bf1f7f36a8a54d4b593a35130e71e4bfde8d2`; no blocker was found. The exact-head maintainer exception is recorded at #8165 (comment). - [x] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: exact-head acceptance covers the circular `reviewed-npm-audit` / aggregate `checks` failure and unchanged image-build / downstream E2E failures. The rationale, limits, and removal condition are recorded at #8165 (comment); the production npm audit remediation remains tracked by #8116. ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `no-docs-needed` - Evidence: The change updates internal reviewed-npm-audit lock authority and its test contracts; it does not change a user-visible product or contributor workflow. The committed diff matches the independently reviewed change set. - Agent: Codex Desktop documentation writer subagent <!-- docs-review-head-sha: d04bf1f --> <!-- docs-review-agents-blob-sha: 3dd7c24 --> ## 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 | SHA-256 syntax, current/successor inequality, exact graph identity, and third-digest rejection remain fail-closed. | | Authentication and Authorization | PASS | No authentication or authorization behavior changed. | | Dependencies and Third-Party Libraries | PASS | This PR selects no package version. Both successor lock bytes exactly match the independently reviewed #8156 head. | | Error Handling and Logging | PASS | Existing mismatch diagnostics remain bounded and contain no secrets. | | Cryptography and Data Protection | PASS | Exact SHA-256 lock binding remains mandatory; no cryptographic behavior is weakened. | | Configuration and Security Headers | PASS | Each graph permits only its current digest and one optional exact successor. | | Security Testing | PASS | Current, successor, invalid, duplicate, legacy, and unreviewed-third-digest cases are covered. | | System Security | PASS | No sandbox, privilege, network, process, or image-hardening behavior changes. | ## 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 at exact head `d04bf1f7f36a8a54d4b593a35130e71e4bfde8d2` - [x] Targeted behavior tests pass for the current change set — `npm exec -- vitest run --project integration test/openclaw-locked-install.test.ts test/reviewed-npm-audit-workflow.test.ts` passed, 23/23. `npm run typecheck:cli`, `npm run checks:repository`, and `git diff --check` also passed. - [ ] Applicable broad gate passed — command/result: not applicable to this focused four-file audit-policy update; exact targeted, repository, type, hook, and required CI evidence is recorded above. - [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) - [ ] Doc pages follow the style guide (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> --------- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com> Co-authored-by: Senthil Ravichandran <senthilr@nvidia.com>
Summary
Restricts the reviewed npm lock transition introduced by #8157 to one explicit successor. The trusted audit configuration now authorizes the current OpenClaw lock plus only the corrected 5.0.9 lock digest required by #8156.
Changes
lockSha256and one optionalreplacementLockSha256.fdbee91a...transition digest with847f68ac..., produced by the publishedbrace-expansion@5.0.9metadata (engines.node = "20 || >=22").847f68ac...lock, promote that digest tolockSha256and removereplacementLockSha256in the same change.This is a prerequisite correction for #8156 and a follow-up to #8157.
Type of Change
Quality Gates
778b8f2b7found no code vulnerability and confirmed the transition is limited to one distinct successor. Merge remains blocked on the bootstrap approval below.reviewed-npm-auditmust remain blocking until a security maintainer approves an explicit bootstrap path.Security Review
Verdict: WARNING. The exact-head code correction is security-preserving, but this PR is not ready to merge until a security maintainer approves an explicit bootstrap path for the circular
reviewed-npm-auditfailure. Do not bypass or waive that failed audit.GHSA-rgw5-rvv9-x895; governance approval is required to bootstrap this prerequisite without weakening the audit gate.Files reviewed:
ci/reviewed-npm-audit.json,scripts/audit-reviewed-npm-graph.mts,test/openclaw-locked-install.test.ts, andtest/reviewed-npm-audit-workflow.test.ts.Documentation Writer Review
no-docs-neededDGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablevitest run --project integration test/openclaw-locked-install.test.ts test/reviewed-npm-audit-workflow.test.ts: 22 tests passed; source-shape check passed.npm run docsbuilds without warnings (doc changes only)Signed-off-by: Julie Yaunches jyaunches@nvidia.com