You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f8c8d9f
Browse filesBrowse the repository at this point in the historyBrowse files
Add vendor-only egress and phase policy (D3) (#44)
* Add vendor-only egress and phase policy
* Enforce invocation-scoped agent policy
* Bind adapters and proxy checks to invocation
* Block agent DNS and harden proxy validation
* Close remaining network lifecycle gaps
* Stabilize live Claude marker probe
* Port D2 regression tests to named isolation probes
D3 replaced raw test argv with fixed isolation probes, so the seeding,
page-rounding and namespace regressions from D2 now use the metadata and
noop probes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Carry D2 seccomp pinning into the egress proxy
Request and require Docker's builtin seccomp profile for the vendor egress
proxy too, and port D2's new regressions to the named isolation probes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Own vendor networks on profile failure and bound network cleanup
- Claim the vendor network before any fallible profile work and remove it
if creation fails, aggregating cleanup errors.
- Reserve cleanup time inside createVendorNetwork's deadline so failure
cleanup cannot overrun the caller's timeoutMs.
- Compare the live Claude marker exactly, tolerating only one wrapping
pair of backticks or quotes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Carry D2 deadline, runtime and capture rules into D3
- Clamp runContainer to the captured invocation deadline, as the other
launch paths do, and pin and require the runc runtime for the egress
proxy.
- Port D2's new regressions to the named isolation probes, and give each
captured test request its own attempt identity now that an attempt can
only be captured once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Require captured invocations for policies and serialize Docker suites
- createPhasePolicy and createVendorNetwork now reject any invocation not
produced by captureInvocation, so a forged request cannot define tools,
an allowlist or a network.
- Run the agent isolation CI suites with --no-file-parallelism, since the
Docker suites share one image tag and daemon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Bound network checks by the invocation deadline and reconcile late creates
- createContainerProfile bounds its vendor network revalidation by the
invocation's remaining time, and createVendorNetwork clamps its budget
to the invocation deadline; both refuse once it has passed.
- Track whether the network create or proxy run client was killed, and
give that object a settle window inside the caller's cleanup reserve,
removing it if it lands late.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* End CLI option parsing before agent prompts
- Place the prompt after `--` for both Codex and Claude, so a prompt
beginning with `-` cannot be parsed as a CLI option such as the sandbox
bypass flag. For Claude this also stops a trailing prompt being taken as
another --add-dir value.
- Scope the late-network regression to the network it created, since the
main CI workflow runs test files in parallel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep early CONNECT payload and keep Docker suites out of parallel CI
- The egress proxy stopped reading after parsing CONNECT but left its
data listener attached, so bytes a client sent before the tunnel was
established (such as a TLS ClientHello) were dropped unless they arrived
in the header chunk. It now detaches and pauses until the tunnel is
piped. An upstream error inside an established tunnel now resets the
client instead of writing an HTTP status into the TLS stream, and a
closed client tears down its upstream.
- Allow tests to override the proxy's listen and upstream ports; the
production defaults stay 3128 and 443.
- Exclude the Docker agent suites from the main CI npm test, since the
Agent isolation workflow already runs them one file at a time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Capture the network suite invocation after the image build
createVendorNetwork now refuses an expired invocation, so capturing the
suite's invocation at module load with a 60 s deadline could fail the
whole file after a cold image build. Capture it in beforeAll after the
build, with a deadline covering the suite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Bind vendor networks to daemon IDs and validate the proxy restart policy
- Record the network and proxy container IDs returned at creation.
Validation inspects those IDs and requires the network name and proxy
endpoint to match them, so a removed-and-recreated network or proxy with
identical attributes is refused. removeVendorNetwork deletes by ID and
leaves a same-named stand-in in place, which surfaces as a cleanup
failure.
- Require the proxy's default no-restart policy, as for the agent and
keeper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Apply the proxy header limit to headers only and bound profile checks
- The egress proxy applied its 8 KiB limit to everything received so far,
so a CONNECT header followed in the same read by a large ClientHello was
refused with 431. The limit now covers only the header.
- assertContainerProfile clamps its network revalidation budget to the
invocation deadline, including for callers using the default budget.
- Give the late-keeper regression enough budget to pass on a loaded daemon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Clean up failed network setup by ID and bound proxy header buffering
- createVendorNetwork keeps the network and proxy IDs as soon as each
create returns and uses them for the rest of setup and for failure
cleanup. Names are used only for a create whose ID never came back, so
a same-named stand-in carrying the allocation label is not deleted.
- The proxy searches for the header end only within the 8 KiB limit and
never keeps more than an unfinished header between reads, so a streamed
unterminated header cannot grow its buffer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Run live auth probes through runContainer and guard network teardown
- The opt-in authenticated Codex and Claude probes now launch through
runContainer, so they exercise creation, validation and removal instead
of raw docker create and start. The Claude token is passed only as the
profile's secret.
- The network suite skips teardown when setup never produced a network,
so a setup failure is reported instead of a teardown TypeError.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Authenticate profiles before destructive container cleanup
removeContainerOrThrow now refuses a profile that the trusted builder did
not register before running any Docker command, so a copied profile's
public name and ownership label cannot remove another invocation's
container. The launch paths already rejected copies through their first
profileTimeout call; this makes the cleanup boundary enforce it itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments