Skip to content

build: add attested enclave rootfs artifacts - #8688

Merged
lpcox merged 5 commits into
mainfrom
lpcox-build-attested-enclave-rootfs
Sep 17, 2026
Merged

lpcox merged 5 commits into
mainfrom
lpcox-build-attested-enclave-rootfs

Conversation

@lpcox

@lpcox lpcox commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • build distinct hardened script and agent Cloud Hypervisor rootfs images from the audited enclave container stages without changing the existing container images or primary-agent artifact bundle
  • publish a closed role-specific manifest, installed-package SPDX SBOMs, per-rootfs provenance bundles, and stable release assets
  • add fail-closed setup/cache verification and host preflight for role, compatibility, filename, size, digest, UID/GID, entrypoint, source-image, SBOM, and signer identity
  • retain the existing terminal rejection for custom Cloud Hypervisor enclave image overrides and leave manager/runner integration to the separate follow-up issues

Validation

  • full Jest suite: 366 suites / 5,918 tests
  • TypeScript build and type-check
  • ESLint and Markdown lint
  • Bash syntax and ShellCheck
  • provenance/security diff review

Fixes #8680

Build hardened script and agent rootfs images from the audited enclave container stages, publish role-bound manifests, SBOMs, and provenance, and add fail-closed setup cache verification.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings September 17, 2026 04:24
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-8688 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit ef22283

Comment on lines +102 to +105
assert_trusted_file "$rootfs" "$role enclave rootfs"
assert_trusted_file "$provenance" "$role enclave rootfs provenance"
assert_trusted_file "$sbom" "$role enclave rootfs SBOM"
verify_attestation "$rootfs" "$provenance"
Comment on lines +69 to +71
assert_trusted_file "$manifest" "enclave artifact manifest"
assert_trusted_file "$manifest_bundle" "enclave artifact manifest bundle"
verify_attestation "$manifest" "$manifest_bundle"
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 94.19% 94.14% 📉 -0.05%
Statements 92.87% 92.83% 📉 -0.04%
Functions 93.48% 93.51% 📈 +0.03%
Branches 86.72% 86.66% 📉 -0.06%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)
✨ New Files (1 files)
  • src/cloud-hypervisor/enclave-artifact-manifest.ts: 82.9% lines

Coverage comparison generated by scripts/ci/compare-coverage.ts

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Cache verification does not enforce the closed schema, and the PR incorrectly closes #8680 despite leaving its workload-profile requirements unimplemented.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Adds attested, role-specific Cloud Hypervisor enclave rootfs release artifacts with verification and documentation.

Changes:

  • Builds hardened script and agent rootfs images with SPDX SBOMs.
  • Adds signed manifests, provenance bundles, cache verification, and release assets.
  • Extends CI preflight and artifact validation.
File Description
src/​cloud-hypervisor/​enclave-artifact-manifest.ts Defines and validates the closed manifest.
src/​cloud-hypervisor/​enclave-artifact-manifest.test.ts Tests manifest validation.
scripts/​ci/​cloud-hypervisor-host-preflight.sh Verifies enclave artifacts during preflight.
scripts/​ci/​cloud-hypervisor-enclave-artifacts.test.ts Tests artifact scripts and workflow wiring.
guest/​cloud-hypervisor/​verify-test-artifacts.sh Verifies generated rootfs contents and metadata.
guest/​cloud-hypervisor/​setup-enclave-artifacts.sh Downloads and verifies release artifacts.
guest/​cloud-hypervisor/​generate-enclave-rootfs-sbom.mjs Generates role-specific SPDX SBOMs.
guest/​cloud-hypervisor/​build-test-artifacts.sh Builds hardened enclave rootfs artifacts.
docs/​cloud-hypervisor-foundation.md Documents artifact trust and release flow.
docs/​awf-config-spec.md Documents runtime gating and role paths.
.github/​workflows/​test-cloud-hypervisor.yml Builds and attests artifacts in CI.
.github/​workflows/​release.yml Publishes stable attested release assets.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

fi

for tool in curl sha256sum tar make gcc ld mke2fs e2fsck go docker sudo; do
for tool in curl sha256sum tar make gcc ld mke2fs e2fsck go node docker sudo getcap setcap; do
Comment on lines +73 to +78
[ "$(jq -r '.schemaVersion' "$manifest")" = 1 ] \
|| { echo "unsupported enclave artifact manifest schema" >&2; return 1; }
[ "$(jq -r '.artifactType' "$manifest")" = \
awf-cloud-hypervisor-enclave-rootfs-set ] \
|| { echo "unexpected enclave artifact manifest type" >&2; return 1; }
[ "$(jq -r '.architecture' "$manifest")" = "$ARCHITECTURE" ] \
Comment on lines +183 to +185
Cloud Hypervisor enclave execution remains fail-closed until the other ADR 0002
host-executor gates are implemented, and custom enclave image overrides remain
unsupported.
@lpcox

lpcox commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot address review feedback

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@copilot address review feedback

Addressed in af52674 (on top of b8db917):

  • verify_cache now fails closed: assert_trusted_file/verify_attestation calls have explicit || return 1 at both the manifest level and per-role loop, so a poisoned cache or failed attestation can no longer be silently ignored under if ! verify_cache.
  • Added assert_closed_keys and applied it to the manifest, release, compatibility, rootfs, per-role entries, and per-role sbom objects to reject unexpected keys.
  • Added the missing jq prerequisite check to build-test-artifacts.sh.
  • Left the "Fixes Generalize Cloud Hypervisor manager profiles for enclave workloads #8680" wording in the PR description as-is per feedback — flagging that this PR only covers artifact build/publish/verify and does not implement the ADR 0002 host-executor gates, so the closing keyword should be adjusted by whoever merges.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@lpcox
lpcox enabled auto-merge (squash) September 17, 2026 04:41
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Generated by Build Test Suite for #8688

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Gemini reports failed. Facets need polishing...

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Claude passed

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.anthropic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by Smoke Claude for #8688

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • msfeed25.pkgs.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "msfeed25.pkgs.visualstudio.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Docker Sbx reports failed. Our correspondents are investigating the incident...

📰 BREAKING: Report filed by Smoke Docker Sbx

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

❌ Smoke Gemini reports failed. Facets need polishing...

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Claude passed

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.anthropic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by Smoke Claude for #8688

@github-actions

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (github.com) reachable — allowed=200
✅ Blocked domain (example.com) denied — CONNECT tunnel failed, 403

Overall: PASS

@lpcox

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Engine Validation

  • ✅ GitHub MCP connectivity (list_pull_requests)
  • ✅ GitHub.com connectivity (HTTP 200)
  • ✅ File write/read test

Recent merged PRs:

Overall: PASS

cc @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Copilot BYOK Smoke Test Results

✅ GitHub MCP connectivity - PR list verified
✅ GitHub.com connectivity - HTTP 200
✅ File write/read test - File exists and readable
✅ BYOK inference test - Direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com

Status: PASS — Running in direct BYOK mode.

PRs tested: #8687, #8686 (by @lpcox)

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Status
API ✅ PASS
gh CLI ✅ PASS
File ✅ PASS

Overall result: PASS

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.anthropic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by Smoke Claude for #8688 · claude · haiku45 · 55.2 AIC · ⊞ 4.5K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

📡 Smoke Test: API Proxy OTEL Tracing — Results

# Scenario Result
1 Module Loading ✅ otel.js loads; isEnabled() → true; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled, plus internal helpers
2 Test Suite ✅ 68/68 tests passed across otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js
3 Env Var Forwarding ✅ env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID to agent; api-proxy-env-config.ts forwards GH_AW_OTLP_ENDPOINTS, OTEL_EXPORTER_OTLP_ENDPOINT, trace ID, and span ID to api-proxy
4 Token Tracker Integration ✅ token-tracker-http.js exposes onUsage callback as the OTEL hook point
5 OTEL Diagnostics ⚪ No span/token-usage log files found (no live API-proxy traffic was generated during this run — expected since no LLM calls were proxied in this smoke test)

Summary: All static/unit-level checks passed (module load, 68 tests, env-var wiring, token-tracker hook). No runtime span export could be observed since this workflow didn't drive actual api-proxy traffic — this is expected, not a regression.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Services Connectivity

  • Redis PING: ✅ (PONG)
  • PostgreSQL pg_isready: ✅ (accepting connections)
  • PostgreSQL SELECT 1: ✅ (1)

Overall: PASS

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia ✅ 1/1 passed ✅ PASS
Bun hono ✅ 1/1 passed ✅ PASS
C++ fmt ✅ N/A ✅ PASS
C++ json ✅ N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world ✅ N/A ✅ PASS
.NET json-parse ✅ N/A ✅ PASS
Go color ✅ ok ✅ PASS
Go env ✅ ok ✅ PASS
Go uuid ✅ ok ✅ PASS
Java gson ✅ 1/1 passed ✅ PASS
Java caffeine ✅ 1/1 passed ✅ PASS
Node.js clsx ✅ passed ✅ PASS
Node.js execa ✅ passed ✅ PASS
Node.js p-limit ✅ passed ✅ PASS
Rust fd ✅ 1/1 passed ✅ PASS
Rust zoxide ✅ 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — PASS

Note: Java builds required -Dmaven.repo.local=<writable dir> because the sandbox's ~/.m2 directory is root-owned and not writable by the runner user (unrelated to the firewall itself); the Maven proxy settings (~/.m2/settings.xml) worked as configured.

All ecosystems cloned, built/installed, and passed their tests successfully through the firewall proxy.

Generated by Build Test Suite for #8688 · copilot · auto · 45.3 AIC · ⊞ 10.6K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test

  • refactor: add Cloud Hypervisor workload profiles
  • refactor: introduce runtime-neutral enclave runner lifecycle
  • Merged PR review: ✅
  • PR detail lookup: ✅
  • Playwright GitHub title: ✅
  • Temp file write/read: ✅
  • AWF build: ✅
  • Overall: PASS

Warning

Firewall blocked 8 domains

The following domains were blocked by the firewall during workflow execution:

  • accounts.google.com
  • android.clients.google.com
  • clients2.google.com
  • contentautofill.googleapis.com
  • msfeed25.pkgs.visualstudio.com
  • update.googleapis.com
  • www.google.com
  • www.gstatic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "accounts.google.com"
    - "android.clients.google.com"
    - "clients2.google.com"
    - "contentautofill.googleapis.com"
    - "msfeed25.pkgs.visualstudio.com"
    - "update.googleapis.com"
    - "www.google.com"
    - "www.gstatic.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.14 Python 3.12.14 ✅ YES
Node.js v24.21.0 v22.23.2 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: FAILED — Node.js version differs between host and chroot environment. smoke-chroot label was not added.

Tested by Smoke Chroot
Add label ready-for-aw to run again

This branch was previously deployed

1 inactive deployment
aoai-model — 37b705fd Deployed Sep 17, 2026 by lpcox via conclusion #1686
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generalize Cloud Hypervisor manager profiles for enclave workloads

4 participants