mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #237] [MERGED] fix(privileges): make scoped-spawn capability tests root-aware #278
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#278
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/237
Author: @huajq
Created: 9/1/2026
Status: ✅ Merged
Merged: 9/2/2026
Merged by: @yingdi-shan
Base:
main← Head:fix/privileges-test-root-aware📝 Commits (1)
414154cfix(privileges): make scoped-spawn capability tests root-aware📊 Changes
2 files changed (+23 additions, -2 deletions)
View changed files
📝
CLAUDE.md(+2 -0)📝
src/privileges.rs(+21 -2)📄 Description
What
Makes the
src/privileges.rsscoped-spawn capability tests pass when run as root: under root, assertions now cover onlyCapInh/CapAmbinstead of all four capability sets.Why
On
execve, the kernel regrants an euid-0 child the full bounding set inCapPrm/CapEffunlessSECBIT_NOROOTis set — so the all-sets-zero expectation only holds for non-root runners (CI). Under root,CapInh(preserved acrossexecve) andCapAmb(survives only within the permitted ∩ inheritable intersection) are the sets that actually prove what the scoped spawn delegated.Related issue
Closes #169
Scope and non-goals
Included: root-aware capability assertions shared by the three scoped-spawn tests; a
make test-unitenvironment note inCLAUDE.md.Excluded: enforcing isolation under root via
SECBIT_NOROOT— that changes scoped-spawn semantics for root deployments and deserves its own discussion (follow-up #2 in the issue).Compatibility and operations
Test-only change plus a documentation note; no runtime behavior, API, config, or storage impact.
Validation
make fmtmake clippymake test-unitCommands and results:
Risks and reviewer notes
None — test assertions and docs only. The non-root assertion set is unchanged, so CI behavior is identical.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.