fix(ci): pass reviewed audit evidence to protected builds - #11370
Conversation
Run the existing trusted audit action before the offline protected build. Verify the candidate graph with trusted policy and pass the receipt, raw report, and policy result through the existing BuildKit secret interface. Refs #11088. Prerequisite for protected qualification of #11156. Signed-off-by: San Dang <sdang@nvidia.com>
Consume #11356 from main; retain the protected audit handoff and resolve the type-stripping fixture overlap. Signed-off-by: San Dang <sdang@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 (7)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughWalkthroughThe protected runtime workflow now runs a reviewed npm audit against the candidate checkout. The build script validates the resulting evidence and passes it to OpenClaw builds as secrets and hashes. Boundary and build tests cover the new enforcement. ChangesProtected image audit enforcement
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ProtectedRuntime as Protected runtime workflow
participant NpmAudit as Reviewed npm audit action
participant BuildScript as Protected image build script
participant OpenClaw as OpenClaw build
ProtectedRuntime->>NpmAudit: Audit .candidate-runtime
NpmAudit-->>ProtectedRuntime: Write reviewed audit evidence
ProtectedRuntime->>BuildScript: Pass audit evidence directory
BuildScript->>BuildScript: Verify receipt, report, policy, and hashes
BuildScript->>OpenClaw: Pass evidence secrets and digest arguments
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Protected image builds now carry validated reviewed npm-audit evidence into offline builds, with failure paths covered before image construction. No concrete current-head merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 6 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit 800053e in the TypeScript / code-coverage/cliThe overall line coverage in commit 800053e in the Updated |
|
PR Review Advisor finished for commit |
|
Validation and Advisor disposition for
Architecture, migration, reduction, and verification report one shared concern: main's Dockerfile does not consume the policy-result secret and hash. That observation is correct for main's Dockerfile, but the proposed removal does not apply to this prerequisite's declared consumer. The trusted controller builds Disposition: retain the policy-result input for this existing companion consumer. Do not copy its Dockerfile migration into the prerequisite, remove a required input, or add another test scenario. The trusted controller still verifies the receipt, raw report, candidate graph, and current policy before Docker. The five other specialists found no actionable issue. No production repair is accepted from this Advisor run. Protected GPU/local-inference acceptance is still pending. These CI/MCP results do not substitute for Local validation's temporary container and downloaded image were removed and their absence confirmed. Temporary SDK archives and the validator download were removed. The source worktree and bounded evidence are retained; unrelated local changes are untouched. |
VerdictNo actionable correctness or security findings in PR #11370 at commit The change fits its role as a prerequisite for #11156: trusted workflow code audits the candidate, the trusted controller verifies the evidence, and BuildKit receives it for the offline build. Merge readiness remains pending while CI completes. Findings TableNo findings requiring changes within the reviewed diff. Detailed AnalysisThese verdicts reflect static review of the implementation and test coverage. No tests or E2E runs were executed during this review.
The policy-result input has a concrete consumer in #11156’s helper, which requires all three evidence files and both hashes. Its absence from main’s current Dockerfile is therefore not a reason to remove this prerequisite’s handoff. At the review snapshot, no checks had failed, but some CLI shards and managed-image jobs were still running. Protected GPU/local-inference acceptance for #11156 remains pending after this prerequisite reaches trusted main. Ordinary image-build or startup results do not replace that acceptance. |
## Outcome Protected managed-image builds can verify supplied mcporter audit evidence before the offline rebuild. ## Reason The trusted controller passes `--legacy-npmjs`, but the verifier accepts only `--legacy-audit`. It rejects valid evidence with `verifier arguments has unexpected or missing keys` before Docker starts. Manual PR E2E uses this controller from `main`, so repairing the candidate copy cannot unblock GPU qualification. ### Related issues Refs #11088. Prerequisite for #11156, following #11370. ## Changes Replace the obsolete verifier flag with the supported name. One line changes; no new mechanism or test scenario. ## Verification - Executed the controller's evidence-validation function with a valid receipt and the real verifier: main exited 1; the one-line fix exited 0 and produced a clean policy result. - Existing controller and receipt tests: 46 passed. - `npm run validate:pr`: passed on `615eb8afdc9906d22d8eb360b33380122780aad4` against canonical main `189043e740fdab61c8c3fdf6fe9407f438e4d955`. - No secrets, API keys, or credentials are in the diff. ## Review notes Self-review covered `scripts/checks/build-protected-managed-images.sh` at `615eb8afdc` in NVIDIA/NemoClaw. Validation used an unprivileged Node 22.23.2 Linux container without host mounts, credentials, or a Docker socket. Independent review is pending. The GPU target remains owned by #11156. --- Signed-off-by: San Dang <sdang@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated audit receipt verification to use the correct legacy audit option, improving compatibility with protected managed image checks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: San Dang <sdang@nvidia.com>
Outcome
Supply verified mcporter audit evidence to the offline protected image build. This prerequisite lets trusted-main E2E exercise #11156 without executing its candidate workflow as trusted code.
Reason
The protected rebuild uses
--network noneand--no-cache, but its controller does not supply audit evidence. OpenClaw therefore attempts a live npm audit without network access.The failed protected job returned exit 1,
EAI_AGAIN, 206 bytes, andmetadata:missingon both attempts. Both responses had SHA-2562ca8dc3553861955190f44adaa5ed386851b1c217d7e5084d6bc150ddb8623b4. Runtime qualification did not run. This is separate from the receipt-identity failure fixed by #11069.Related issues
Refs #11088. Prerequisite for #11156, which owns the complete fix and protected-runtime acceptance.
Changes
The seven-file diff is +234/-7. The build path changes only the workflow handoff and its controller. The remaining changes protect that boundary. Main's merged CI memory fix (#11356) is consumed without duplication.
Verification
npm run build:cliandnpm --prefix nemoclaw run build: passed.npm exec -- vitest run --project package-contract test/package-contract/managed-image-registry-transport.test.ts: one test passed.NODE_OPTIONS=--max-old-space-size=5120 npm run validate:pr: passed atd2c864d4accfacdfe6825ded68d12e9b3fc7b462against canonical main270275f2a2b31a70fa72692d2ec304b5dffe8ee3. No tracked file changed.Focused test command
npm exec -- vitest run --project integration \ test/platform/images/protected-managed-image-build-script.test.ts \ test/automation/releases/reviewed-npm-audit.test.ts \ test/automation/releases/npm-audit-receipt.test.ts \ test/automation/releases/reviewed-npm-audit-handoff.test.ts \ test/automation/releases/reviewed-npm-audit-workflow.test.ts \ test/automation/releases/reviewed-npm-audit-cache-key.test.ts \ --project e2e-support \ test/e2e/support/e2e-operations-workflow-boundary.test.ts \ test/e2e/support/managed-image-protected-runtime-workflow.test.ts \ test/e2e/support/hermes-workflow-boundary.test.ts \ test/e2e/support/jetson-workflow-boundary.test.ts \ test/e2e/support/staging-brev-launchable-identity-workflow-boundary.test.ts \ test/e2e/support/shared-e2e-workflow-boundary.test.ts --reporter=defaultValidation used pinned Node.js 22.23.2 and verified npm 10.9.4 in an unprivileged Linux container without host mounts, credentials, or a Docker socket. Signed candidate
d2c864d4accfacdfe6825ded68d12e9b3fc7b462has the same source tree as the hook-tested isolated commit. The CI memory setting comes from merged #11356.No secrets, API keys, or credentials are in the diff. Incomplete, invalid, or unaccepted high-severity audit results still fail closed. Completeness checks, exception policy, raw-report and receipt integrity, registry selection, and retry bounds are unchanged. No broad-suite or protected-runtime pass is claimed.
Review notes
Self-review covered all seven paths at
d2c864d4accfacdfe6825ded68d12e9b3fc7b462in NVIDIA/NemoClaw. Sensitive paths are.github/workflows/e2e.yaml,scripts/checks/build-protected-managed-images.sh, and the two changedtools/e2e/validators. Their independent review remains pending. Changed validators ran only in the approved credential-free environment; this is not independent security approval.Protected GPU/local-inference acceptance remains pending. This prerequisite must enter trusted main through normal review and merge gates before dispatching
jobs=managed-image-protected-runtimefor #11156. MCP or image-startup results do not substitute for that job. No CI waiver is claimed.The controller's private policy result follows its existing exit/signal cleanup. No protected registry, builder, container, image, or credential file was created by the local tests; Docker commands in controller tests are stubbed.
Signed-off-by: San Dang sdang@nvidia.com
Summary by CodeRabbit