You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doctor-common.sh doctor status/check formatting helpers
35
37
json-common.sh shared JSON field extraction helper (jq)
38
+
baudbot-runtime.sh runtime/status/session/attach helper module for bin/baudbot
36
39
hooks/
37
40
pre-commit blocks agent from modifying security files in git
38
41
pi/
@@ -42,7 +45,7 @@ pi/
42
45
heartbeat.ts periodic health check loop
43
46
auto-name.ts session naming
44
47
control.ts inter-session communication
45
-
idle-compact.ts compact context during idle periods (40% threshold)
48
+
idle-compact.ts compact context during idle periods (default 25% threshold)
46
49
...
47
50
skills/ source of truth for agent skill templates
48
51
control-agent/ orchestration agent
@@ -66,7 +69,7 @@ See [CONFIGURATION.md](CONFIGURATION.md) for all env vars and how to obtain them
66
69
67
70
## Architecture: Source / Runtime Separation
68
71
69
-
The admin owns source checkouts (for example `~/baudbot/`). The agent (`baudbot_agent`user) owns runtime state. The agent **cannot read the source repo** — admin home is `700`.
72
+
Live execution is release/runtime-based (`/opt/baudbot` + `baudbot_agent` runtime).
70
73
71
74
Live operations are now release-based under `/opt/baudbot` (git-free):
Copy file name to clipboardExpand all lines: SECURITY.md
+39-47Lines changed: 39 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,31 +2,24 @@
2
2
3
3
For product overview and team workflow context, start with [README.md](README.md). For architecture and operations docs, see [`docs/architecture.md`](docs/architecture.md) and [`docs/operations.md`](docs/operations.md).
@@ -66,14 +59,13 @@ Admin edits source → runs `bin/deploy.sh` → copies to runtime with correct p
66
59
67
60
| Layer | What | Bypassed by |
68
61
|-------|------|-------------|
69
-
|**Read-only source**|~/baudbot/ lives under admin home (700 perms) — agent has zero access. Optional bind mount for defense-in-depth (not applied by default). | Root access |
62
+
|**Immutable releases**|Runtime deploys from git-free snapshots under `/opt/baudbot/releases/<sha>`, reducing direct source-tampering risk during live execution. | Root access |
70
63
|**File permissions**| Security-critical runtime files deployed `chmod a-w` by deploy.sh. Hard OS-level boundary — blocks `sed`, `python`, any write mechanism. | Root access or `chmod u+w` (which tool-guard blocks) |
71
64
|**Tool-guard rules**| Policy/guidance layer: blocks many high-risk Edit/Write/bash patterns and returns safety-interruption reasoning. Not a hard sandbox; novel command patterns may bypass it. | Novel bypass patterns; rely on OS file perms + runtime hardening for hard boundaries |
72
65
|**Integrity checks**| security-audit.sh compares runtime file hashes against deploy manifest | None (detection, not prevention) |
73
-
|**Pre-commit hook**| Blocks git commit of protected files in source repo| --no-verify (root-owned hook) |
66
+
|**Pre-commit hook**| Blocks git commit of protected files in the repository| --no-verify (root-owned hook) |
74
67
75
-
The read-only source repo is the primary defense. Even if the agent modifies runtime copies,
76
-
the admin can re-deploy from the untampered source at any time.
68
+
Primary hard boundaries are runtime permissions, user isolation, and release-based deployment. If local source isolation is also enforced, admin can re-deploy from source to restore expected state.
77
69
78
70
## User Model
79
71
@@ -84,21 +76,18 @@ the admin can re-deploy from the untampered source at any time.
84
76
85
77
**Admin → baudbot_agent access**: The admin user is in the `baudbot_agent` group and has `NOPASSWD: ALL` as baudbot_agent via sudo. This is intentional for management. Run `bin/harden-permissions.sh` to ensure pi state files are owner-only (prevents passive group-level reads).
86
78
87
-
**baudbot_agent → admin access**: None. Admin home is `700`, baudbot_agent is not in the admin user's group.
79
+
**baudbot_agent → admin access**: Expected to be none in default installs. This depends on host permissions (for example, admin home mode and group membership) remaining hardened.
88
80
89
81
## Data Flows
90
82
91
-
```
92
-
Slack @mention
93
-
→ slack-bridge (Socket Mode, admin user)
83
+
```text
84
+
Slack message (Socket Mode or broker pull mode)
85
+
→ bridge process (runs in baudbot_agent runtime)
94
86
→ content wrapping (security boundaries added)
95
-
→ Unix socket (~/.pi/session-control/*.sock)
96
-
→ control-agent (pi session, baudbot_agent user)
97
-
→ creates todo
98
-
→ delegates to dev-agent (pi session, baudbot_agent user)
99
-
→ git worktree → code changes → git push
100
-
→ dev-agent reports back
101
-
→ control-agent replies via curl → bridge HTTP API (127.0.0.1:7890)
87
+
→ control-agent (pi session)
88
+
→ creates todo + delegates to dev-agent in worktree
89
+
→ code/test/PR/CI loop
90
+
→ control-agent posts status via bridge local API (127.0.0.1:7890)
0 commit comments