vibe-forge 0.8.3 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/security.md CHANGED
@@ -1,195 +1,195 @@
1
- # Vibe Forge Security Documentation
2
-
3
- This document explains security considerations and intentional design decisions in Vibe Forge.
4
-
5
- ## Agent Permission Model
6
-
7
- ### How It Works
8
-
9
- Vibe Forge agents run with **allowlist-based permissions** defined in `.claude/settings.json`. This replaces the previous `--dangerously-skip-permissions` approach with a defense-in-depth model:
10
-
11
- 1. **Allowlist** (`.claude/settings.json`) - Pre-approves safe operations (file reads, writes, git, npm, etc.)
12
- 2. **Heimdall** (pre-tool hook) - Intercepts and gates forge-specific policy (branch protection, etc.)
13
- 3. **Claude Code native prompts** - Anything not in the allowlist still requires user approval
14
-
15
- ```
16
- Agent wants to run a command
17
- |
18
- v
19
- ┌─────────────────┐
20
- │ Allowlist check │──── Not allowed ──> User prompted
21
- └────────┬────────┘
22
- │ Allowed
23
- v
24
- ┌─────────────────┐
25
- │ Heimdall hook │──── Policy violation ──> Blocked
26
- └────────┬────────┘
27
- │ Pass
28
- v
29
- Executed
30
- ```
31
-
32
- ### What Agents Can Do Without Prompting
33
-
34
- The allowlist covers normal development operations:
35
- - Read, write, and edit files
36
- - Search with glob/grep
37
- - Run git commands (status, diff, add, commit, push, branch, etc.)
38
- - Run GitHub CLI (PRs, runs, workflows)
39
- - Run npm (test, install, audit, build)
40
- - Run node/npx scripts
41
- - File operations (ls, cp, mv, mkdir, find)
42
- - SQLite operations
43
-
44
- ### What Still Requires Approval
45
-
46
- Anything not in the allowlist prompts the user:
47
- - Installing system packages (apt, brew, etc.)
48
- - Running unfamiliar binaries
49
- - Network operations (curl, wget) unless via node
50
- - Destructive operations not covered by git (rm -rf, etc.)
51
-
52
- ### Heimdall Policy Layer
53
-
54
- Heimdall is a pre-tool hook that enforces forge-specific rules on top of the allowlist:
55
- - Blocks direct pushes to main/master
56
- - Enforces branch naming conventions
57
- - Gates security-sensitive operations
58
-
59
- Heimdall runs on every Bash tool call regardless of allowlist status.
60
-
61
- ### Why Not --dangerously-skip-permissions?
62
-
63
- The `--dsp` flag disables ALL permission checks. The allowlist approach is better because:
64
- - Only known-safe operations are pre-approved
65
- - Unknown commands still prompt for approval
66
- - Heimdall policies still enforce forge rules
67
- - The security posture is auditable (read `.claude/settings.json`)
68
-
69
- Users who prefer the fully autonomous workflow can still use `--dsp` in their own terminals.
70
-
71
- ### Trust Boundary: Shared Allowlist
72
-
73
- All forge agents share a single allowlist defined in `.claude/settings.json`. There are no per-agent permission boundaries. This means:
74
-
75
- - **Anvil** (frontend) has the same file-write permissions as **Aegis** (security)
76
- - A compromised or confused agent personality cannot be contained by permissions alone
77
- - Heimdall policies provide some per-agent gating (e.g. branch protection) but do not restrict filesystem scope
78
-
79
- This is an accepted architectural trade-off. Per-agent permission boundaries would require separate `settings.json` files per agent and a launcher that selects the correct one, which adds complexity without proportional security benefit in a single-developer, local-only workflow.
80
-
81
- **Mitigations:**
82
- - Version control (git) makes all file changes reviewable and revertible
83
- - Heimdall enforces structural policies (no direct push to main, naming conventions)
84
- - Sentinel code review catches inappropriate changes before merge
85
- - The dashboard provides visibility into what each agent is doing
86
-
87
- **Future consideration:** If Vibe Forge supports multi-developer or remote execution (T3-4), per-agent permission boundaries should be revisited.
88
-
89
- ## Dashboard Security
90
-
91
- ### Session Token Authentication
92
-
93
- The dashboard server generates a cryptographic session token at startup:
94
- - Written to `.forge/dashboard.token` with mode 0600
95
- - All API endpoints require `X-Forge-Token` header
96
- - WebSocket connections require `?token=` query parameter
97
- - Token is cleaned up on server shutdown
98
- - `/api/health` is exempt (monitoring probes)
99
-
100
- ### Same-Origin Protection
101
-
102
- The dashboard serves no CORS headers. Browsers enforce same-origin policy, meaning:
103
- - Only the dashboard UI (served from the same origin) can call the API
104
- - Cross-origin requests from malicious websites are blocked
105
- - The `/api/token` bootstrap endpoint is protected by same-origin policy
106
-
107
- ### Why This Matters
108
-
109
- Without these protections, any website you visit could dispatch tasks to your forge agents via cross-origin API calls. Combined with agent permissions, this would allow arbitrary code execution. The session token + same-origin combination eliminates this attack vector.
110
-
111
- ## Additional Security Measures
112
-
113
- ### Agent Whitelist Validation
114
-
115
- All agent names go through strict whitelist validation before execution:
116
-
117
- ```bash
118
- resolve_agent() {
119
- local canonical="${AGENT_ALIASES[$normalized]:-}"
120
- if [[ -n "$canonical" ]]; then
121
- echo "$canonical"
122
- return 0
123
- fi
124
- return 1 # Reject unknown agents
125
- }
126
- ```
127
-
128
- ### Path Traversal Protection
129
-
130
- Personality file paths are validated to remain within expected directories:
131
-
132
- ```bash
133
- get_agent_personality_path() {
134
- local real_path=$(cd "$(dirname "$personality_path")" && pwd)/$(basename "$personality_path")
135
- local agents_dir=$(cd "$forge_root/agents" && pwd)
136
- if [[ "$real_path" != "$agents_dir"/* ]]; then
137
- echo "Security error: Path traversal detected" >&2
138
- return 1
139
- fi
140
- }
141
- ```
142
-
143
- ### Daemon Security
144
-
145
- The background daemon includes:
146
- - **Symlink protection**: Skips symlinks to prevent symlink attacks
147
- - **Path validation**: Verifies destinations within FORGE_ROOT
148
- - **Atomic operations**: Temp files + move for safe writes
149
- - **Lock files**: Prevents multiple daemon instances
150
- - **SQL escaping**: All database inputs go through `db_escape()`
151
- - **Input sanitization**: Frontmatter extraction strips shell metacharacters
152
-
153
- ### Alias Collision Detection
154
-
155
- Agent alias collisions are checked at three levels:
156
- - Pre-commit hook (local development)
157
- - CI lint job (GitHub Actions)
158
- - `forge init` (project setup)
159
-
160
- ## Risks to Be Aware Of
161
-
162
- 1. **Allowlisted operations execute without confirmation** - agents can modify files, run tests, and push code
163
- 2. **Prompt injection** - crafted task files or context could influence agent behavior
164
- 3. **Heimdall is not exhaustive** - it enforces known policies, not all possible risks
165
- 4. **Local network exposure** - the dashboard binds to localhost only; changing this has security implications
166
-
167
- ## Recommendations
168
-
169
- 1. **Use in development environments only**
170
- 2. **Use with version control** - git makes it easy to review and revert
171
- 3. **Review at checkpoints** - check agent work during task transitions
172
- 4. **Keep project context secure** - don't include secrets in context files
173
- 5. **Audit the allowlist** - review `.claude/settings.json` for your comfort level
174
- 6. **Run in isolated environments** - consider containers for sensitive projects
175
-
176
- ## Reporting Security Issues
177
-
178
- If you discover a security vulnerability in Vibe Forge:
179
-
180
- 1. **Do not open a public issue**
181
- 2. Email security concerns to the maintainers
182
- 3. Include steps to reproduce
183
- 4. Allow time for a fix before public disclosure
184
-
185
- ## Security Checklist for Contributors
186
-
187
- When contributing to Vibe Forge:
188
-
189
- - [ ] Never pass user input directly to shell commands
190
- - [ ] Always validate agent names against the whitelist
191
- - [ ] Use safe JSON parsing (Node.js, not grep/cut)
192
- - [ ] Validate file paths don't traverse outside expected directories
193
- - [ ] Use atomic file operations where race conditions are possible
194
- - [ ] Add tests for security-sensitive functions
195
- - [ ] Document any new security considerations
1
+ # Vibe Forge Security Documentation
2
+
3
+ This document explains security considerations and intentional design decisions in Vibe Forge.
4
+
5
+ ## Agent Permission Model
6
+
7
+ ### How It Works
8
+
9
+ Vibe Forge agents run with **allowlist-based permissions** defined in `.claude/settings.json`. This replaces the previous `--dangerously-skip-permissions` approach with a defense-in-depth model:
10
+
11
+ 1. **Allowlist** (`.claude/settings.json`) - Pre-approves safe operations (file reads, writes, git, npm, etc.)
12
+ 2. **Heimdall** (pre-tool hook) - Intercepts and gates forge-specific policy (branch protection, etc.)
13
+ 3. **Claude Code native prompts** - Anything not in the allowlist still requires user approval
14
+
15
+ ```
16
+ Agent wants to run a command
17
+ |
18
+ v
19
+ ┌─────────────────┐
20
+ │ Allowlist check │──── Not allowed ──> User prompted
21
+ └────────┬────────┘
22
+ │ Allowed
23
+ v
24
+ ┌─────────────────┐
25
+ │ Heimdall hook │──── Policy violation ──> Blocked
26
+ └────────┬────────┘
27
+ │ Pass
28
+ v
29
+ Executed
30
+ ```
31
+
32
+ ### What Agents Can Do Without Prompting
33
+
34
+ The allowlist covers normal development operations:
35
+ - Read, write, and edit files
36
+ - Search with glob/grep
37
+ - Run git commands (status, diff, add, commit, push, branch, etc.)
38
+ - Run GitHub CLI (PRs, runs, workflows)
39
+ - Run npm (test, install, audit, build)
40
+ - Run node/npx scripts
41
+ - File operations (ls, cp, mv, mkdir, find)
42
+ - SQLite operations
43
+
44
+ ### What Still Requires Approval
45
+
46
+ Anything not in the allowlist prompts the user:
47
+ - Installing system packages (apt, brew, etc.)
48
+ - Running unfamiliar binaries
49
+ - Network operations (curl, wget) unless via node
50
+ - Destructive operations not covered by git (rm -rf, etc.)
51
+
52
+ ### Heimdall Policy Layer
53
+
54
+ Heimdall is a pre-tool hook that enforces forge-specific rules on top of the allowlist:
55
+ - Blocks direct pushes to main/master
56
+ - Enforces branch naming conventions
57
+ - Gates security-sensitive operations
58
+
59
+ Heimdall runs on every Bash tool call regardless of allowlist status.
60
+
61
+ ### Why Not --dangerously-skip-permissions?
62
+
63
+ The `--dsp` flag disables ALL permission checks. The allowlist approach is better because:
64
+ - Only known-safe operations are pre-approved
65
+ - Unknown commands still prompt for approval
66
+ - Heimdall policies still enforce forge rules
67
+ - The security posture is auditable (read `.claude/settings.json`)
68
+
69
+ Users who prefer the fully autonomous workflow can still use `--dsp` in their own terminals.
70
+
71
+ ### Trust Boundary: Shared Allowlist
72
+
73
+ All forge agents share a single allowlist defined in `.claude/settings.json`. There are no per-agent permission boundaries. This means:
74
+
75
+ - **Anvil** (frontend) has the same file-write permissions as **Aegis** (security)
76
+ - A compromised or confused agent personality cannot be contained by permissions alone
77
+ - Heimdall policies provide some per-agent gating (e.g. branch protection) but do not restrict filesystem scope
78
+
79
+ This is an accepted architectural trade-off. Per-agent permission boundaries would require separate `settings.json` files per agent and a launcher that selects the correct one, which adds complexity without proportional security benefit in a single-developer, local-only workflow.
80
+
81
+ **Mitigations:**
82
+ - Version control (git) makes all file changes reviewable and revertible
83
+ - Heimdall enforces structural policies (no direct push to main, naming conventions)
84
+ - Sentinel code review catches inappropriate changes before merge
85
+ - The dashboard provides visibility into what each agent is doing
86
+
87
+ **Future consideration:** If Vibe Forge supports multi-developer or remote execution (T3-4), per-agent permission boundaries should be revisited.
88
+
89
+ ## Dashboard Security
90
+
91
+ ### Session Token Authentication
92
+
93
+ The dashboard server generates a cryptographic session token at startup:
94
+ - Written to `.forge/dashboard.token` with mode 0600
95
+ - All API endpoints require `X-Forge-Token` header
96
+ - WebSocket connections require `?token=` query parameter
97
+ - Token is cleaned up on server shutdown
98
+ - `/api/health` is exempt (monitoring probes)
99
+
100
+ ### Same-Origin Protection
101
+
102
+ The dashboard serves no CORS headers. Browsers enforce same-origin policy, meaning:
103
+ - Only the dashboard UI (served from the same origin) can call the API
104
+ - Cross-origin requests from malicious websites are blocked
105
+ - The `/api/token` bootstrap endpoint is protected by same-origin policy
106
+
107
+ ### Why This Matters
108
+
109
+ Without these protections, any website you visit could dispatch tasks to your forge agents via cross-origin API calls. Combined with agent permissions, this would allow arbitrary code execution. The session token + same-origin combination eliminates this attack vector.
110
+
111
+ ## Additional Security Measures
112
+
113
+ ### Agent Whitelist Validation
114
+
115
+ All agent names go through strict whitelist validation before execution:
116
+
117
+ ```bash
118
+ resolve_agent() {
119
+ local canonical="${AGENT_ALIASES[$normalized]:-}"
120
+ if [[ -n "$canonical" ]]; then
121
+ echo "$canonical"
122
+ return 0
123
+ fi
124
+ return 1 # Reject unknown agents
125
+ }
126
+ ```
127
+
128
+ ### Path Traversal Protection
129
+
130
+ Personality file paths are validated to remain within expected directories:
131
+
132
+ ```bash
133
+ get_agent_personality_path() {
134
+ local real_path=$(cd "$(dirname "$personality_path")" && pwd)/$(basename "$personality_path")
135
+ local agents_dir=$(cd "$forge_root/agents" && pwd)
136
+ if [[ "$real_path" != "$agents_dir"/* ]]; then
137
+ echo "Security error: Path traversal detected" >&2
138
+ return 1
139
+ fi
140
+ }
141
+ ```
142
+
143
+ ### Daemon Security
144
+
145
+ The background daemon includes:
146
+ - **Symlink protection**: Skips symlinks to prevent symlink attacks
147
+ - **Path validation**: Verifies destinations within FORGE_ROOT
148
+ - **Atomic operations**: Temp files + move for safe writes
149
+ - **Lock files**: Prevents multiple daemon instances
150
+ - **SQL escaping**: All database inputs go through `db_escape()`
151
+ - **Input sanitization**: Frontmatter extraction strips shell metacharacters
152
+
153
+ ### Alias Collision Detection
154
+
155
+ Agent alias collisions are checked at three levels:
156
+ - Pre-commit hook (local development)
157
+ - CI lint job (GitHub Actions)
158
+ - `forge init` (project setup)
159
+
160
+ ## Risks to Be Aware Of
161
+
162
+ 1. **Allowlisted operations execute without confirmation** - agents can modify files, run tests, and push code
163
+ 2. **Prompt injection** - crafted task files or context could influence agent behavior
164
+ 3. **Heimdall is not exhaustive** - it enforces known policies, not all possible risks
165
+ 4. **Local network exposure** - the dashboard binds to localhost only; changing this has security implications
166
+
167
+ ## Recommendations
168
+
169
+ 1. **Use in development environments only**
170
+ 2. **Use with version control** - git makes it easy to review and revert
171
+ 3. **Review at checkpoints** - check agent work during task transitions
172
+ 4. **Keep project context secure** - don't include secrets in context files
173
+ 5. **Audit the allowlist** - review `.claude/settings.json` for your comfort level
174
+ 6. **Run in isolated environments** - consider containers for sensitive projects
175
+
176
+ ## Reporting Security Issues
177
+
178
+ If you discover a security vulnerability in Vibe Forge:
179
+
180
+ 1. **Do not open a public issue**
181
+ 2. Email security concerns to the maintainers
182
+ 3. Include steps to reproduce
183
+ 4. Allow time for a fix before public disclosure
184
+
185
+ ## Security Checklist for Contributors
186
+
187
+ When contributing to Vibe Forge:
188
+
189
+ - [ ] Never pass user input directly to shell commands
190
+ - [ ] Always validate agent names against the whitelist
191
+ - [ ] Use safe JSON parsing (Node.js, not grep/cut)
192
+ - [ ] Validate file paths don't traverse outside expected directories
193
+ - [ ] Use atomic file operations where race conditions are possible
194
+ - [ ] Add tests for security-sensitive functions
195
+ - [ ] Document any new security considerations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-forge",
3
- "version": "0.8.3",
3
+ "version": "0.8.6",
4
4
  "description": "Multi-agent development orchestration system for terminal-native vibe coding",
5
5
  "keywords": [
6
6
  "vibe-coding",
@@ -71,7 +71,6 @@
71
71
  "node": ">=16.0.0"
72
72
  },
73
73
  "dependencies": {
74
- "js-yaml": "^4.1.1",
75
- "msedge-tts": "^2.0.4"
74
+ "js-yaml": "^4.1.1"
76
75
  }
77
76
  }