Repository navigation
Conversation
sjrx-claude-sandbox
force-pushed
the
feat/validators-seccomp-bpf-cgroup
branch
from
October 24, 2026 14:40
016c2a3 to
7ceb5df
Compare
Unit Test Results (grammar engine false)1 388 tests 1 388 ✅ 1m 6s ⏱️ Results for commit 082b48d. ♻️ This comment has been updated with latest results. |
Unit Test Results (grammar engine true)1 388 tests 1 388 ✅ 1m 1s ⏱️ Results for commit 082b48d. ♻️ This comment has been updated with latest results. |
sjrx-claude-sandbox
force-pushed
the
feat/validators-seccomp-bpf-cgroup
branch
3 times, most recently
from
October 24, 2026 17:11
30ed2ea to
1609e3f
Compare
…ion options (seccomp-bpf-cgroup batch) Adds validators, grounded on systemd 0f0682b773, for: - SystemCallFilter= (core and nspawn): ~ deny lists, @groups, syscall:errno - SystemCallLog= - RestrictFileSystems=: exact file system names and @groups - PrivateBPF=: case-insensitive parse_boolean spellings - BPFDelegateCommands=/Maps=/Programs=/Attachments=: "any" or a comma list of the names generated from the bundled uapi bpf.h Shared terminals (errno names, safe_atoi numbers, syscall/file system groups) live in BatchSeccompBpfCgroupCombinators.kt. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nd BindToDevice (seccomp-bpf-cgroup batch) - NFTSet= (cgroup context): cgroup/user/group:family:table:set tuples - BPFProgram=: cgroup attach type plus absolute, normalized path - XAttrEntryPoint=/XAttrListen=/XAttrAccept=: user.NAME=VALUE with specifier checking - BindToDevice=: "*" or an interface name, specifiers allowed Also adds PRINTF_CHAR / printfCharExcluding, modelled on specifier_printf (unknown non-alphanumeric "%x" stays literal). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…omp-bpf-cgroup batch) - NFTSet=: allow a leading and trailing ':' run around a tuple, as extract_first_word skips/coalesces them. - BPFProgram=: allow leading ':' before the attach type. - SafeAtoiTerminal: allow a sign after the 0b/0o prefix (strtol sees it after mangle_base strips the prefix). - RestrictFileSystems=: document ext4"" as a known over-rejection and fix the TEST-07 evidence anchor. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Checked against systemd's own parsers (sd-check) built at 0f0682b773. - BindToDevice=: refuse numeric spellings that parse_ifindex() reads as an interface index (0x5, +5, 0b101, 0o7, 010, 0b+1), as ifname_valid() does. Names like -5, +0, 0x0, +0b1 and 0x80000000 stay valid. - Expose the safe_atoi() value reader as seccompBpfCgroupSafeAtoiValue(). - Tests pin the oracle-checked values, including the deliberate leniency for unknown syscall names and the runtime-only RestrictFileSystems= name check. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…up validators PrivateBPF= built its own ignore-case terminal from BOOLEAN_SPELLINGS; the shared BOOLEAN is now case-insensitive, so use it. private_bpf_table only holds "no"/"yes", which BOOLEAN already covers, so no names branch is needed. ERRNO_NAME keeps ignoreCase: errno_from_name() uses a gperf table generated with --ignore-case (src/basic/meson.build). Add mixed-case test cases. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tors (#563) Replace the branch-local SafeAtoiTerminal and seccompBpfCgroupSafeAtoiValue with the shared SafeAtoTerminal. The SystemCallFilter errno number is a whitespace-split word (acceptsWhitespace = false, 0..4095), and the BindToDevice ifindex check uses SafeAtoTerminal(...).valueOf() with 1..INT_MAX. No verdict changes; the new tests pin sd-check results for -0x0, 0o-0, 08 and 0x (errno) and 0b-0, -0x0, 0o+7, 08 (BindToDevice). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sjrx-claude-sandbox
force-pushed
the
feat/validators-seccomp-bpf-cgroup
branch
from
October 24, 2026 18:29
1609e3f to
4b49575
Compare
…cgroup validators (#565) RestrictFileSystems= now accepts any word that does not unquote to an @group: systemd's parser stores plain names unchecked and only rejects unknown ones in the BPF code at unit start. Quotes and escapes are modelled per EXTRACT_UNQUOTE, and a literal ~word after the first position is accepted. Known names stay an exact alternative for completion and coloring; unknown @groups and unterminated quotes are still flagged. SystemCallFilter= accepts a ~word after the first position: nspawn stores it verbatim and only drops it at container start. Unit files share the (config_parse_syscall_filter, 0) registration and cannot be told apart, so the lenient behaviour applies to both (documented). SYSCALL_NAME's lenient side no longer starts at @ or ~, which removes a 2^n parse blow-up on long invalid lists on the new engine. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.