feat: add no-new-privileges and ptrace syscall blocking#139
Conversation
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
|
💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...] |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
Smoke Test Results (Run #20378117886)Last 2 Merged PRs:
Test Results:
Status: PASS
|
Smoke Test ResultsLast 2 merged PRs:
✅ GitHub MCP - PASS Status: FAIL
|
Test Coverage Report
Coverage ThresholdsThe project has the following coverage thresholds configured:
Coverage report generated by `npm run test:coverage` |
There was a problem hiding this comment.
Pull request overview
This PR enhances container security by adding the no-new-privileges security option and blocking dangerous process inspection syscalls (ptrace, process_vm_readv, process_vm_writev) through the seccomp profile. This implements a defense-in-depth approach where capabilities (SYS_PTRACE) were already dropped, and now seccomp provides an additional layer of protection against process inspection and privilege escalation attacks.
Key Changes:
- Added
no-new-privileges:trueto prevent privilege escalation via setuid binaries - Blocked
ptrace,process_vm_readv, andprocess_vm_writevsyscalls in the seccomp profile - Updated tests to verify the new
no-new-privilegessecurity option
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| containers/agent/seccomp-profile.json | Added new syscall blocking rule for ptrace and process memory access syscalls |
| src/docker-manager.ts | Added no-new-privileges:true to security_opt array and updated comment to reflect both security mechanisms |
| src/docker-manager.test.ts | Added test assertion to verify no-new-privileges is enabled in the security configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AWF uses Docker's default seccomp profile with no custom syscall restrictions for process inspection. Combined with
NET_ADMINcapability, this allows dangerous syscalls likeptraceandprocess_vm_readv/process_vm_writevto be available to code running in the container.Changes
ptrace,process_vm_readv,process_vm_writevto blocked syscallsno-new-privileges:truetosecurity_optto prevent privilege escalation via setuid binariesno-new-privileges:trueDefense-in-depth
The
SYS_PTRACEcapability was already dropped, but seccomp provides an additional layer:{ "names": ["ptrace", "process_vm_readv", "process_vm_writev"], "action": "SCMP_ACT_ERRNO", "errnoRet": 1, "comment": "Block process inspection/modification" }Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.