feat: harden seccomp profile with deny-by-default approach #321
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.
Switches seccomp profile from allowlist-with-denies (
SCMP_ACT_ALLOWdefault) to deny-by-default (SCMP_ACT_ERRNOdefault), reducing attack surface by blocking unknown/new syscalls automatically.Changes
Seccomp Profile (
containers/agent/seccomp-profile.json)defaultActionfromSCMP_ACT_ALLOWtoSCMP_ACT_ERRNOTests (
src/seccomp-validation.test.ts)Documentation
docs/architecture.md: Added "Container Security Hardening" sectionAGENTS.md: Updated agent container description with seccomp/capability infoProfile Structure
{ "defaultAction": "SCMP_ACT_ERRNO", "defaultErrnoRet": 1, "syscalls": [ { "names": ["read", "write", "open", "..."], "action": "SCMP_ACT_ALLOW", "comment": "Allow syscalls required for normal container operation" }, { "names": ["ptrace", "process_vm_readv", "process_vm_writev"], "action": "SCMP_ACT_ERRNO", "errnoRet": 1, "comment": "Explicitly deny: Process inspection/modification - container escape vector" } ] }Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.