Seccomp profile hardening score engine
Project description
seccompute
OCI Seccomp profile hardening score engine. CLI and python module that helps assess and score seccomp profiles for common flaws, bypasses, and general hardiness.
Install
pip install seccompute
Quickstart
seccompute - --grade << 'EOF'
{
"defaultAction": "SCMP_ACT_ALLOW",
"syscalls": [
{
"names": ["socket", "bind", "listen", "accept", "accept4", "connect",
"sendto", "sendmsg", "sendmmsg", "recvfrom", "recvmsg", "recvmmsg"],
"action": "SCMP_ACT_ERRNO",
}
]
}
EOF
Grade A — tight profile with io_uring bypass risk:
Grade F — permissive profile with T1 syscalls exposed:
CLI reference
seccompute [profile] [options]
input / modes:
profile Path to seccomp profile (JSON or YAML), or - for stdin
--arch ARCH Target architecture (default: SCMP_ARCH_X86_64)
--min-score N Exit 2 if score is below N (for CI gates)
--compare-docker Compare profile against Docker/Moby default seccomp allowlist
--rules DIR Directory with custom rule files; missing files fall back to built-ins
--caps CAPS Comma-separated capabilities granted to the container
(e.g. CAP_BPF,CAP_SYS_ADMIN). When provided, capability-
conditional rules are resolved against this set. Use empty
string to specify no capabilities. When omitted, capability
conditionals are ignored so Docker and containerd profiles
score equivalently.
output:
--grade Show letter-grade visualization (ANSI color)
--format FORMAT Output format: json (default) or text
--json Shorthand for --format json
--verbose Per-syscall details to stderr
Examples
CLI:
seccompute examples/example.json # JSON output
seccompute examples/example.json --grade # letter-grade visualization
seccompute examples/profile3-network-blocked-iouring-bypass.yaml # YAML profile
Python API:
from seccompute import score_profile
profile = {
"defaultAction": "SCMP_ACT_ERRNO",
"syscalls": [
{"names": ["read", "write", "exit"], "action": "SCMP_ACT_ALLOW"}
]
}
result = score_profile(profile)
print(result.score) # e.g. 98
print(result.grade) # e.g. "A"
Multi-Dimensional Scoring and Combo Bypasses
Scoring model
| Tier | Examples | Max deduction |
|---|---|---|
| T1 — critical | bpf, ptrace, init_module |
7+ pts each |
| T2 — high | io_uring_*, perf_event_open |
0.5 pts each |
| T3 — medium | clone, chroot, mount |
0.1–0.2 pts each |
A profile exposing any T1 syscall receives a forced F regardless of total score. Combo findings (e.g. io_uring bypass chains) are reported separately and do not affect the numeric score.
Combo Bypass Detection
When a profile allows syscall combinations that bypass seccomp restrictions, seccompute reports attack chain details — the bypass path, bypassed syscalls, and CVE/technique references:
[HIGH] io_uring network bypass: io_uring_setup, io_uring_enter
bypasses: accept, bind, connect, socket, send, recv, ...
refs: TECHNIQUE-io-uring-escape, CVE-2023-2598, CVE-2024-0582
More Information
- More details: See DETAILS.md
- Custom Roles: See RULES.md
- Original Spec: See SPEC.md
- Original Prompt(Rebuild it in Rust for all I care): See PROMPT.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seccompute-3.0.3.tar.gz.
File metadata
- Download URL: seccompute-3.0.3.tar.gz
- Upload date:
- Size: 38.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3a89c186ebb73f161ed3e318d2d204d6fb184c5486751f43952ded978f3a3eb
|
|
| MD5 |
0002a30cf46ed0a3c278ca38d7a899fb
|
|
| BLAKE2b-256 |
eb8ca2335ceb7244f43678075da733ebdea05a92969d4db85aedefd6cf915b1d
|
Provenance
The following attestation bundles were made for seccompute-3.0.3.tar.gz:
Publisher:
release.yml on antitree/seccompute
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seccompute-3.0.3.tar.gz -
Subject digest:
b3a89c186ebb73f161ed3e318d2d204d6fb184c5486751f43952ded978f3a3eb - Sigstore transparency entry: 1181527721
- Sigstore integration time:
-
Permalink:
antitree/seccompute@1bfd22b4b4998c71b2bf8625193a6e6674530ee8 -
Branch / Tag:
refs/tags/v3.0.3 - Owner: https://github.com/antitree
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1bfd22b4b4998c71b2bf8625193a6e6674530ee8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file seccompute-3.0.3-py3-none-any.whl.
File metadata
- Download URL: seccompute-3.0.3-py3-none-any.whl
- Upload date:
- Size: 35.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30c6457a2787cf3125d536e3faf40dc4b0e0d11da7ad1fc634b740400a117b19
|
|
| MD5 |
dfcf8fe58923bdf62ff13b3cfbf2600d
|
|
| BLAKE2b-256 |
1c509d013b7daac06bfd3379c1dd17b280dae5c4e69ceeb94619b0de93ab124b
|
Provenance
The following attestation bundles were made for seccompute-3.0.3-py3-none-any.whl:
Publisher:
release.yml on antitree/seccompute
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seccompute-3.0.3-py3-none-any.whl -
Subject digest:
30c6457a2787cf3125d536e3faf40dc4b0e0d11da7ad1fc634b740400a117b19 - Sigstore transparency entry: 1181527786
- Sigstore integration time:
-
Permalink:
antitree/seccompute@1bfd22b4b4998c71b2bf8625193a6e6674530ee8 -
Branch / Tag:
refs/tags/v3.0.3 - Owner: https://github.com/antitree
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1bfd22b4b4998c71b2bf8625193a6e6674530ee8 -
Trigger Event:
push
-
Statement type: