Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

docs: state the binary-level scope of the unattended allowlist (#5669)

Adam Eivyd80f688d0156
diff --git a/server/lib/commandSecurity.js b/server/lib/commandSecurity.js
index dc4b922eba..71c8fb6c9d 100644
--- a/server/lib/commandSecurity.js
+++ b/server/lib/commandSecurity.js
@@ -23,6 +23,13 @@ export const ALLOWED_COMMANDS_SORTED = Array.from(ALLOWED_COMMANDS).sort();
// `python`, `pip`, `curl`, `wget`, `go`, `cargo`, `make`, `brew`, `pm2`, …).
// `npx <pkg>` / `pip install <pkg>` / `curl -o <path> <url>` contain no shell
// metacharacter, so the metacharacter filter alone does NOT stop them.
+//
+// Scope: this gate is binary-level, not subcommand-level. Every admitted binary
+// is one whose *documented* use here is inspection, but a few are multi-purpose
+// (`git commit`, `find -delete`, `gh api -X POST`) and are NOT rejected. That is
+// a deliberately smaller step than subcommand gating: it removes remote-code
+// fetch/exec from the unattended lane, which is the class that turns hostile
+// config into arbitrary RCE. Subcommand gating is tracked separately.
export const UNATTENDED_READONLY_COMMANDS = new Set([
'git', 'gh', 'glab',
'ls', 'cat', 'head', 'tail', 'grep', 'find', 'wc',
diff --git a/server/lib/commandSecurity.test.js b/server/lib/commandSecurity.test.js
index cde5c94b88..7d786224e2 100644
--- a/server/lib/commandSecurity.test.js
+++ b/server/lib/commandSecurity.test.js
@@ -326,10 +326,10 @@ describe('commandSecurity', () => {
})
it('parses args the same way as validateCommand', () => {
- const result = validateUnattendedCommand('git commit -m "msg with spaces"')
+ const result = validateUnattendedCommand('git log --grep "two words"')
expect(result.valid).toBe(true)
expect(result.baseCommand).toBe('git')
- expect(result.args).toEqual(['commit', '-m', 'msg with spaces'])
+ expect(result.args).toEqual(['log', '--grep', 'two words'])
})
it.each([