Skip to content

test(cli): kernel E2E for pasu run#58

Merged
CharmingGroot merged 1 commit into
release/v0.1from
test/pasu-run-e2e
Jul 16, 2026
Merged

test(cli): kernel E2E for pasu run#58
CharmingGroot merged 1 commit into
release/v0.1from
test/pasu-run-e2e

Conversation

@CharmingGroot

Copy link
Copy Markdown
Owner

Gap

pasu run is the README's first quickstart, but had no execution proof — CI built pasu-cli and ran 3 unit tests, while the privileged E2E job only exercised the pasu-egress binary directly. (Found during a docs↔implementation audit.)

Added

crates/pasu-cli/tests/run_e2e.rs, mirroring the proven egress-E2E harness (opt-in PASU_E2E_KERNEL + root, baseline-connectivity skip):

  • TN/TP through the real binary: with a default-deny policy allowing one IP, pasu run -- timeout 5 bash -c 'exec 3<>/dev/tcp/…' reaches the allowed IP and is dropped for a non-allowlisted one — proving policy → lowering → dedicated cgroup → eBPF attach → enforcement end-to-end.
  • fail-closed: a default: allow policy is rejected before the wrapped command starts (non-zero exit, marker file never created).

CI: the privileged eBPF E2E job now builds and runs both E2E targets.

`pasu run` was the most-advertised entry point but had no execution proof:
CI built it and ran three unit tests, while the privileged E2E job only
exercised the pasu-egress binary directly.

Add pasu-cli/tests/run_e2e.rs, mirroring the egress E2E harness (opt-in
PASU_E2E_KERNEL + root, baseline-connectivity skip):
  - TN/TP: with a default-deny policy allowing one IP, the wrapped command
    reaches the allowed IP and times out on a non-allowlisted one — proving
    policy → lowering → dedicated cgroup → eBPF attach → enforcement, end
    to end through the actual `pasu` binary.
  - fail-closed: a default-allow policy is rejected before the command runs
    (non-zero exit, no side effect from the wrapped command).

CI: the privileged eBPF E2E job now builds and runs both E2E targets.
Signed-off-by: Ho Geun Choi <ohyes9711@gmail.com>
@CharmingGroot
CharmingGroot merged commit 91a45e8 into release/v0.1 Jul 16, 2026
4 checks passed
@CharmingGroot
CharmingGroot deleted the test/pasu-run-e2e branch July 16, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant