Provide primary-agent and enclave parity across Docker, NVX, and Cloud Hypervisor

Đang mở
#10,335 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
1/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, github-actions, typescript
Lĩnh vực
backend, security

Hướng nghiên cứu

Start with the merged contract in docs/enclaves-architecture.md and shared execution core from #10342, then read the linked sub-issues, especially #10340 and #10337. Identify the backend adapters, conformance tests, and CI gates named there before taking on a scoped delivery step. Done means all three backends pass the required role combinations and failure, recovery, cleanup, and private-output checks; unsupported or unverified cells must remain reported as such.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Goal

Provide consistent, regression-tested support for primary agents, script enclaves, and agent enclaves across Docker, NVX, and Cloud Hypervisor, reusing Cloud Hypervisor's policy, authenticated host execution, lifecycle, bounded-storage, recovery, and conformance machinery wherever possible.

Parity means equivalent externally observable behavior and enforced policy, not identical isolation strength between containers and VMs. Maintain one workload backend per run, with separate isolated workload instances; supporting Docker infrastructure is outside that constraint. Preserve the characterized, warning-emitting Cloud Hypervisor primary-only fallback on CloudHypervisorUnsupportedHostError; it never applies with enclaves, artifact-trust failures stay fatal, and NVX never falls back.

Starting point

The baseline is now established by merged #10347 (contract, closes #10339) and #10342 (shared execution core, closes #10336). The authoritative role/capability matrix, resource and accounting semantics, and verification obligations are in the merged cross-backend workload contract.

Docker implements all three roles through existing container/broker-managed execution. NVX still rejects enclaves. Cloud Hypervisor enclave combinations remain limited to named public-fixture/release-conformance acceptance predicates; general and private-repository use is not accepted. The shared-core extraction does not migrate Docker, enable NVX, or relax those gates. Implemented, gated, unsupported, and unverified are distinct states; mocks or structural validation cannot promote them.

Delivery steps

Each item is also linked as a native GitHub sub-issue:

  • #10339 — Define and characterize the cross-backend workload contract. Merged in #10347.
  • #10336 — Extract shared execution policy and enclave lifecycle from Cloud Hypervisor. Merged in #10342.
  • #10340 — Migrate Docker enclaves to the shared host-owned execution lifecycle.
  • #10337 — Implement NVX script and agent enclaves using the shared execution core.
  • #10341 — Extract a shared Docker, NVX, and Cloud Hypervisor conformance suite.
  • #10338 — Gate backend parity in CI and releases and document supported capabilities.

Required invariants

  • Primary-agent workspace, environment, proxy, working-directory, exit-status, and cancellation behavior remains compatible.
  • Script enclaves have no external networking. Agent enclaves reach only their dedicated API proxy and explicitly authorized GitHub gateway.
  • Repository seeds are immutable; writable state must become invocation-private and aggregate-bounded; workloads are non-root and resource-bounded. Docker aggregate host-output storage acceptance remains unverified and is a migration deliverable, not a guarantee supplied by #10342.
  • Preserve Docker's configurable resource limits; the extracted fixed VM policies must not silently replace them. Aggregate writable-state enforcement, per-file limits, tmpfs limits, and separately bounded host artifact/image state have different scopes.
  • Preserve the characterized disclosure, invocation, tool-call, and model-budget semantics. The disclosure ledger and executor invocation counters are in-memory; tool-call persistence is best-effort and may refill on restart after failed writes or unreadable/corrupt state. Durable non-refilling accounting is not supplied by either merged PR; any strengthening needs explicit behavior and recovery criteria rather than an assumed guarantee.
  • Results are canonical, schema-valid, bounded, and released only after confirmed cleanup. Uncertain cleanup preserves recoverable state.
  • Private output cannot escape through stdout, diagnostics, audit records, or artifacts.
  • Preserve existing Docker capabilities, including supported dynamic GitHub delegation. Document and test intentional capability differences; do not silently reduce all backends to the smallest acceptance subset.

Sequencing and dependencies

  1. #10339 is complete via #10347; use its merged contract as the baseline.
  2. #10336 is complete via #10342; consume the extracted interfaces rather than repeating extraction.
  3. #10340 and #10337 follow the shared-core extraction and may proceed in parallel once its interfaces stabilize.
  4. #10341 starts after characterization, supplies migration gates throughout extraction and backend implementation, and completes when all three adapters pass.
  5. #10338 introduces CI incrementally; final release gating requires the shared suite and supported backend matrix to pass.

Definition of done

  • Target parity is Docker, NVX, and Cloud Hypervisor passing primary-only, primary + script-only, primary + agent-only, and primary + both scenarios on eligible hosts. "Script-only" and "agent-only" enable only that enclave role alongside the normal primary agent; they are not standalone enclave CLI modes.
  • The same scenario definitions and behavioral assertions exercise all three backends, supplemented by backend-specific confinement tests.
  • Coverage includes failure, cancellation, exhaustion, crash recovery, orphan cleanup, and private-output sentinel checks—not only happy-path launches.
  • Deterministic checks run on relevant PRs; authorized real-backend and release checks enforce supported matrix cells.
  • Reports distinguish passed, failed, and not validated; missing prerequisites never count as success.
  • Existing preview, host eligibility, approval, and artifact-provenance gates remain enforced. Each capability promotion requires separately reviewed acceptance evidence; passing a named public-fixture gate does not accept general or private-repository VM execution. Report unsupported/unverified target cells as remaining work, never as achieved parity.
Ngôn ngữ chính
TypeScript
Star
169
Fork
89
Merge trung bình
5 giờ 18 phút
Pull request đã merge (30 ngày)
450

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/gh-aw-firewall

Tất cả issue của github/gh-aw-firewall

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.