Skip to content

feat(sandbox): sandbox commands take a seccomp profile file - #2588

Merged
dan-petty merged 2 commits into
mainfrom
feat/1822-sandbox-seccomp-profile
Oct 29, 2026
Merged

dan-petty merged 2 commits into
mainfrom
feat/1822-sandbox-seccomp-profile

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops sandbox deploy, devops docker sandbox and devops test sandbox take --seccomp-profile <file>, so a container sandbox can run under a profile other than the engine's default.

  • The command checks the file before anything else: a JSON object whose defaultAction refuses the calls that it does not name (SCMP_ACT_ALLOW and SCMP_ACT_LOG are refused).
  • SandboxPolicy.seccomp_profile carries it, and the container gets seccomp=<compact JSON> in security_opt, as the docker CLI sends it.
  • Podman before 6.2.0 reads that value as a path (compat API: accept inline seccomp profiles podman-container-tools/podman#29726), so it gets seccomp=<absolute path>. The engine is asked only when a profile is set.
  • Each dry run names the profile file.

Closes #1822

Change: openspec/changes/archive/2026-10-29-1822-sandbox-seccomp-profile/

`devops sandbox deploy`, `devops docker sandbox` and `devops test
sandbox` take `--seccomp-profile <file>`. The command checks the file
before it does anything else: it must be a JSON object whose
defaultAction refuses the calls that it does not name. SandboxPolicy
carries the checked profile, and the container gets
`seccomp=<compact JSON>` in security_opt. A Podman engine older than
6.2.0 reads that value as a path (podman-container-tools/podman#29726), so it gets
`seccomp=<absolute path>`; the engine is asked only when a profile is
set.
@dan-petty

Copy link
Copy Markdown
Owner Author

Test evidence:

  • tests/test_sandbox_seccomp.py: 27 tests, failing first (the module did not exist), passing after. With the sandbox, docker engine, MCP and contract suites: 595 passed after the rebase onto 33491ca1.
  • uv run devops ci fail-to-pass --base origin/main: the new test module cannot load on the base, because devops_cli.sandbox.seccomp does not exist there. This is a feature PR.
  • mypy on the 8 changed source modules: no issues. devops docs check: up to date.
  • devops test run --changed ran the full suite (5 m 48 s, load about 15). Its one failure, tests/test_telemetry_shutdown_sync.py::test_shutdown_joins_all_worker_threads, passes alone three times and touches no changed code. Filed as fix(test): the telemetry shutdown test bounds its threads by wall-clock time and fails on a loaded host #2587 (wall-clock bounds in the test).

Live check on Docker Engine 29.9.2 (no change kept on the engine):

  • Profile: moby/profiles seccomp/default.json at 6fe7deb1b9fb (Apache-2.0) with chmod, fchmod, fchmodat and fchmodat2 removed from its allow list; a scratch file, not committed.
  • devops sandbox deploy --seccomp-profile <it>: the container's HostConfig.SecurityOpt was no-new-privileges:true and seccomp={"defaultAction":"SCMP_ACT_ERRNO",...}. In it, chmod 600 /tmp/x and Python os.chmod failed with "Operation not permitted".
  • A control sandbox without the option: both calls worked, and SecurityOpt was no-new-privileges:true alone.
  • Both sandboxes were stopped and removed.

Pending a person: run a sandbox with --seccomp-profile on a Podman engine (this host has none), and review the diff in tuicr (tuicr -r origin/main..HEAD).

@dan-petty
dan-petty marked this pull request as ready for review October 29, 2026 01:45
@dan-petty
dan-petty merged commit 46958d4 into main Oct 29, 2026
17 checks passed
@dan-petty
dan-petty deleted the feat/1822-sandbox-seccomp-profile branch October 29, 2026 01:46
dan-petty pushed a commit that referenced this pull request Oct 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.13.0](v0.12.0...v0.13.0)
(2026-10-29)


### Features

* **gh:** devops gh issues close records the close reason and a comment
([#2575](#2575))
([97ed0ea](97ed0ea)),
closes [#1658](#1658)
* **monitoring:** the ai spend dashboard counts gateway traffic from the
gateway's own series, shows failed attempts and names each caller
([#2584](#2584))
([33491ca](33491ca))
* **roadmap:** refine writes each criterion as an OpenSpec requirement
([#2591](#2591))
([d9a869f](d9a869f))
* **sandbox:** sandbox commands take a seccomp profile file
([#2588](#2588))
([46958d4](46958d4))


### Bug Fixes

* **monitoring:** RoadmapServiceGitHubWritesHigh counts a request with
no method label as a write, so it fired on 341 reads
([#2583](#2583))
([6dc3aa7](6dc3aa7)),
closes [#2574](#2574)


### Performance Improvements

* **ci:** the gate writes no coverage XML, and the clean-up keeps the
combined data
([#2582](#2582))
([ae9ebb2](ae9ebb2)),
closes [#1743](#1743)
* **roadmap:** intake's embeddings are cached in a password-protected
Valkey in the cluster
([#2578](#2578))
([bfe8a0c](bfe8a0c))


### Code Refactoring

* **devcontainer:** remove the DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP test
switch from product code
([#2580](#2580))
([7e7272e](7e7272e))
* **lint:** lazy exports import names under TYPE_CHECKING
([#2590](#2590))
([c96dbfe](c96dbfe)),
closes [#2010](#2010)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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.

feat(sandbox): SandboxPolicy carries a seccomp profile the container engines apply

1 participant