Skip to content

refactor(seccomp): extract trusted policy substrate - #6119

Open
RaresKeY wants to merge 1 commit into
odysseus-dev:devfrom
RaresKeY:refactor/agent-seccomp-substrate
Open

refactor(seccomp): extract trusted policy substrate#6119
RaresKeY wants to merge 1 commit into
odysseus-dev:devfrom
RaresKeY:refactor/agent-seccomp-substrate

Conversation

@RaresKeY

@RaresKeY RaresKeY commented Aug 19, 2026

Copy link
Copy Markdown
Member

Summary

This draft extracts the trusted seccomp substrate from the cumulative sandbox work in #5818 into an independently reviewable change. It adds deterministic Moby-derived policy generation with pinned provenance, generated inner and outer artifacts, the hardened fixed Bubblewrap launcher, and focused generator, policy, and launcher tests. Dockerfile, Compose, AppArmor, boot self-test, and process-routing integration remain outside this slice.

The scope is exactly these 12 paths:

  • docker/seccomp/odysseus-bubblewrap.json
  • security/seccomp/Makefile
  • security/seccomp/README.md
  • security/seccomp/generate.py
  • security/seccomp/generated_inner_policy.h
  • security/seccomp/moby-default.json
  • security/seccomp/odysseus-seccomp-launcher.c
  • security/seccomp/policy.json
  • tests/seccomp_probe.c
  • tests/test_seccomp_generator.py
  • tests/test_seccomp_launcher.py
  • tests/test_seccomp_policy.py

The generated outer profile docker/seccomp/odysseus-bubblewrap.json is canonically owned by this PR. PR #6121 consumes this generated profile for Docker/Compose integration and must not duplicate or regenerate it.

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #6114

Part of #6091

Part of #5815

Related to #5818; this supersedes the corresponding seccomp-substrate slice of that cumulative PR.

Related to #4754, the broader sandbox request.

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.
  • I did not run the app/runtime validation and stated that gap in How to Test. Leave this unchecked when the app-run box above is checked.

How to Test

All commands below were run in a secretless review environment against this exact 12-path branch.

  1. Run python3 security/seccomp/generate.py --check --verify-arches to verify pinned Moby provenance, deterministic generated artifacts, and x86_64/ARM64 resolution; it passed.
  2. Run make -C security/seccomp check-generated; it passed. Run python3 -m py_compile security/seccomp/generate.py; it passed.
  3. Run python3 -m pytest -q tests/test_seccomp_generator.py tests/test_seccomp_policy.py; 7 tests passed. Run python3 -m pytest -q tests/test_seccomp_launcher.py; 16 tests passed.
  4. Full app, Docker/Compose, AppArmor, boot self-test, and browser validation were not run here; those host-integration checks remain outside this focused substrate PR and should be covered by the corresponding follow-up slice.

Visual / UI changes — REQUIRED if you touched anything that renders

Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any static/js/ module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.

This slice does not touch UI-rendering files.

  • Screenshot or short clip of the change in the running app, attached below.
  • Style match: the change uses Odysseus's existing visual language. Specifically:
    • Reuse existing CSS variables (--red, --fg, --bg, --card, --border, etc.) — do not introduce new color values, font sizes, or spacing units.
    • Reuse existing button/input/card/border classes. Don't invent parallel styling.
    • No Unicode emoji in UI or code. Use inline SVG (matching the monochrome icon style already in static/index.html) or plain text.
    • Monospaced font (Fira Code) for primary UI text. Don't override.
    • Dark theme is the default; any light-mode work must be wired through the existing theme system, not hard-coded.
  • No new component patterns. If a similar widget already exists in the app, extend it instead of writing a parallel one.
  • I am not an LLM agent submitting a bulk PR. If you are, please open an issue describing the problem first — bulk auto-generated PRs that don't match the project's visual style are closed on sight, even when the underlying code is correct.

Screenshots / clips

@github-actions

Copy link
Copy Markdown

⚠️ PR description is complete; validation evidence is still outstanding

Changed-file classification: backend/runtime.

Author-reported runtime / visual state

  • The author explicitly reports that app/runtime validation was not performed.

Checkboxes are author attestations. GitHub Actions results remain the execution evidence for CI; this check does not prove that a local command ran.


This comment updates automatically when the description or changed files change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs runtime validation Runtime validation not attested — tick the app-run box after running it, or state the gap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a trusted seccomp launcher and deterministic generated policies

1 participant