Skip to content

fix(sandbox): install the proxy nftables rule with the full cgroup path - #176

Merged
EXboys merged 1 commit into
mainfrom
cursor/critical-bug-investigation-b16f
Oct 28, 2026
Merged

EXboys merged 1 commit into
mainfrom
cursor/critical-bug-investigation-b16f

Conversation

@cursor

@cursor cursor Bot commented Oct 28, 2026

Copy link
Copy Markdown

Summary

  • Linux agent-sandbox runs that set https_proxy never started. nftables 1.0.9 treats socket cgroupv2 as a path under /sys/fs/cgroup, and the rule only named the leaf cgroup (skilllite-<run>).
  • The rule now uses that cgroup's path relative to /sys/fs/cgroup, and level is the number of components in the path. If the rule still cannot be installed, the run refuses to start.
  • A shorter level is not used. On nftables 1.0.9, level 1 with the full path installs and does not match. The output chain policy is accept, so that would leave egress unfiltered.

Task Linkage

  • Task ID: TASK-2026-073
  • Task folder: tasks/TASK-2026-073-agent-sandbox-nft-cgroup-path/

Injected Specs

  • spec/architecture-boundaries.md (if architecture/layering changed)
  • spec/security-nonnegotiables.md (if sandbox/security changed)
  • spec/testing-policy.md (required for any code change)
  • spec/docs-sync.md (if behavior/docs/env/commands changed)
  • spec/verification-integrity.md
  • spec/task-artifact-language.md
  • spec/rust-conventions.md

Validation Evidence

  • Commands executed:
    • cargo fmt --all -- --check (exit 0)
    • cargo clippy -p skilllite-sandbox --all-targets -- -D warnings (exit 0)
    • cargo test -p skilllite-sandbox (exit 0)
    • cargo test -p skilllite --test e2e_minimal (exit 0)
    • Live nftables 1.0.9 probe of the generated match shape
  • Key results:
    • skilllite-sandbox lib: test result: ok. 105 passed; 0 failed; 0 ignored
    • e2e_minimal: test result: ok. 2 passed; 0 failed
    • Probe from inside the matched cgroup: proxy port OPEN, other local TCP port TimeoutError
  • cargo audit was not run; it is not installed in this environment.

Regression Scope

  • Areas likely affected:
    • Linux skilllite agent-sandbox when https_proxy is set
  • Explicit non-goals:
    • Runs that omit https_proxy
    • macOS Seatbelt read scope
    • Skill execute() sandboxing
    • SKILLLITE_AGENT_SANDBOX_REQUIRE_PROXY

Docs Sync (EN/ZH)

  • Not needed
  • Updated EN + ZH docs
  • Files:
    • docs/en/ARCHITECTURE.md
    • docs/zh/ARCHITECTURE.md
    • docs/en/HOME-NODE-CONNECT.md
    • docs/zh/HOME-NODE-CONNECT.md

Review Checklist

  • Acceptance criteria in tasks/TASK-2026-073-agent-sandbox-nft-cgroup-path/TASK.md satisfied (or explicitly deferred)
  • tasks/TASK-2026-073-agent-sandbox-nft-cgroup-path/STATUS.md updated with latest progress
  • tasks/TASK-2026-073-agent-sandbox-nft-cgroup-path/REVIEW.md includes merge readiness decision
  • tasks/board.md status is up to date

Security policy note

  • What changed: the nftables match path. The chain policy stays accept, so other host processes are not filtered.
  • A proxied Linux run can now start. Egress from that cgroup is limited to the resolved proxy. That is the documented allowlist. It is not a wider network policy than the one the feature claimed to install.
  • SKILLLITE_* semantics are unchanged.
Open in Web View Automation 

nftables resolves socket cgroupv2 as a path under /sys/fs/cgroup. A leaf
name does not install on a nested hierarchy, so a Linux agent-sandbox
run with https_proxy never started.

Co-authored-by: EXboy <[email protected]>
@EXboys
EXboys marked this pull request as ready for review October 28, 2026 14:55
@EXboys
EXboys merged commit 1b790da into main Oct 28, 2026
5 checks passed
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.

2 participants