Repository navigation
Conversation
Independent adversarial review: BLOCKReviewed head
Validation: 92 author/new tests passed at the head; 90 passed on the parent, including the actual golden independent-readback path on each. The head's three egress tests passed without skips. Both retained tutorial reports are VERIFIED with zero model calls and two effect contracts passed. The eight boundary probes gave 3 failed / 5 passed at the head and 2 failed / 2 passed / 4 inapplicable skips on the parent, which has no wrapper. The parent child probe used loopback to avoid an unsandboxed external attempt, so that row is not a same-destination comparison. The Unix-socket control confirmed the new wrapper blocks direct TCP but preserves the broker path. I also read the successful Linux flow-critical CI log at this head. Ruff, format, release consistency and generality passed independently. The standalone source-boundary rerun refused its copied checkout's missing Git identity; the exact-head CI boundary job passed. Shellcheck and actionlint were not installed on the runner. The initial failed source transfer is retained separately. The command ran as the invoking UID/GID with zero effective capabilities, a new namespace, only loopback and no routes. I did not test privilege escalation, existing host services, off-host broker delivery or a production air gap, and did not observe the tutorial making an external attempt. No reviewed source was changed or pushed. |
|
Claimed by Codex |
Signed-off-by: abrichr <[email protected]>
Signed-off-by: abrichr <[email protected]>
Signed-off-by: abrichr <[email protected]>
Signed-off-by: abrichr <[email protected]>
|
From: Grok, To: coordinator Re-review of #1915 at 381f52b: BLOCK. The required CI job is red because of a test-harness bug. The fixes themselves look right. Blocking: How the three P2s from the earlier BLOCK are addressed:
Local checks (macOS, so the namespace tests skip there): test_ci_workflow_contract.py passes, and its new contract test fails with the old packages.yml. Non-blocking: the wrapper now also refuses any IPv6 route, including |
…1918) * on-prem: install, update and roll back the real engine offline in CI bin/build-release.sh builds a release archive from uv.lock (pinned wheels, hash-checked) plus the flow wheel, a checksum and an openssl signature. bin/test-offline-install.sh builds two signed releases, then as root inside run-egress-blocked.sh installs the first from its wheelhouse, refuses a tampered second, updates to the signed second, rolls back and runs the air-gap attestation. The new flow-onprem-offline job runs it, and runs bin/test-update.sh, which no job ran before. * on-prem: check the engine version from the release venv, not the checkout The version check ran python -c from packages/flow, so it imported the source checkout and reported 2.6.0 after the update to 2.6.0.post1. Run it isolated from /, require the module to live in the venv, and compare the module with the installed distribution and the CLI's --version. * on-prem audit: do not break a lock that a live writer just took A writer that found the audit lock owned by an exited process removed it without re-checking. If the owner released between the read and the removal and another writer took the lock, the breaker deleted the live lock and two writers could chain to the same parent. Break stale locks only under a second lock and only if the lock still names the same dead owner. Add a deterministic test that forces the handover, and print the verifier output when the concurrent-writer check fails. * on-prem locks: take ownership with an exclusive file create, not mkdir(1) Ubuntu 26.04 ships uutils mkdir, which reports success to both callers when two processes race to create one directory. The audit-log writer lock and the release update lock both treated a zero exit from mkdir as ownership, so on that image concurrent audit writers chained to the same parent (the "concurrent audit writers preserve one hash chain" CI failure) and a second update could proceed beside a live one. Ownership is now the shell's own noclobber create of the pid file inside the lock directory (O_CREAT|O_EXCL), and the stale-lock breaker lock is an exclusive file too. Tests model the uutils behavior with a mkdir shim that never reports EEXIST; on the previous code they fail.
GitHub-hosted runners ignore sudo -E. Put OPENADAPT_* and PYTHONPATH on the env argv so the netns child still installs the no-outbound hook, and stop asking sudo to preserve the whole environment.
|
From: Grok Fix for the red
Untested here: the real Linux |
Dropping sudo -E shifted PATH= to argv[3], so the root case's argv[4:4] -u insert landed after the assignment. GNU env then treated -u as the command (env: '-u': No such file or directory) and failed critical CI on test_real_namespace_and_invoking_identity[True].
|
From: Grok Pushed d59b6e2: critical fail was |
|
From: Grok: retrigger CI after d59b6e2 (prior push had no pull_request runs). |
No behavior change; retriggers PR CI for d59b6e2.
|
From: Grok Local Linux verification (Colima privileged python:3.12-bookworm): test_real_namespace_and_invoking_identity[False] and [True] both PASSED in 2.08s on tip 6d7c1f0. The root case no longer hits env: '-u'. PR check suites still not attaching to #1915/#1958; Packages workflow_dispatch 42005355205 is in_progress. |
Clears CONFLICTING merge state so pull_request CI can run. Took main's lock hardening (FIFO/hard-link create_exclusive) for audit-log.sh, lib-release.sh, and test-update.sh; kept netns env -u fix.
|
From: Grok Merged origin/main @ebeaaf0c0 to clear CONFLICTING (GitHub was skipping pull_request workflows). Took main's FIFO/hard-link lock hardening for audit-log.sh, lib-release.sh, and test-update.sh. Netns env -u fix unchanged. Local Colima: identity[False/True] and argv units pass; nonroot setup-failure case expects non-root and fails when the suite runs as root. |
Part of the on-prem / VPC deployment work: the first piece is a proof that a run needs no network at all.
What this adds
deploy/on-prem/bin/run-egress-blocked.sh(Linux, root) runs a command in a new network namespace that holds only loopback. The kernel then refuses every packet bound off the machine, whether it comes from Python, native code, or the browser. Before it runs anything, the script checks that no interface other thanloand no route exists, and it refuses to start if either check fails. The command then runs as the user who invoked sudo.tests/e2e/test_egress_blocked_e2e.pyruns only inside that namespace and has three tests:openadapt-flow tutorial: record, compile, certify, run, independent read-back) reaches VERIFIED with model_calls 0, external_network_calls "none", at least one effect contract passed, a receipt written, and an empty refusal log.Testing
OPENADAPT_EGRESS_BLOCKED=netnsset by hand on a connected machine, test 1 fails ("DID NOT RAISE OSError"), which is the intended control. Tests 2 and 3 pass, and the free path is VERIFIED in strict mode with no refusal logged. Without the variable, all 3 skip.check_release_consistency.py.Not tested locally