Add release gate to enforce seccomp denial of name_to_handle_at/open_by_handle_at#3056
Conversation
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Adds a release-time regression gate to ensure the agent’s Docker seccomp profile denies name_to_handle_at / open_by_handle_at (Shocker-related defense-in-depth) before the agent image is signed and published.
Changes:
- Added
scripts/ci/check-agent-seccomp-syscalls.shto run a syscall probe inside a container under the repo’s seccomp profile. - Updated
.github/workflows/release.ymlto execute the new seccomp regression check immediately after building/pushing the agent image and before cosign signing.
Show a summary per file
| File | Description |
|---|---|
| scripts/ci/check-agent-seccomp-syscalls.sh | New CI script that runs a Python-based syscall probe under the agent seccomp profile. |
| .github/workflows/release.yml | Adds a release gate step to run the seccomp regression script before signing the agent image. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 4
| echo "Verifying seccomp blocks name_to_handle_at/open_by_handle_at for image: $IMAGE" | ||
|
|
||
| if ! docker run --rm --entrypoint sh "$IMAGE" -c 'command -v python3 >/dev/null 2>&1'; then | ||
| echo "Image does not contain python3, cannot run seccomp syscall regression check: $IMAGE" >&2 | ||
| exit 1 | ||
| fi |
| docker run --rm -i \ | ||
| --entrypoint python3 \ | ||
| --security-opt "seccomp=$SECCOMP_PROFILE" \ | ||
| "$IMAGE" - <<'PY' |
| arch = platform.machine().lower() | ||
| if arch not in {"x86_64", "amd64"}: | ||
| raise SystemExit( | ||
| f"Unsupported architecture for syscall number regression check: {arch}. " | ||
| "This check currently validates x86_64 syscall numbers only." | ||
| ) |
| try: | ||
| libc = ctypes.CDLL(libc_path, use_errno=True) | ||
| except OSError as exc: | ||
| raise SystemExit(f"Unable to load libc ({libc_path}): {exc}") from exc |
This comment has been minimized.
This comment has been minimized.
|
@copilot address review feedback |
This comment has been minimized.
This comment has been minimized.
Addressed in commit 6be33d6. I updated the seccomp regression gate to add a control probe (no seccomp) to avoid EPERM false positives, set |
Smoke Test Results❌ GitHub MCP Testing (gh auth HTTP 401) Overall: FAIL
|
🔬 Smoke Test Results
Overall: FAIL — GitHub MCP authentication failed; pre-computed test data was not injected into the workflow prompt.
|
|
Smoke Test: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
🔥 Smoke Test: Copilot BYOK Offline Mode
Note: Running in BYOK offline mode ( Overall: FAIL — Pre-step template variables (
|
Smoke Test Results — FAIL
Overall: FAIL —
|
Bug Fix
What was the bug?
agent:0.25.20allowedname_to_handle_at(NR 303) through seccomp, leaving Shocker-related protection effectively dependent on capability bounding alone. The expected posture is dual-layer denial (seccomp+ capabilities), with both NR 303 and NR 304 returningEPERMfrom seccomp.How did you fix it?
Added a dedicated seccomp regression check for released agent images
scripts/ci/check-agent-seccomp-syscalls.shname_to_handle_atandopen_by_handle_atare denied withEPERM(x86_64 syscall numbers), with explicit architecture and libc handling.Enforced the check in the release pipeline
.github/workflows/release.yml(build-agentjob) to run the seccomp regression check immediately after image build/push and before signing.Testing