agileflow 3.1.0 → 3.2.0
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/CHANGELOG.md +5 -0
- package/README.md +57 -85
- package/lib/dashboard-automations.js +130 -0
- package/lib/dashboard-git.js +254 -0
- package/lib/dashboard-inbox.js +64 -0
- package/lib/dashboard-protocol.js +1 -0
- package/lib/dashboard-server.js +114 -924
- package/lib/dashboard-session.js +136 -0
- package/lib/dashboard-status.js +72 -0
- package/lib/dashboard-terminal.js +354 -0
- package/lib/dashboard-websocket.js +88 -0
- package/lib/drivers/codex-driver.ts +4 -4
- package/lib/logger.js +106 -0
- package/package.json +4 -2
- package/scripts/agileflow-configure.js +2 -2
- package/scripts/agileflow-welcome.js +409 -434
- package/scripts/claude-tmux.sh +80 -2
- package/scripts/context-loader.js +4 -9
- package/scripts/lib/command-prereqs.js +280 -0
- package/scripts/lib/configure-detect.js +92 -2
- package/scripts/lib/configure-features.js +295 -1
- package/scripts/lib/context-formatter.js +468 -233
- package/scripts/lib/context-loader.js +27 -15
- package/scripts/lib/damage-control-utils.js +8 -1
- package/scripts/lib/feature-catalog.js +321 -0
- package/scripts/lib/portable-tasks-cli.js +274 -0
- package/scripts/lib/portable-tasks.js +479 -0
- package/scripts/lib/signal-detectors.js +1 -1
- package/scripts/lib/team-events.js +86 -1
- package/scripts/obtain-context.js +28 -4
- package/scripts/smart-detect.js +17 -0
- package/scripts/strip-ai-attribution.js +63 -0
- package/scripts/team-manager.js +7 -2
- package/scripts/welcome-deferred.js +437 -0
- package/src/core/agents/perf-analyzer-assets.md +174 -0
- package/src/core/agents/perf-analyzer-bundle.md +165 -0
- package/src/core/agents/perf-analyzer-caching.md +160 -0
- package/src/core/agents/perf-analyzer-compute.md +165 -0
- package/src/core/agents/perf-analyzer-memory.md +182 -0
- package/src/core/agents/perf-analyzer-network.md +157 -0
- package/src/core/agents/perf-analyzer-queries.md +155 -0
- package/src/core/agents/perf-analyzer-rendering.md +156 -0
- package/src/core/agents/perf-consensus.md +280 -0
- package/src/core/agents/security-analyzer-api.md +199 -0
- package/src/core/agents/security-analyzer-auth.md +160 -0
- package/src/core/agents/security-analyzer-authz.md +168 -0
- package/src/core/agents/security-analyzer-deps.md +147 -0
- package/src/core/agents/security-analyzer-infra.md +176 -0
- package/src/core/agents/security-analyzer-injection.md +148 -0
- package/src/core/agents/security-analyzer-input.md +191 -0
- package/src/core/agents/security-analyzer-secrets.md +175 -0
- package/src/core/agents/security-consensus.md +276 -0
- package/src/core/agents/test-analyzer-assertions.md +181 -0
- package/src/core/agents/test-analyzer-coverage.md +183 -0
- package/src/core/agents/test-analyzer-fragility.md +185 -0
- package/src/core/agents/test-analyzer-integration.md +155 -0
- package/src/core/agents/test-analyzer-maintenance.md +173 -0
- package/src/core/agents/test-analyzer-mocking.md +178 -0
- package/src/core/agents/test-analyzer-patterns.md +189 -0
- package/src/core/agents/test-analyzer-structure.md +177 -0
- package/src/core/agents/test-consensus.md +294 -0
- package/src/core/commands/{legal/audit.md → audit/legal.md} +13 -13
- package/src/core/commands/{logic/audit.md → audit/logic.md} +12 -12
- package/src/core/commands/audit/performance.md +443 -0
- package/src/core/commands/audit/security.md +443 -0
- package/src/core/commands/audit/test.md +442 -0
- package/src/core/commands/babysit.md +505 -463
- package/src/core/commands/configure.md +8 -8
- package/src/core/commands/research/ask.md +42 -9
- package/src/core/commands/research/import.md +14 -8
- package/src/core/commands/research/list.md +17 -16
- package/src/core/commands/research/synthesize.md +8 -8
- package/src/core/commands/research/view.md +28 -4
- package/src/core/commands/whats-new.md +2 -2
- package/src/core/experts/devops/expertise.yaml +13 -2
- package/src/core/experts/documentation/expertise.yaml +26 -4
- package/src/core/profiles/COMPARISON.md +170 -0
- package/src/core/profiles/README.md +178 -0
- package/src/core/profiles/claude-code.yaml +111 -0
- package/src/core/profiles/codex.yaml +103 -0
- package/src/core/profiles/cursor.yaml +134 -0
- package/src/core/profiles/examples.js +250 -0
- package/src/core/profiles/loader.js +235 -0
- package/src/core/profiles/windsurf.yaml +159 -0
- package/src/core/teams/logic-audit.json +6 -0
- package/src/core/teams/perf-audit.json +71 -0
- package/src/core/teams/security-audit.json +71 -0
- package/src/core/teams/test-audit.json +71 -0
- package/src/core/templates/command-prerequisites.yaml +169 -0
- package/src/core/templates/damage-control-patterns.yaml +9 -0
- package/tools/cli/installers/ide/_base-ide.js +33 -3
- package/tools/cli/installers/ide/claude-code.js +2 -69
- package/tools/cli/installers/ide/codex.js +9 -9
- package/tools/cli/installers/ide/cursor.js +165 -4
- package/tools/cli/installers/ide/windsurf.js +237 -6
- package/tools/cli/lib/content-transformer.js +234 -9
- package/tools/cli/lib/docs-setup.js +1 -1
- package/tools/cli/lib/ide-generator.js +357 -0
- package/tools/cli/lib/ide-registry.js +2 -2
- package/scripts/tmux-task-name.sh +0 -105
- package/scripts/tmux-task-watcher.sh +0 -344
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Multi-agent security vulnerability analysis with consensus voting for finding exploitable weaknesses
|
|
3
|
+
argument-hint: "[file|directory] [DEPTH=quick|deep] [FOCUS=injection|auth|authz|secrets|input|deps|infra|api|all]"
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:audit:security - Multi-agent security vulnerability analysis"
|
|
8
|
+
- "CRITICAL: Deploy analyzers IN PARALLEL in ONE message with multiple Task calls"
|
|
9
|
+
- "CRITICAL: Wait for all results before running consensus (use TaskOutput with block=true)"
|
|
10
|
+
- "CRITICAL: Confidence scoring: CONFIRMED (2+ agree), LIKELY (1 with evidence), INVESTIGATE (1 weak)"
|
|
11
|
+
- "MUST parse arguments: TARGET (file/dir), DEPTH (quick/deep), FOCUS (injection|auth|authz|secrets|input|deps|infra|api|all)"
|
|
12
|
+
- "Pass consensus all analyzer outputs, let it synthesize the final report"
|
|
13
|
+
state_fields:
|
|
14
|
+
- target_path
|
|
15
|
+
- depth
|
|
16
|
+
- focus_areas
|
|
17
|
+
- analyzers_deployed
|
|
18
|
+
- findings_collected
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# /agileflow:audit:security
|
|
22
|
+
|
|
23
|
+
Deploy multiple specialized security vulnerability analyzers in parallel to find exploitable weaknesses, then synthesize results through consensus voting into a prioritized Security Audit Report.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Quick Reference
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
/agileflow:audit:security app/ # Analyze app directory (quick, core 5 analyzers)
|
|
31
|
+
/agileflow:audit:security . DEPTH=deep # Deep analysis - all 8 analyzers
|
|
32
|
+
/agileflow:audit:security src/ FOCUS=injection,auth # Focus on specific areas
|
|
33
|
+
/agileflow:audit:security . DEPTH=deep FOCUS=all # Comprehensive full audit
|
|
34
|
+
/agileflow:audit:security app/api/ FOCUS=api # Check API routes specifically
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## How It Works
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
43
|
+
│ /agileflow:audit:security │
|
|
44
|
+
│ │
|
|
45
|
+
│ 1. Parse arguments (target, depth, focus) │
|
|
46
|
+
│ 2. Deploy analyzers IN PARALLEL │
|
|
47
|
+
│ 3. Collect all findings │
|
|
48
|
+
│ 4. Run consensus coordinator to validate & prioritize │
|
|
49
|
+
│ 5. Generate actionable Security Audit Report │
|
|
50
|
+
└─────────────────────────────────────────────────────────────┘
|
|
51
|
+
|
|
52
|
+
┌─────────┐ ┌──────┐ ┌───────┐ ┌────────┐ ┌───────┐
|
|
53
|
+
│Injection│ │ Auth │ │ Authz │ │Secrets │ │ Input │
|
|
54
|
+
└────┬────┘ └──┬───┘ └───┬───┘ └───┬────┘ └───┬───┘
|
|
55
|
+
│ │ │ │ │
|
|
56
|
+
┌────┴──┐ ┌────┴──┐ ┌────┴──┐ (deep only)
|
|
57
|
+
│ Deps │ │ Infra │ │ API │
|
|
58
|
+
└───┬───┘ └───┬───┘ └───┬───┘
|
|
59
|
+
│ │ │
|
|
60
|
+
└─────────┼─────────┘
|
|
61
|
+
▼
|
|
62
|
+
┌──────────────────────┐
|
|
63
|
+
│ Consensus Coordinator│
|
|
64
|
+
│ (validates, votes, │
|
|
65
|
+
│ generates report) │
|
|
66
|
+
└──────────────────────┘
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Arguments
|
|
72
|
+
|
|
73
|
+
| Argument | Values | Default | Description |
|
|
74
|
+
|----------|--------|---------|-------------|
|
|
75
|
+
| TARGET | file/directory | `.` | What to analyze |
|
|
76
|
+
| DEPTH | quick, deep | quick | quick = core 5 analyzers, deep = all 8 |
|
|
77
|
+
| FOCUS | injection,auth,authz,secrets,input,deps,infra,api,all | all | Which analyzers to deploy |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Step-by-Step Process
|
|
82
|
+
|
|
83
|
+
### STEP 1: Parse Arguments
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
TARGET = first argument or current directory
|
|
87
|
+
DEPTH = quick (default) or deep
|
|
88
|
+
FOCUS = all (default) or comma-separated list
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Analyzer Selection**:
|
|
92
|
+
|
|
93
|
+
| Condition | Analyzers Deployed |
|
|
94
|
+
|-----------|-------------------|
|
|
95
|
+
| `DEPTH=quick` + `FOCUS=all` | injection, auth, authz, secrets, input (core 5) |
|
|
96
|
+
| `DEPTH=deep` + `FOCUS=all` | All 8 analyzers |
|
|
97
|
+
| `FOCUS=injection` | security-analyzer-injection only |
|
|
98
|
+
| `FOCUS=auth` | security-analyzer-auth only |
|
|
99
|
+
| `FOCUS=authz` | security-analyzer-authz only |
|
|
100
|
+
| `FOCUS=secrets` | security-analyzer-secrets only |
|
|
101
|
+
| `FOCUS=input` | security-analyzer-input only |
|
|
102
|
+
| `FOCUS=deps` | security-analyzer-deps only |
|
|
103
|
+
| `FOCUS=infra` | security-analyzer-infra only |
|
|
104
|
+
| `FOCUS=api` | security-analyzer-api only |
|
|
105
|
+
| `FOCUS=injection,auth` | Comma-separated: deploy specified analyzers |
|
|
106
|
+
|
|
107
|
+
**DEPTH behavior**:
|
|
108
|
+
- `quick` (default): Deploy core 5 analyzers. Focus on CRITICAL/HIGH issues only.
|
|
109
|
+
- `deep`: Deploy all 8 analyzers. Include MEDIUM/LOW findings.
|
|
110
|
+
|
|
111
|
+
### STEP 2: Deploy Analyzers in Parallel
|
|
112
|
+
|
|
113
|
+
**CRITICAL**: Deploy ALL selected analyzers in a SINGLE message with multiple Task calls.
|
|
114
|
+
|
|
115
|
+
**Prompt template for each analyzer**:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
TASK: Analyze the following code for {SECURITY_DOMAIN} vulnerabilities.
|
|
119
|
+
|
|
120
|
+
TARGET: {file_path or directory}
|
|
121
|
+
DEPTH: {quick|deep}
|
|
122
|
+
|
|
123
|
+
{For quick depth}: Focus on CRITICAL and HIGH severity issues only. Skip hardening improvements.
|
|
124
|
+
{For deep depth}: Be comprehensive. Include MEDIUM and LOW severity findings.
|
|
125
|
+
|
|
126
|
+
Read the target files and apply your analysis methodology.
|
|
127
|
+
|
|
128
|
+
OUTPUT your findings in your standard format (FINDING-N with location, severity, confidence, CWE, code, explanation, remediation).
|
|
129
|
+
|
|
130
|
+
If no issues found, output: "No {SECURITY_DOMAIN} vulnerabilities found in {TARGET}"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Example deployment (DEPTH=quick, FOCUS=all - deploys core 5)**:
|
|
134
|
+
|
|
135
|
+
```xml
|
|
136
|
+
<invoke name="Task">
|
|
137
|
+
<parameter name="description">Injection vulnerability analysis</parameter>
|
|
138
|
+
<parameter name="prompt">TASK: Analyze the following code for INJECTION vulnerabilities.
|
|
139
|
+
TARGET: src/
|
|
140
|
+
DEPTH: quick
|
|
141
|
+
Focus on CRITICAL and HIGH severity issues only...
|
|
142
|
+
...</parameter>
|
|
143
|
+
<parameter name="subagent_type">security-analyzer-injection</parameter>
|
|
144
|
+
<parameter name="run_in_background">true</parameter>
|
|
145
|
+
</invoke>
|
|
146
|
+
|
|
147
|
+
<invoke name="Task">
|
|
148
|
+
<parameter name="description">Authentication vulnerability analysis</parameter>
|
|
149
|
+
<parameter name="prompt">TASK: Analyze the following code for AUTHENTICATION vulnerabilities.
|
|
150
|
+
TARGET: src/
|
|
151
|
+
DEPTH: quick
|
|
152
|
+
...</parameter>
|
|
153
|
+
<parameter name="subagent_type">security-analyzer-auth</parameter>
|
|
154
|
+
<parameter name="run_in_background">true</parameter>
|
|
155
|
+
</invoke>
|
|
156
|
+
|
|
157
|
+
<invoke name="Task">
|
|
158
|
+
<parameter name="description">Authorization vulnerability analysis</parameter>
|
|
159
|
+
<parameter name="prompt">TASK: Analyze the following code for AUTHORIZATION vulnerabilities.
|
|
160
|
+
TARGET: src/
|
|
161
|
+
DEPTH: quick
|
|
162
|
+
...</parameter>
|
|
163
|
+
<parameter name="subagent_type">security-analyzer-authz</parameter>
|
|
164
|
+
<parameter name="run_in_background">true</parameter>
|
|
165
|
+
</invoke>
|
|
166
|
+
|
|
167
|
+
<invoke name="Task">
|
|
168
|
+
<parameter name="description">Secrets & crypto analysis</parameter>
|
|
169
|
+
<parameter name="prompt">TASK: Analyze the following code for SECRETS & CRYPTOGRAPHY vulnerabilities.
|
|
170
|
+
TARGET: src/
|
|
171
|
+
DEPTH: quick
|
|
172
|
+
...</parameter>
|
|
173
|
+
<parameter name="subagent_type">security-analyzer-secrets</parameter>
|
|
174
|
+
<parameter name="run_in_background">true</parameter>
|
|
175
|
+
</invoke>
|
|
176
|
+
|
|
177
|
+
<invoke name="Task">
|
|
178
|
+
<parameter name="description">Input validation analysis</parameter>
|
|
179
|
+
<parameter name="prompt">TASK: Analyze the following code for INPUT VALIDATION vulnerabilities.
|
|
180
|
+
TARGET: src/
|
|
181
|
+
DEPTH: quick
|
|
182
|
+
...</parameter>
|
|
183
|
+
<parameter name="subagent_type">security-analyzer-input</parameter>
|
|
184
|
+
<parameter name="run_in_background">true</parameter>
|
|
185
|
+
</invoke>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**For DEPTH=deep, also deploy**:
|
|
189
|
+
|
|
190
|
+
```xml
|
|
191
|
+
<invoke name="Task">
|
|
192
|
+
<parameter name="description">Dependency vulnerability analysis</parameter>
|
|
193
|
+
<parameter name="prompt">TASK: Analyze the following code for DEPENDENCY vulnerabilities...
|
|
194
|
+
...</parameter>
|
|
195
|
+
<parameter name="subagent_type">security-analyzer-deps</parameter>
|
|
196
|
+
<parameter name="run_in_background">true</parameter>
|
|
197
|
+
</invoke>
|
|
198
|
+
|
|
199
|
+
<invoke name="Task">
|
|
200
|
+
<parameter name="description">Infrastructure security analysis</parameter>
|
|
201
|
+
<parameter name="prompt">TASK: Analyze the following code for INFRASTRUCTURE SECURITY vulnerabilities...
|
|
202
|
+
...</parameter>
|
|
203
|
+
<parameter name="subagent_type">security-analyzer-infra</parameter>
|
|
204
|
+
<parameter name="run_in_background">true</parameter>
|
|
205
|
+
</invoke>
|
|
206
|
+
|
|
207
|
+
<invoke name="Task">
|
|
208
|
+
<parameter name="description">API security analysis</parameter>
|
|
209
|
+
<parameter name="prompt">TASK: Analyze the following code for API SECURITY vulnerabilities...
|
|
210
|
+
...</parameter>
|
|
211
|
+
<parameter name="subagent_type">security-analyzer-api</parameter>
|
|
212
|
+
<parameter name="run_in_background">true</parameter>
|
|
213
|
+
</invoke>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### STEP 3: Collect Results
|
|
217
|
+
|
|
218
|
+
Wait for all analyzers to complete:
|
|
219
|
+
|
|
220
|
+
```xml
|
|
221
|
+
<invoke name="TaskOutput">
|
|
222
|
+
<parameter name="task_id">{injection_id}</parameter>
|
|
223
|
+
<parameter name="block">true</parameter>
|
|
224
|
+
</invoke>
|
|
225
|
+
|
|
226
|
+
<invoke name="TaskOutput">
|
|
227
|
+
<parameter name="task_id">{auth_id}</parameter>
|
|
228
|
+
<parameter name="block">true</parameter>
|
|
229
|
+
</invoke>
|
|
230
|
+
|
|
231
|
+
<!-- ... collect all results ... -->
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### STEP 4: Run Consensus Coordinator
|
|
235
|
+
|
|
236
|
+
Pass all analyzer outputs to the consensus coordinator:
|
|
237
|
+
|
|
238
|
+
```xml
|
|
239
|
+
<invoke name="Task">
|
|
240
|
+
<parameter name="description">Security audit consensus</parameter>
|
|
241
|
+
<parameter name="prompt">You are the Security Consensus Coordinator.
|
|
242
|
+
|
|
243
|
+
TARGET: {target_path}
|
|
244
|
+
DEPTH: {depth}
|
|
245
|
+
|
|
246
|
+
## Analyzer Outputs
|
|
247
|
+
|
|
248
|
+
### Injection Analyzer Results:
|
|
249
|
+
{injection_output}
|
|
250
|
+
|
|
251
|
+
### Authentication Analyzer Results:
|
|
252
|
+
{auth_output}
|
|
253
|
+
|
|
254
|
+
### Authorization Analyzer Results:
|
|
255
|
+
{authz_output}
|
|
256
|
+
|
|
257
|
+
### Secrets & Crypto Analyzer Results:
|
|
258
|
+
{secrets_output}
|
|
259
|
+
|
|
260
|
+
### Input Validation Analyzer Results:
|
|
261
|
+
{input_output}
|
|
262
|
+
|
|
263
|
+
{If deep depth, also include:}
|
|
264
|
+
### Dependency Analyzer Results:
|
|
265
|
+
{deps_output}
|
|
266
|
+
|
|
267
|
+
### Infrastructure Analyzer Results:
|
|
268
|
+
{infra_output}
|
|
269
|
+
|
|
270
|
+
### API Security Analyzer Results:
|
|
271
|
+
{api_output}
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
Follow your consensus process:
|
|
276
|
+
1. Detect project type from the codebase
|
|
277
|
+
2. Parse all findings into normalized structure
|
|
278
|
+
3. Group related findings by location
|
|
279
|
+
4. Vote on confidence (CONFIRMED if 2+ agree, LIKELY if 1 with evidence)
|
|
280
|
+
5. Filter by project type relevance
|
|
281
|
+
6. Map findings to OWASP Top 10 and CWE numbers
|
|
282
|
+
7. Generate the final Security Audit Report
|
|
283
|
+
8. Save report to docs/08-project/security-audits/security-audit-{YYYYMMDD}.md
|
|
284
|
+
</parameter>
|
|
285
|
+
<parameter name="subagent_type">security-consensus</parameter>
|
|
286
|
+
</invoke>
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### STEP 5: Present Results
|
|
290
|
+
|
|
291
|
+
After consensus completes, show the report summary and offer next steps:
|
|
292
|
+
|
|
293
|
+
```xml
|
|
294
|
+
<invoke name="AskUserQuestion">
|
|
295
|
+
<parameter name="questions">[{
|
|
296
|
+
"question": "Security audit complete: [N] findings ([critical] Critical, [high] High). [files_count] files analyzed. Project type: [type].",
|
|
297
|
+
"header": "Next steps",
|
|
298
|
+
"multiSelect": false,
|
|
299
|
+
"options": [
|
|
300
|
+
{"label": "Fix [critical] Critical issues now (Recommended)", "description": "[top_issue_summary] - [CWE/OWASP]"},
|
|
301
|
+
{"label": "Create stories for all findings", "description": "Track [critical] critical + [high] high priority items in backlog"},
|
|
302
|
+
{"label": "Re-run with DEPTH=deep on [target]", "description": "Current was quick (5 analyzers) - deep adds Deps, Infra, API"},
|
|
303
|
+
{"label": "Save report and done", "description": "Report saved to docs/08-project/security-audits/"}
|
|
304
|
+
]
|
|
305
|
+
}]</parameter>
|
|
306
|
+
</invoke>
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Example Output
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
🔒 Security Audit: app/
|
|
315
|
+
══════════════════════════════════════════════════════════════
|
|
316
|
+
|
|
317
|
+
Deploying 5 security analyzers (quick mode)...
|
|
318
|
+
✓ Injection Analyzer
|
|
319
|
+
✓ Authentication Analyzer
|
|
320
|
+
✓ Authorization Analyzer
|
|
321
|
+
✓ Secrets & Crypto Analyzer
|
|
322
|
+
✓ Input Validation Analyzer
|
|
323
|
+
|
|
324
|
+
Running consensus...
|
|
325
|
+
✓ Consensus complete
|
|
326
|
+
✓ Project type detected: Full-stack Web Application
|
|
327
|
+
|
|
328
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
329
|
+
📊 VULNERABILITY SUMMARY
|
|
330
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
331
|
+
|
|
332
|
+
| Severity | Count | OWASP Category |
|
|
333
|
+
|----------|-------|----------------|
|
|
334
|
+
| Critical | 1 | A03:2021 Injection |
|
|
335
|
+
| High | 2 | A01:2021 Broken Access Control |
|
|
336
|
+
| Medium | 3 | A02:2021 Cryptographic Failures |
|
|
337
|
+
| Low | 1 | A05:2021 Security Misconfiguration |
|
|
338
|
+
|
|
339
|
+
Total: 7 findings (2 false positives excluded)
|
|
340
|
+
|
|
341
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
342
|
+
🚨 FIX IMMEDIATELY
|
|
343
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
344
|
+
|
|
345
|
+
1. Command injection via execSync with user input [CONFIRMED by Injection, Input]
|
|
346
|
+
Location: api/exec.ts:28
|
|
347
|
+
CWE-78 | OWASP A03:2021
|
|
348
|
+
Fix: Use execFileSync with argument array instead of string interpolation
|
|
349
|
+
|
|
350
|
+
2. IDOR - user can access any record by changing ID [CONFIRMED by Authz, Auth]
|
|
351
|
+
Location: api/users/[id]/route.ts:15
|
|
352
|
+
CWE-639 | OWASP A01:2021
|
|
353
|
+
Fix: Add ownership check before returning resource
|
|
354
|
+
|
|
355
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
356
|
+
⚠️ FIX THIS SPRINT
|
|
357
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
358
|
+
|
|
359
|
+
3. JWT secret from environment variable not validated [LIKELY - Auth]
|
|
360
|
+
4. Math.random() used for token generation [LIKELY - Secrets]
|
|
361
|
+
5. Missing rate limiting on login endpoint [LIKELY - Auth]
|
|
362
|
+
|
|
363
|
+
[Full report saved to docs/08-project/security-audits/security-audit-20260220.md]
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
<!-- COMPACT_SUMMARY_START -->
|
|
369
|
+
## Compact Summary
|
|
370
|
+
|
|
371
|
+
**Command**: `/agileflow:audit:security` - Multi-agent security vulnerability analysis with consensus
|
|
372
|
+
|
|
373
|
+
**Quick Usage**:
|
|
374
|
+
```
|
|
375
|
+
/agileflow:audit:security app/ # Quick scan (core 5 analyzers)
|
|
376
|
+
/agileflow:audit:security . DEPTH=deep # All 8 analyzers
|
|
377
|
+
/agileflow:audit:security src/ FOCUS=injection,auth # Specific areas
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**What It Does**: Deploy security analyzers in parallel -> Each finds different vulnerability classes -> Consensus coordinator validates, filters by project type, maps to OWASP/CWE -> Actionable Security Audit Report
|
|
381
|
+
|
|
382
|
+
**Analyzers (Core 5 - quick mode)**:
|
|
383
|
+
- `security-analyzer-injection` - SQL/command/template/NoSQL/LDAP injection
|
|
384
|
+
- `security-analyzer-auth` - Weak hashing, JWT flaws, broken auth flows
|
|
385
|
+
- `security-analyzer-authz` - IDOR, privilege escalation, CORS/CSRF, path traversal
|
|
386
|
+
- `security-analyzer-secrets` - Hardcoded keys, weak crypto, insecure defaults
|
|
387
|
+
- `security-analyzer-input` - XSS, prototype pollution, SSRF, file upload, ReDoS
|
|
388
|
+
|
|
389
|
+
**Analyzers (Deep mode adds 3 more)**:
|
|
390
|
+
- `security-analyzer-deps` - Known CVEs, typosquatting, postinstall scripts
|
|
391
|
+
- `security-analyzer-infra` - Docker, security headers, HTTPS, exposed endpoints
|
|
392
|
+
- `security-analyzer-api` - Mass assignment, data exposure, rate limiting, GraphQL
|
|
393
|
+
|
|
394
|
+
**Severity Levels** (exploit-oriented):
|
|
395
|
+
- CRITICAL: Directly exploitable, high impact (RCE, SQLi, auth bypass)
|
|
396
|
+
- HIGH: Likely exploitable, significant impact (Stored XSS, IDOR, weak crypto)
|
|
397
|
+
- MEDIUM: Exploitable under conditions (Reflected XSS, missing headers, CSRF)
|
|
398
|
+
- LOW: Hardening improvement (info disclosure, verbose errors)
|
|
399
|
+
|
|
400
|
+
**Confidence Levels**:
|
|
401
|
+
- CONFIRMED: 2+ analyzers agree -> High priority
|
|
402
|
+
- LIKELY: 1 analyzer with evidence -> Medium priority
|
|
403
|
+
- INVESTIGATE: 1 analyzer, weak evidence -> Low priority
|
|
404
|
+
|
|
405
|
+
**Output**: `docs/08-project/security-audits/security-audit-{YYYYMMDD}.md`
|
|
406
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## Boundary Rules (No Overlap)
|
|
411
|
+
|
|
412
|
+
- **vs audit:logic**: No race conditions, type bugs, control flow, edge cases - those are logic domain
|
|
413
|
+
- **vs audit:legal**: No breach notification, PCI-DSS compliance, encryption requirements, negligence liability - those are legal domain
|
|
414
|
+
- **vs security agent**: The `security.md` agent is a team member for story work. This is an on-demand analysis tool
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## Integration with Babysit
|
|
419
|
+
|
|
420
|
+
When `/agileflow:babysit` completes implementation, it can run a quick security audit:
|
|
421
|
+
|
|
422
|
+
```
|
|
423
|
+
📍 Implementation complete. Running quick security audit...
|
|
424
|
+
|
|
425
|
+
🔒 Security Audit Results:
|
|
426
|
+
━━━━━━━━━━━━━━━━━━━━━━
|
|
427
|
+
✅ No critical vulnerabilities found
|
|
428
|
+
⚠️ 1 HIGH issue detected:
|
|
429
|
+
- api/users.ts:28 - execSync with unsanitized input
|
|
430
|
+
CWE-78 | Confidence: CONFIRMED (Injection + Input analyzers)
|
|
431
|
+
|
|
432
|
+
Fix before merging? [Y/n]
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## Related Commands
|
|
438
|
+
|
|
439
|
+
- `/agileflow:audit:logic` - Logic bug analysis (similar architecture)
|
|
440
|
+
- `/agileflow:audit:legal` - Legal compliance analysis (similar architecture)
|
|
441
|
+
- `/agileflow:review` - Code review (includes some security checks)
|
|
442
|
+
- `/agileflow:multi-expert` - General multi-expert analysis
|
|
443
|
+
- `/agileflow:verify` - Run tests
|