Skip to content

ci(security): allow reviewed lock transitions - #8157

Merged
jyaunches merged 1 commit into
mainfrom
codex/allow-reviewed-openclaw-lock-transition
Aug 3, 2026
Merged

ci(security): allow reviewed lock transitions#8157
jyaunches merged 1 commit into
mainfrom
codex/allow-reviewed-openclaw-lock-transition

Conversation

@jyaunches

@jyaunches jyaunches commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Allow the trusted reviewed npm audit to recognize an explicitly reviewed lock transition.
This lets the current OpenClaw runtime lock and the pending brace-expansion@5.0.9 lock pass the same base-trusted policy without accepting any unreviewed lock bytes.

Related Issue

Prerequisite for #8156.

Changes

  • Advance the reviewed npm audit configuration to schema 3 and replace each single lock digest with a nonempty, unique list of reviewed digests.
  • Select the exact target lock digest only when it appears in that trusted list, then pass the selected digest through the existing strict source-lock and installed-package verification.
  • Temporarily list both the current and pending OpenClaw runtime lock digests; keep the mcporter graph restricted to its current digest.
  • Update focused contracts to cover accepted and rejected transition locks and the shared OpenClaw audit authority.

Type of Change

  • 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

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: This changes an internal base-trusted CI audit policy and no supported user-facing behavior.
  • 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: The exact-head review confirmed the trusted-base boundary remains intact, unlisted lock bytes fail closed, and both existing strict lock verifiers receive one exact selected digest.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: The schema transition is internal CI policy and does not change a supported API, CLI, user configuration, workflow, default, or user-facing error.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • 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
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: vitest focused integration tests passed, 22/22.
  • 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 this narrow audit-control change.
  • Quality Gates section completed with required justifications or waivers
  • 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)

Additional validation:

  • npm run source-shape:check passed.
  • npm run build:cli and npm run typecheck passed.
  • Biome, test title, and Vitest project membership checks passed.
  • Normal pre-commit and commit-message hooks passed.

Signed-off-by: Julie Yaunches jyaunches@nvidia.com

Summary by CodeRabbit

  • Security

    • Improved dependency audit verification to support multiple approved lockfile revisions.
    • Added stricter validation to detect unapproved or mismatched dependency lockfiles before and after installation.
    • Enhanced error reporting to clearly identify expected and actual lockfile checksums.
  • Tests

    • Expanded coverage for approved lockfile selection and checksum mismatch scenarios.

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches jyaunches added dependencies Pull requests that update a dependency file area: security Security controls, permissions, secrets, or hardening labels Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 16ef1e0d-2e77-4ddd-ae50-97df0fe66cf9

📥 Commits

Reviewing files that changed from the base of the PR and between f12ae8d and e7d2be9.

📒 Files selected for processing (4)
  • ci/reviewed-npm-audit.json
  • scripts/audit-reviewed-npm-graph.mts
  • test/openclaw-locked-install.test.ts
  • test/reviewed-npm-audit-workflow.test.ts

📝 Walkthrough

Walkthrough

The audit schema advances from version 2 to version 3. Locked graphs now store approved lockfile SHA-256 arrays. The workflow validates and selects the actual digest before installation and reuses it afterward. Tests cover matching and rejected digests.

Changes

Reviewed lock digest selection

Layer / File(s) Summary
Digest schema and audit metadata
scripts/audit-reviewed-npm-graph.mts, ci/reviewed-npm-audit.json
The schema advances to version 3. Locked graphs use nonempty, unique reviewedLockSha256 arrays with lowercase SHA-256 values. OpenClaw lists two digests, and mcporter lists one.
Lockfile digest selection and verification
scripts/audit-reviewed-npm-graph.mts
The workflow hashes lockfiles, selects an approved digest, reports expected and actual values on mismatch, and reuses the selected digest for pre-install and post-install verification.
Digest selection test coverage
test/openclaw-locked-install.test.ts, test/reviewed-npm-audit-workflow.test.ts
Tests cover array-based audit metadata, accepted reviewed digests, rejected digests, and temporary-file cleanup.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#8126: Modifies the same audit script and workflow tests for production dependency auditing.
  • NVIDIA/NemoClaw#8131: Extends the same reviewed npm graph auditing and lockfile verification logic.
  • NVIDIA/NemoClaw#8156: Updates the same audit metadata and OpenClaw lockfile digest approval fields.

Suggested labels: area: ci

Suggested reviewers: cv

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: allowing explicitly reviewed npm lockfile transitions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/allow-reviewed-openclaw-lock-transition

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

@github-code-quality

github-code-quality Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit e7d2be9 in the codex/allow-reviewed... branch remains at 96%, unchanged from commit c63e7eb in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit e7d2be9 in the codex/allow-reviewed... branch remains at 81%, unchanged from commit c63e7eb in the main branch.

Show a code coverage summary of the most impacted files.
File main c63e7eb codex/allow-reviewed... e7d2be9 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/sandbox...rce-identity.ts 88% 88% 0%
src/lib/state/m...-acquisition.ts 75% 75% 0%

Updated August 03, 2026 19:37 UTC

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: Partial review preserved 0 canonical finding(s) and 2 terminology decision(s) before the advisor stopped.

Model lanes

  • GPT-5.6 Terra (primary): Failed after a partial review · low confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions

Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate.

2 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • established — reviewed lock at test/reviewed-npm-audit-workflow.test.ts:52: Retain `reviewed lock`; it matches established repository security and installer terminology.
  • justified — dependency transition at test/reviewed-npm-audit-workflow.test.ts:52: Retain `dependency transition`; the modifier identifies the temporary two-digest policy case.

E2E guidance

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

Recommended E2E: None

Workflow run details

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

@jyaunches
jyaunches merged commit d756d15 into main Aug 3, 2026
72 of 78 checks passed
@jyaunches
jyaunches deleted the codex/allow-reviewed-openclaw-lock-transition branch August 3, 2026 19:42
@cv

cv commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Commit SHA e7d2be90d is not safe to merge as written.

The OpenClaw transition list authorizes fdbee91a3f3a0222ec2e8e34864d09dfcff4711e86ac6bfa4d475af0593acd51.
That digest belongs to a 5.0.9 lock entry with stale engines.node = "18 || 20 || >=22" metadata.
The published package uses 20 || >=22; the corrected reviewed lock digest is 847f68ac46f18d17efcd47dd3d8a5944b9dbcd205bc4d1e821ff82aa543eec20.

The arbitrary digest-array schema is also broader than the current one-successor transition requires.
A schema-2 lockSha256 plus one optional replacementLockSha256 keeps the current identity explicit, limits the temporary authority to one successor, and makes post-merge promotion and removal unambiguous.

The current reviewed-npm-audit failure is independently blocking: the base-owned audit still finds GHSA-rgw5-rvv9-x895 in the current OpenClaw lock.
This creates a circular gate with #8156 because the remediation cannot introduce its corrected lock until the transition authority is present in the base SHA.
Do not bypass or waive the failed security check.
The repository needs an explicit governance-approved bootstrap path before this prerequisite can merge.

After the technical contract changes, rerun the security and documentation reviews for the new commit SHA and update the PR description using repository vocabulary.

ericksoa added a commit that referenced this pull request Aug 3, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Persist managed-bootstrap mutation authority and image-owned
shared-state commit receipts so restart does not erase the facts needed
to prove, resume, or clean up one exact attempt. This slice remains
inert: it does not advertise or activate buildless support.

## Related Issue

Part of #7744.

## Changes

- Replace process-local Docker transaction and terminal state with
private, versioned, atomically written journal records and exact
commit/finalization receipts.
- Record provider, sandbox, plan, profile, immutable image, original and
replacement runtime identities, rollback target, preparation receipt,
and completion receipt.
- Keep durable journals identity-addressable in this slice;
unfinished-record enumeration and production phase reconciliation are
introduced together by the following recovery slice.
- Atomically convert image-owned shared-state backups into an
identity-bound durable commit receipt, reject post-commit rollback, and
clear the receipt only after external cleanup is proven.
- Preserve legacy null-identity commit and rollback CLI forms while
adding explicit identity-bound status, commit, rollback, and
receipt-cleanup forms.
- Cover OpenClaw, Hermes, and DCode persistence, restart reconstruction,
interrupted receipt compaction, exact cleanup, and ownership-reuse
defenses.
- Cover recreated-adapter rollback after committed terminal finalization
and reject same-timestamp phase mutations, closing the two valid
Nemotron coverage warnings.

## 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: Exact-tree
reconstruction review verified durable identity authority, image-owned
receipt semantics, provider neutrality, production dormancy, and the two
advisor-requested regression cases. Exact-head public advisors remain
part of the qualification wave.
- [x] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue: `reviewed-npm-audit` is
being handled on the separate #8156/#8157 security stream and is
explicitly waived as a blocker for this stack. Its consequential
same-repository `E2E / PR Gate` blockage is waived with it; the manual
gate override is fork-only and cannot dispatch for this maintainer
branch.

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: The final reconstruction preserves the reviewed
`src/lib/onboard/managed-bootstrap/README.md` semantics from prior exact
head `a3571b2fb794a6bf082f05146fb24096d448548e`: provider-neutral/MXC
dormancy, pre-/post-cutover distinctions, durable identity-addressed
journals, finalization records, the image-owned commit receipt, and the
following recovery boundary. The restack changes no documentation
behavior.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 3aa4ba6 -->
<!-- docs-review-agents-blob-sha:
3dd7c24 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- Merged parent: #8040 produced main commit
`35f59704af0b917e1453ea2ebdc7ce817a36fd1c`.
- Exact public head: `3aa4ba69335c37ec36721cec48f7b58cea9b8e6d`.
- Review scope: 11 paths, `+1,743/-120`.
- Stable patch ID: `76f455f1e0d0a6d9977b5fa65dd61357742bff09`.
- Binary diff SHA-256:
`27b3d940a6af0a1b610eb5b676d0decc763f7dc9700c5d32853475c0bd7875a4`.
- Advisor test anchor: signed+DCO commit
`0623bd054e12fa149635c60efa38a3281efc2050`, direct child of the prior
public head.
- Clean reconstruction: signed+DCO commit
`79fd30710d194b619fe579d3daa201fec10a38e5`, direct child of merged #8040
main with exact tree `7fd1887c4ec0051ae5250a66252ddf17ca7b9e66`.
- Append-only graft: signed+DCO commit
`3aa4ba69335c37ec36721cec48f7b58cea9b8e6d`, first parent the preserved
public head `a3571b2fb794a6bf082f05146fb24096d448548e`, second parent
the clean reconstruction, and the identical clean tree. No remote
history was rewritten.
- Durable refs: `backup/podman-stack/pr8041-tests-0623bd05`,
`backup/podman-stack/pr8041-clean-79fd3071`,
`backup/podman-stack/pr8041-graft-3aa4ba69`, and
`hold/podman-stack/pr8043-base-3aa4ba693`.
- Focused validation passed 7 files and 148 tests, including both
advisor-requested cases. CLI build, source and CLI typechecks, and Biome
passed.
- Later main movement `d756d15d867cdf91a90cad81971a8a29febe3002` is the
separate audit-transition PR #8157. Its four changed paths do not
overlap this 11-path slice, so no restack or retest is warranted solely
for that movement.
- Every new commit is SSH-signed and carries Aaron's DCO trailer.
- Production provider bootstrap remains unsupported; no user-visible
buildless or Podman activation is added.

## Stack

- Base: merged PR3.11 #8040.
- This slice: PR3.12A #8041, branch
`feat/managed-bootstrap-durable-transactions`, exact head
`3aa4ba69335c37ec36721cec48f7b58cea9b8e6d`.
- Next: PR3.12B #8043; its source remains protected and its new base is
`hold/podman-stack/pr8043-base-3aa4ba693`.
- Buildless and Podman support remain disabled until the complete
all-agent, multiarch, GPU/local-inference, recovery, installer, and
protected-E2E activation gates in #7744 pass.

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: security Security controls, permissions, secrets, or hardening dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants