manifest: add proc.exec capability (hardened target)#24
Merged
Conversation
Add proc.exec to KnownCaps so an app can declare permission to spawn one local executable — the CLI it fronts. This unblocks the app-store CLI adapter archetype. The grant target must name exactly one binary: an absolute path or a bare command name ([A-Za-z0-9._-] segments). A wildcard, a path with '..', spaces, or any shell metacharacter is rejected at validation, so a proc.exec grant can never mean 'run anything'. Declaration-only, like audit.log: the app execs the child itself, so there is no per-call broker hook. proc.exec is intentionally NOT in the sideload allow-list — CLI apps install through the reviewed catalogue (guarded). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Adds a new app-store capability
proc.execso an app can declare permission to spawn one local executable — the CLI it fronts. This is the platform half of the app-store CLI adapter archetype: it letspilotctl appstore call <app> <args>translate into a local subprocess invocation.What changes
pkg/manifest/validate.go: addproc.exectoKnownCaps./usr/local/bin/tool) or a bare command (gh),[A-Za-z0-9._-]segments only. A*wildcard, a path containing.., spaces, or any shell metacharacter is rejected. Aproc.execgrant can never mean "run anything".Model & security
audit.log: the app execs the child itself, so there is no per-call broker hook — the capability is the install-consented, validated declaration of intent. No interactive consent is added anywhere.proc.execis intentionally not added to the sideload allow-list, so an unreviewed--localapp can never carry it. CLI apps shipprotection: guardedand install through the reviewed catalogue.sandbox-exec/ seccompexecveallow-list) remains the documented next hardening step.Tests
pkg/manifesttests cover: valid absolute-path + bare-command targets, rejection of wildcard/shell/../newline targets, the empty-target path, and a guard that sideload policy still rejectsproc.exec.🤖 Generated with Claude Code