OpenScope plan claude-code-local-broker

source
docs/examples/claude-code/setup.proposal.yaml
sha256
1dcb9b98e17fadf85ca70c137743c4c9797a8318f9d2dd4dc8761f5177df139f
machine
randy @ Randys-Mac-mini-2.local (darwin) · daemon: running
bounds
default (no bounds.yaml — opinionated defaults)
⛔ BLOCKED — 2 bounds violation(s). apply will refuse until resolved.
AI-AUTHORED METADATA — untrusted, not used in the review

tool claude-code · model claude-fable-5 · session 8d5656ce

Seed config for the claude-code agent, derived from a mining pass over ~/.claude session history (10,560 commands). Everything was observed in use.

Changes vs live config

AreaChange
ssh targets+4 add, -0 remove
system allow-listsfirst write (was empty) — 3 mgrs · 6 pkgs · 2 svcs · 7 procs · 4 ports
policy rules+35 allow, +3 deny (new vs live)

This proposal only ADDS access; nothing is narrowed or removed.

What it will be able to do (from typed fields)

AgentApp · ActionScope
claude-codessh·check_hosttarget=kidfence-prod
claude-codessh·check_hosttarget=kidfence-www
claude-codessh·check_hosttarget=openscope-demo
claude-codessh·check_hosttarget=trusted-ds
claude-codessh·host_metricstarget=kidfence-prod
claude-codessh·host_metricstarget=kidfence-www
claude-codessh·host_metricstarget=openscope-demo
claude-codessh·host_metricstarget=trusted-ds
claude-codessh·list_dirtarget=kidfence-prod
claude-codessh·list_dirtarget=kidfence-www
claude-codessh·list_dirtarget=openscope-demo
claude-codessh·list_dirtarget=trusted-ds
claude-codessh·read_filetarget=kidfence-prod
claude-codessh·read_filetarget=kidfence-www
claude-codessh·read_filetarget=openscope-demo
claude-codessh·read_filetarget=trusted-ds
claude-codessh·restart_servicetarget=trusted-ds
claude-codessh·restart_serviceservice=openscoped target=openscope-demo
claude-codessh·restart_serviceservice=nginx target=kidfence-prod
claude-codessh·service_statustarget=kidfence-prod
claude-codessh·service_statustarget=openscope-demo
claude-codessh·service_statustarget=trusted-ds
claude-codessh·tail_logstarget=kidfence-prod
claude-codessh·tail_logstarget=openscope-demo
claude-codessh·tail_logstarget=trusted-ds
claude-codesystem·buildALL (scoped by admin allow-lists)
claude-codesystem·check_portALL (scoped by admin allow-lists)
claude-codesystem·manage_appsALL (scoped by admin allow-lists)
claude-codesystem·manage_filesALL (scoped by admin allow-lists)
claude-codesystem·manage_packagesmanager=brew
claude-codesystem·manage_packagesmanager=pip3
claude-codesystem·manage_packagesmanager=npm
claude-codesystem·manage_processesALL (scoped by admin allow-lists)
claude-codesystem·manage_servicesALL (scoped by admin allow-lists)
claude-codesystem·release_portALL (scoped by admin allow-lists)

Findings ⛔ 2 blocking · 🔴 7 high · 🟡 7 medium · ⚪ 4 warn · ✅ 2 pass

SeverityRuleResourceSummary
🔴 HIGHSSH-ROOT-USERkidfence-prod (api.kidfence.ai)logs in as root — every action runs with full root on this host
🔴 HIGHSSH-ROOT-USERkidfence-www (kidfence.ai)logs in as root — every action runs with full root on this host
🔴 HIGHSSH-ROOT-USERopenscope-demo (demo.openscopeai.com)logs in as root — every action runs with full root on this host
🔴 HIGHSSH-ROOT-USERtrusted-ds (openscopeai.org)logs in as root — every action runs with full root on this host
⛔ BLOCKSSH-SECRET-PATHkidfence-prod:/etc/nginxread access reaches secrets at /etc/nginx/ssl
🔴 HIGHSSH-DISRUPTIVEkidfence-prodmay restart services — a one-command outage on a production host
🔴 HIGHSSH-DISRUPTIVEopenscope-demomay restart services — a one-command outage on a production host
🔴 HIGHSSH-DISRUPTIVEtrusted-dsmay restart services — a one-command outage on a production host
⛔ BLOCKSYS-APP-CODEEXEC3 agent-writable source(s)manage_apps installs+launches into /Applications from /Users/randy/Library/Developer/Xcode/DerivedData (owned by uid 501 (not root)); /Volumes/2TB-1/src (owned by uid 501 (not root)); /tmp (world-writable) — arbitrary code execution as your user
🟡 MEDIUMSSH-FILE-SECRETkidfence-prod:/opt/kidfence/compose.ymlcompose.yml commonly inlines secrets/env — read grant exposes them
🟡 MEDIUMSSH-BROAD-PREFIXkidfence-prod:/var/logbroad read prefix — credentials can leak into files here
🟡 MEDIUMSSH-WEBROOT-CONFIGkidfence-prod:/var/www/kidfence.aiweb root — read may expose app config such as .env
🟡 MEDIUMSSH-WEBROOT-CONFIGkidfence-www:/var/www/kidfence.aiweb root — read may expose app config such as .env
🟡 MEDIUMSSH-BROAD-PREFIXopenscope-demo:/var/logbroad read prefix — credentials can leak into files here
🟡 MEDIUMSSH-BROAD-PREFIXtrusted-ds:/var/logbroad read prefix — credentials can leak into files here
🟡 MEDIUMSYS-DISRUPTIVEmanage_processeskill-by-PID enabled with broad process names — local DoS surface
⚠️ WARNSSH-KEY-EXPOSEDkidfence-prodno identity_file — ssh uses ~/.ssh, readable by the agent
⚠️ WARNSSH-KEY-EXPOSEDkidfence-wwwno identity_file — ssh uses ~/.ssh, readable by the agent
⚠️ WARNSSH-KEY-EXPOSEDopenscope-demono identity_file — ssh uses ~/.ssh, readable by the agent
⚠️ WARNSSH-KEY-EXPOSEDtrusted-dsno identity_file — ssh uses ~/.ssh, readable by the agent
✅ PASSSYS-NO-SUDOpackagesno sudo-enabled managers — no NOPASSWD sudoers wildcards generated
✅ PASSPOLICY-DENY-PRESENTpolicy3 defense-in-depth deny rules present (deny overrides allow)

Fixes for blocking findings

Bounds (root-owned envelope)

CheckStatusDetail
no_sudo_managers✅ pass0 found
ssh.read_path_reaches_secret⛔ FAIL1 found
system.app_install_from_writable_source⛔ FAIL1 found
max_targets_per_agent✅ pass≤ 16
ssh.root_user⚠️ acknowledge4 to confirm