Skip to content

Commit 2285b41

Browse files
committed
README: tighten wording on secondary execution warning
1 parent 00697d9 commit 2285b41

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@
22

33
Tools to let coding agents access the shell with opinionated defaults.
44

5+
## Security model
6+
7+
Most agent actions should run under [`//sandbox`](sandbox/BUILD.bazel).
8+
Command filtering complements sandboxing by narrowly delegating selected CLI
9+
capabilities, including commands that intentionally use the user's ambient
10+
credentials. It is not a substitute for sandboxing.
11+
12+
Command filtering is useful for narrowing which command lines an agent may run:
13+
which binaries are allowed, which subcommands and flags are allowed, and which
14+
logical paths may be passed as arguments. That is a least-authority delegation
15+
mechanism, not a full security boundary.
16+
17+
If an allowed command can use the user's ambient credentials, network access,
18+
or other external authority, then allowing that command is effectively
19+
granting that capability to the agent. Path restrictions such as `<path:r>`
20+
and `<path:w>` only constrain named file arguments; they do not constrain
21+
unrelated side effects a command may have.
22+
23+
For example, a user might grant an agent permission to fetch GitHub Actions
24+
logs via a narrow `gh` rule. That is different from allowing arbitrary `gh`
25+
usage: the rule is a deliberate delegation of one credential-backed
26+
capability, not blanket authority over the GitHub CLI.
27+
28+
Some allowed tools may execute hooks, helpers, pagers, editors, or other
29+
user-controlled programs as part of their normal behavior.
30+
Rules should be written with those secondary execution paths in mind.
31+
32+
Practical guidance:
33+
34+
- Prefer running agent actions in `//sandbox`.
35+
- Use command filters to grant narrow, reviewable capabilities, especially for
36+
tools that intentionally act with the user's ambient credentials.
37+
- Write rules per operation, not per binary.
38+
- Treat each allow-rule as a permission grant that should be reviewed.
39+
540
## License
641

742
Apache-2.0

command_filter/LANGUAGE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ A small language for defining allowed command invocations. Each rule file
44
describes the permitted argument shapes for a command, with path arguments
55
carrying read/write permission annotations.
66

7+
This language describes which command lines are permitted. It does not by
8+
itself provide process isolation. In this repository, most agent actions
9+
should run under `//sandbox`; command filtering is used to narrowly delegate
10+
specific CLI capabilities, including commands that intentionally use ambient
11+
user credentials.
12+
713
## Statements
814

915
Every line is one of two statement types, identified by a keyword prefix:

0 commit comments

Comments
 (0)