Skip to content

Upgrade AWF to v0.29.5+ and generate the Docker enclave setup and diagnostic integration used in testing #73818

Done

Description

@lpcox

Summary

Upgrade gh-aw's default gh-aw-firewall dependency to v0.29.5 or a later compatible release, and make the supported compilation/setup pipeline generate the Docker enclave integration that currently requires authored host scripts plus a post-compilation lock-file injection in the enclave demo.

A version bump alone is insufficient: the tested bridge also handles privileged storage-helper provisioning, authenticated installation, coherent image pins, host-only staging credentials, and the maintained public diagnostic collector. Users should not need to patch generated runtime JSON, installer steps, manifests, prompt hints, or artifact retention after compilation.

Hosted evidence and scope

  • Successful confidential-target run: githubnext/gh-aw-enclave-demo-public run 41322301130, commit 692cbeec81ff7b38269ad32d3814351d392b5c97, following githubnext/gh-aw-enclave-demo-public#69. All five jobs succeeded using AWF v0.29.5. Public diagnostic preparation, collection, and upload were deliberately skipped for the confidential target; this run is not evidence of private diagnostic publication.
  • Separate successful public diagnostic lifecycle: run 41320672443, commit 909dccb4842f700d1fe669b4b4d52f88754bfc09. Public Docker diagnostic preparation, collection, and artifact upload all succeeded. This is distinct from the confidential-target run above.
  • githubnext/gh-aw-enclave-demo-public#62 originally integrated the released shared Docker exporter. Subsequent testing hardened the privileged Node bootstrap, corrected installer authentication, consumed v0.29.5, and restored the confidential target.

The compiler used for this experiment was the official gh-aw v1.0.1. The gaps below are observed against that compiler; this issue does not assert that every gap still exists on current gh-aw main. Please reconcile existing upstream support before implementing new interfaces.

Reproduction/source of truth

Use the immutable tested revision rather than regenerating the demo blindly:

The current process is official compilation followed by node .github/aw/inject-enclave-runtime.cjs, then its --check and regression tests. Ordinary compilation alone loses required bridge behavior. The supported upstream pipeline should eliminate this injection, not adopt a second exporter implementation.

Required upstream work

1. Upgrade the complete AWF release set

Consume v0.29.5+, not merely v0.29.4. v0.29.4 adds the Docker-capable shared exporter via github/gh-aw-firewall#10930; v0.29.5 also contains github/gh-aw-firewall#10940, fixing github/gh-aw-firewall#10939 by loading Copilot native addons from a sealed image runtime. Preserve writable invocation storage as noexec; do not solve native loading by relaxing that boundary or adding an untrusted runtime-path override.

Keep CLI, helper, runtime schema/image selector, image predownloads, and generated manifest coherent. The bridge pins all six AWF roles—squid, agent, api-proxy, cli-proxy, enclave-agent, and enclave-mcp-server—to authenticated same-release digests, including both agent and detection jobs. Ensure the supported image resolver/runtime serialization carries these immutable pins end to end without lock injection or hidden resolution failures.

2. Provision the narrow Docker storage helper while keeping AWF rootless

Generate the supported authenticated helper installation/probe for Docker enclaves. Only setup/helper operations need elevation; the AWF orchestrator remains rootless with network isolation enabled. The tested installer uses AWF_FORCE_BINARY=1 for privileged setup, preserves only the required authentication variables across sudo, and probes the same-release helper under isolated system Python. Preserve the installer's runner-UID-scoped authorization and bounded storage contract.

Do not switch to the host-access docker-sudo-iptables profile, execute the entire agent as root, or broaden sudo permissions to bypass enclave validation.

3. Make installer authentication and provenance self-contained

Both generated rootless AWF installer steps needed their own GH_TOKEN: ${{ github.token }} and GH_HOST: github.com bindings. Authentication inherited from an unrelated step is not sufficient for release attestation verification.

Generate authenticated release downloads with the official release-workflow/GitHub-hosted-runner attestation checks, the reviewed checksum digest, and release-identity.txt binding that digest to the expected release tag. Preserve equivalent verification for helper provisioning. Avoid requiring users to replace generated installer commands manually.

4. Provide supported host-only repository staging credentials

The enclave GitHub-tool token and the host repository-staging credential are separate surfaces. The demo binds secrets.GH_AW_GITHUB_TOKEN in a pre-agent step, explicitly rejects a missing token, and persists host GH_TOKEN through GITHUB_ENV so the later AWF process receives it. It also retains excluded-env: [GH_TOKEN] / generated --exclude-env GH_TOKEN, keeping this credential out of the primary agent container.

Provide/document a supported host-only staging binding that does not require a secret-persistence workaround or disabling strictness to accommodate its warning. Do not move the credential into the agent environment or assume a gateway step-local token reaches host AWF.

5. Integrate the maintained public Docker diagnostic collector

Expose a supported compiler/configuration surface for AWF's enclaveDebugPublic policy and generate the required host lifecycle when approved for an eligible static public-only target. Use the immutable, version-aligned upstream scripts/ci/collect-enclave-smoke-debug.cjs; do not copy its validator into gh-aw or the consuming repository.

  • Install the reviewed collector and its execution runtime outside agent-writable paths. Testing found /usr/bin/node absent on a hosted runner and PATH Node under writable /opt/hostedtoolcache; neither assuming /usr/bin/node nor executing arbitrary toolcache Node as root is acceptable. The bridge authenticates official architecture-specific Node archive bytes, extracts only the fixed regular executable under isolated root Python, verifies protected destination ancestry, and uses that protected interpreter with an empty environment. Upstream may replace this bootstrap with an equivalent supported trusted packaging mechanism.
  • Invoke the released interface: prepare docker RUN_ID-RUN_ATTEMPT RUNNER_UID RUNNER_GID before execution, then collect docker ... after AWF returns through teardown, including nonzero execution. Preserve identity, eligibility, stop-proof, ownership, link, and size validation; do not override trusted source roots.
  • Upload only the collector's validated runner-readable upload/ directory with a pinned artifact action. Include the upstream-approved envelope/session projection, bounded credential-redacted public streams, and truthful capture/availability status.
  • Run upload after collection failure so bounded failedCheck/category status can be preserved; keep execution failure, collection failure, and absent evidence distinct. Do not mask the original execution outcome.
  • Preserve a fixed one-day retention ceiling. v1.0.1 rewrites authored retention through a repository-variable fallback; this incident-diagnostic policy must not be widenable by that fallback.

For confidential/private/mixed/ineligible targets, public capture/export must remain disabled. The tested confidential workflow explicitly sets enclaveDebugPublic: false and unconditionally disables prepare/collect/upload. Credential redaction is not private-content redaction; successful confidential execution does not authorize exporting private streams into a public repository's artifacts.

6. Generate accurate policy guidance and reproducible locks

The injection also supplies release-appropriate enclave prompt guidance. Preserve actual repository sensitivity (confidential, not trusted), scoped GitHub tools/allowed repositories, and finite response schemas. The tested confidential policy has an 8-bit per-run budget; its six-outcome schema, 64-byte response, 4096-byte task, 180-second timeout, and single invocation fit the intended boundary. Compiler guidance should agree with AWF policy rather than requiring a hand-edited serialized MCP prompt hint.

All required behavior should be represented in supported authored configuration/setup sources and generated reproducibly, including runtime JSON, manifests, installer token bindings, lifecycle conditions, and retention. Avoid introducing unrestricted privileged-script or trusted-root override surfaces merely to replace this experiment.

Acceptance criteria

  • Default AWF release and all generated runtime/helper/image references are upgraded coherently to v0.29.5+ with immutable provenance.
  • A clean supported compile/setup produces the tested Docker helper and host-credential integration without post-generation injection; rootless execution, token exclusion, isolation, and noexec storage remain intact.
  • Installer authentication works independently in both agent and detection jobs.
  • An eligible public Docker fixture exercises prepare, execution/teardown, collect, and one-day upload using the maintained upstream collector, including nonzero execution and safe collection rejection.
  • Confidential/private fixtures execute without enabling public capture or publication; existing response/tool/information-flow limits remain enforced.
  • Regression coverage includes source/lock parity, coherent image pins, trusted interpreter setup on hosted runner layouts, unsafe-file/identity/stop-proof rejection, and non-overridable diagnostic retention.
  • The demo can remove its checked runtime injection and bespoke setup/bootstrap scripts in favor of supported upstream generation, with no loss of the tested behavior.

Activity

  1. added
    enhancement
    dependencies
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

compilerdependenciesenhancementsecurity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions