Skip to content

fix(security): keep Sigstore audit out of image builds - #8927

Merged
prekshivyas merged 3 commits into
mainfrom
codex/fix-8925-sigstore-egress
Aug 13, 2026
Merged

fix(security): keep Sigstore audit out of image builds#8927
prekshivyas merged 3 commits into
mainfrom
codex/fix-8925-sigstore-egress

Conversation

@apurvvkumaria

@apurvvkumaria apurvvkumaria commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Restricted OpenClaw sandbox image builds no longer contact Sigstore while installing the committed mcporter graph, so denied TUF egress cannot abort onboarding or rebuild.
Registry-signature verification remains fail closed in trusted CI for the committed lock, including every merge and image-publication path.

Related Issue

Fixes #8925

Changes

  • Remove the duplicate npm audit signatures request from Dockerfile and Dockerfile.base while retaining exact lock, registry origin, integrity, installed-graph, lifecycle, runtime, and reviewed-advisory checks.
  • Advance protected OpenClaw base provenance to schema=4 and mcporter-recipe=locked-ci+reviewed-audit-v3 so older base markers cannot cross the updated control boundary.
  • Add a trusted audit from the base branch that evaluates dependency files from the commit under review before the managed-image PR workflow can build locally or publish a same-repository digest.
  • Restrict installed-runtime reuse to digest-pinned bases in the official GHCR namespace. Local, custom, and mutable-tag markers cannot substitute for trusted-CI signature evidence.
  • Add regression coverage for image-build egress, committed-lock CI signature verification, provenance reuse, corporate CA ordering, and all merge and publication dependencies.
  • Document the image-build, trusted-CI, publication, and base-reuse responsibilities in the OpenClaw dependency review and corporate CA guide.

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:
  • 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: Codex Desktop reviewed all nine security categories after the review fix and reported PASS with no findings. Exact lock, integrity, lifecycle, advisory, signature, provenance, base-identity, and publication controls remain fail closed.
  • 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: docs-updated
  • Evidence: Updated docs/security/configure-corporate-ca-trust.mdx and agents/openclaw/dependency-review.md to separate package provenance from CI signature evidence and explain the digest-pinned base-reuse boundary. npm run docs passed at the final commit with zero errors and two existing Fern warnings.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit: Not applicable
  • Station profile/scenario: Not applicable; scripts/prepare-dgx-station-host.sh is unchanged.
  • Result: Not applicable
  • Supporting evidence: Not applicable

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 — Nine integration files passed 141 tests at 27c375e. Documentation, project-boundary, source-shape, title, size, Dockerfile lint, type-check, formatting, and secret-scan checks passed.
  • Applicable broad gate passed — npm test encountered unrelated host-specific WSL, Homebrew trust, process, and filesystem failures. Required GitHub CI is the authoritative broad gate and must pass before merge.
  • 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) — the build passed with zero errors and two existing Fern warnings.
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Apurv Kumaria akumaria@nvidia.com

Summary by CodeRabbit

  • Security

    • Strengthened dependency auditing and registry trust verification during pull requests and managed image builds.
    • Restricted reusable base images to verified, digest-pinned sources.
    • Improved provenance metadata and rejected unauthenticated or mutable base images.
  • Documentation

    • Added guidance for corporate CA trust, dependency verification, image publication gating, and base-image requirements.
  • Tests

    • Expanded coverage for audit enforcement, provenance validation, trusted base reuse, certificate setup, and dependency installation safeguards.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria apurvvkumaria added area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression labels Aug 12, 2026
@apurvvkumaria apurvvkumaria self-assigned this Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 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: 98f1e730-ef39-4f17-9d4e-bc0eb2284280

📥 Commits

Reviewing files that changed from the base of the PR and between 27c375e and 9435084.

📒 Files selected for processing (1)
  • docs/security/configure-corporate-ca-trust.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/security/configure-corporate-ca-trust.mdx

📝 Walkthrough

Walkthrough

The PR adds a pull-request-only reviewed npm audit gate for managed images. It removes duplicate npm audit signatures calls from image builds, updates provenance metadata, restricts trusted-base reuse, and expands policy, documentation, and regression tests.

Changes

Reviewed npm audit boundary

Layer / File(s) Summary
Trusted CI audit gating
.github/workflows/managed-images.yaml, test/managed-image-publication-workflow.test.ts, test/mcporter-supply-chain.test.ts
The workflow checks out exact candidate and trusted-base commits, runs the reviewed npm audit, and gates the managed-image build. Tests validate the workflow and reviewed mcporter-runtime graph metadata.
Image-build and provenance updates
Dockerfile, Dockerfile.base, test/fetch-guard-patch-regression.test.ts, test/openclaw-dependency-review.test.ts, test/openclaw-integrity-pin-suite.ts, test/openclaw-locked-install.test.ts
Image builds no longer run npm audit signatures. Provenance uses schema 4 and recipe locked-ci+reviewed-audit-v3. Digest-pinned official GHCR bases are required for trusted reuse.
Policy, trust, and regression contracts
agents/openclaw/dependency-review.md, docs/security/configure-corporate-ca-trust.mdx, ci/source-shape-test-budget.json, test/corporate-ca-build-tls-anchor.test.ts
Policy and documentation define trusted-CI verification, publication gates, base-image restrictions, and build-time CA requirements. Tests verify trust setup before runtime dependency installation and reject the removed command.

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

Mergeability Score: ⚪ Minimal · up to 94350

The change removes Sigstore access from restricted image builds while retaining fail-closed verification in trusted CI and adding regression coverage. No actionable merge-blocking risk remains beyond normal required checks.

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant CIWorkflow
  participant ReviewedAudit
  participant ManagedImageBuilder
  participant Provenance
  PullRequest->>CIWorkflow: open or update PR
  CIWorkflow->>ReviewedAudit: verify exact lock and signatures
  ReviewedAudit-->>CIWorkflow: pass or fail audit result
  CIWorkflow->>ManagedImageBuilder: build after audit passes
  ManagedImageBuilder->>Provenance: record schema 4 and reviewed-audit recipe
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 describes the primary change: removing Sigstore audit requests from image builds.
Linked Issues check ✅ Passed The changes satisfy #8925 by removing image-build signature audits while preserving trusted CI gates, provenance controls, reuse restrictions, documentation, and regression tests.
Out of Scope Changes check ✅ Passed The workflow, Dockerfile, provenance, documentation, and test changes directly support the requirements in #8925.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-8925-sigstore-egress

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

@github-code-quality

github-code-quality Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 9435084 in the codex/fix-8925-sigst... branch remains at 96%, unchanged from commit 672b9ec in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 9435084 in the codex/fix-8925-sigst... branch remains at 82%, unchanged from commit 672b9ec in the main branch.

Show a code coverage summary of the most impacted files.
File main 672b9ec codex/fix-8925-sigst... 9435084 +/-
src/lib/state/registry/lock.ts 48% 39% -9%
src/lib/messagi...annel-config.ts 99% 92% -7%
src/lib/messagi.../token-paste.ts 96% 92% -4%
src/lib/onboard...age/contract.ts 93% 89% -4%
src/lib/securit...ate-endpoint.ts 97% 94% -3%
src/lib/state/registry.ts 89% 87% -2%
src/lib/adapter...tp/curl-args.ts 99% 97% -2%
src/lib/adapters/http/probe.ts 92% 91% -1%
src/lib/policy/index.ts 68% 68% 0%
src/lib/policy/...ne-exclusion.ts 87% 92% +5%

Updated August 12, 2026 23:58 UTC

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions

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 · 0 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized terminology decisions differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 fewer warning, the same number of suggestions.
7 terminology differences from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • digest-pinned base at Dockerfile:815: primary classified it as justified; the second opinion classified it as established.
  • registry-backed at Dockerfile:680: selected only by the second-opinion lane as established.
  • reviewed-npm-audit at .github/workflows/managed-images.yaml:19: selected only by the second-opinion lane as established.
  • Sigstore at agents/openclaw/dependency-review.md:68: selected only by the second-opinion lane as established.
  • trusted-CI at Dockerfile:814: selected only by the second-opinion lane as established.
  • package provenance at Dockerfile:808: selected only by the second-opinion lane as define.
  • CI_GATED_BASE_IMAGE at Dockerfile:897: selected only by the second-opinion lane as define.
1 additional E2E selection from the second opinion

Advisory only. The primary lane did not select these E2E jobs or targets.

  • rebuild-hermes-stale-base: The completed second-opinion lane identified E2E coverage that the primary lane omitted.

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

3 semantic terminology decisions

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

  • justified — digest-pinned base at Dockerfile:815: Use digest-pinned base when immutable image identity is required; otherwise use base image.
  • define — independent CI attestation at agents/openclaw/dependency-review.md:79: Define the term on first use as trusted-CI signature verification evidence associated with the official base-image publication path.
  • established — trusted reviewed npm audit at .github/workflows/managed-images.yaml:69: Keep the established term for the base-revision audit implementation and candidate dependency-input boundary.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite for the commit under review.

Recommended E2E: None

Manual-only E2E: cloud-onboard, full-e2e, managed-image-multiarch-startup
The manual PR workflow does not run these selectors for the commit under review. Run them from reviewed code on main.

1 optional E2E recommendation
  • rebuild-openclaw
1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Add restricted-egress rebuild coverage for the stale-base reinstall path

  • Location: Dockerfile:814
  • Category: tests
  • Problem: The changed image-build path removes the Sigstore signature request from the mcporter reinstall branch, but no runtime test denies Sigstore TUF egress while permitting registry access.
  • Impact: A future change can restore the Sigstore request or introduce another TUF dependency without static tests proving that a restricted-egress rebuild completes.
  • Recommendation: Extend the existing rebuild-openclaw live scenario to deny tuf-repo-cdn.sigstore.dev while allowing registry.npmjs.org, force stale base provenance, and verify the rebuild completes with the locked mcporter graph.
  • Verification: Inspect test/e2e/live/rebuild-openclaw.test.ts and its network-policy fixture for a case that denies the Sigstore TUF host during the stale-base rebuild.
  • Test coverage: A rebuild-openclaw live test that uses stale base provenance, permits npm registry access, denies tuf-repo-cdn.sigstore.dev, and verifies successful locked mcporter installation.
  • Simplification (native): Remove Do not add a new E2E runner or workflow job.; use Add one scenario to the existing rebuild-openclaw live test.. Net: 0 lines.
  • Keep: The scenario must retain real Docker, network-policy, and rebuild lifecycle enforcement.
  • Evidence: Dockerfile:814 documents that the final image must reinstall locked runtimes when local or mutable bases lack independent CI publication evidence. test/mcporter-supply-chain.test.ts:217 asserts that image Dockerfiles do not contain `mcporter-runtime audit signatures`. test/e2e/live/rebuild-openclaw.test.ts:341 exercises the real old-base OpenClaw rebuild lifecycle, but contains no Sigstore or tuf-repo-cdn restricted-egress case.

Workflow run details

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

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Dockerfile (1)

877-890: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Separate trusted-CI attestation from the base provenance marker.

Dockerfile.base writes the marker without running npm audit signatures, but Dockerfile accepts a matching marker from nemoclaw-sandbox-base-local as sufficient to reuse the reviewed base. Remove local references from this reuse path, or require an independently verified CI attestation. Treat schema=4 and mcporter-recipe=locked-ci+reviewed-audit-v3 as package and audit metadata, not signature evidence.

🤖 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 `@Dockerfile` around lines 877 - 890, Separate trusted CI signature attestation
from the provenance fields emitted by the Dockerfile marker. In the base-image
reuse validation, do not accept a matching marker from
nemoclaw-sandbox-base-local unless it includes an independently verified CI
attestation; remove local-marker acceptance otherwise. Treat schema=4 and
mcporter-recipe=locked-ci+reviewed-audit-v3 only as package and audit metadata,
not signature evidence.
🤖 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.

Outside diff comments:
In `@Dockerfile`:
- Around line 877-890: Separate trusted CI signature attestation from the
provenance fields emitted by the Dockerfile marker. In the base-image reuse
validation, do not accept a matching marker from nemoclaw-sandbox-base-local
unless it includes an independently verified CI attestation; remove local-marker
acceptance otherwise. Treat schema=4 and
mcporter-recipe=locked-ci+reviewed-audit-v3 only as package and audit metadata,
not signature evidence.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7769461e-b3e2-4011-8214-937464385f84

📥 Commits

Reviewing files that changed from the base of the PR and between 7c721ae and e0a1722.

📒 Files selected for processing (13)
  • .github/workflows/managed-images.yaml
  • Dockerfile
  • Dockerfile.base
  • agents/openclaw/dependency-review.md
  • ci/source-shape-test-budget.json
  • docs/security/configure-corporate-ca-trust.mdx
  • test/corporate-ca-build-tls-anchor.test.ts
  • test/fetch-guard-patch-regression.test.ts
  • test/managed-image-publication-workflow.test.ts
  • test/mcporter-supply-chain.test.ts
  • test/openclaw-dependency-review.test.ts
  • test/openclaw-integrity-pin-suite.ts
  • test/openclaw-locked-install.test.ts

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator Author

Addressed the supply-chain review finding.\n\n- The base provenance marker now records package and advisory metadata only. It does not authorize runtime reuse by itself.\n- The final image reuses an installed OpenClaw and mcporter runtime only from a digest-addressed base in the official GHCR namespace.\n- Local bases, custom bases, and mutable official tags reinstall the locked runtimes. A newer incompatible base still fails closed.\n- Regression coverage exercises local, bare-local, mutable-tag, custom, malformed-marker, version-mismatch, and digest-addressed official-base paths.\n\nSecurity review covered all nine repository categories. The change adds no secret, credential, input, authorization, cryptographic primitive, privilege, or network-policy behavior. It narrows an existing trust decision and preserves the required CI signature gate.\n\nValidation:\n\n- affected supply-chain and workflow suites: 8 files, 124 tests passed\n- CLI type-check and repository checks passed\n- all pre-commit hooks passed, including Dockerfile lint, secret scan, source-shape, and test-size checks\n- documentation build passed with zero errors and two existing Fern warnings\n- the latest PR commit is Verified and includes the DCO sign-off\n\nFresh repository checks and human review remain required.

@apurvvkumaria
apurvvkumaria enabled auto-merge (squash) August 13, 2026 00:06
@prekshivyas
prekshivyas disabled auto-merge August 13, 2026 00:15
@prekshivyas
prekshivyas enabled auto-merge (squash) August 13, 2026 00:18
@prekshivyas
prekshivyas merged commit a504d67 into main Aug 13, 2026
80 checks passed
@prekshivyas
prekshivyas deleted the codex/fix-8925-sigstore-egress branch August 13, 2026 00:22
@coderabbitai coderabbitai Bot mentioned this pull request Aug 13, 2026
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sandbox rebuild aborts when Sigstore TUF is blocked by restricted egress

2 participants