coverme-scanner 1.0.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/README.md +227 -0
- package/commands/scan.md +317 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +39 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +6 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +636 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/scan.d.ts +11 -0
- package/dist/cli/scan.d.ts.map +1 -0
- package/dist/cli/scan.js +498 -0
- package/dist/cli/scan.js.map +1 -0
- package/dist/report/generator.d.ts +48 -0
- package/dist/report/generator.d.ts.map +1 -0
- package/dist/report/generator.js +368 -0
- package/dist/report/generator.js.map +1 -0
- package/dist/report/index.d.ts +35 -0
- package/dist/report/index.d.ts.map +1 -0
- package/dist/report/index.js +463 -0
- package/dist/report/index.js.map +1 -0
- package/dist/templates/report.html +796 -0
- package/dist/types.d.ts +94 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +48 -0
- package/src/cli/index.ts +43 -0
- package/src/cli/init.ts +611 -0
- package/src/cli/scan.ts +483 -0
- package/src/prompts/architecture-reviewer.md +171 -0
- package/src/prompts/consensus-builder.md +247 -0
- package/src/prompts/context-discovery.md +174 -0
- package/src/prompts/cross-validator.md +224 -0
- package/src/prompts/deep-dive-expert.md +224 -0
- package/src/prompts/dependency-auditor.md +190 -0
- package/src/prompts/performance-hunter.md +200 -0
- package/src/prompts/quality-analyzer.md +150 -0
- package/src/prompts/report-generator.md +285 -0
- package/src/prompts/security-scanner.md +180 -0
- package/src/report/generator.ts +382 -0
- package/src/report/index.ts +483 -0
- package/src/templates/report.html +796 -0
- package/src/types.ts +107 -0
- package/tsconfig.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Vibecode Tracker
|
|
2
|
+
|
|
3
|
+
**Multi-Agent AI Code Scanner for Claude Code**
|
|
4
|
+
|
|
5
|
+
A comprehensive code analysis tool that uses 11 AI agents with cross-validation to find security vulnerabilities, quality issues, architectural problems, and more.
|
|
6
|
+
|
|
7
|
+
## How It Works
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
11
|
+
│ VIBECODE ORCHESTRATOR │
|
|
12
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
13
|
+
│ │
|
|
14
|
+
│ Phase 0: CONTEXT DISCOVERY │
|
|
15
|
+
│ ┌──────────────────────────────────────────────────────────┐ │
|
|
16
|
+
│ │ Understand project structure, tech stack, docs │ │
|
|
17
|
+
│ └──────────────────────────────────────────────────────────┘ │
|
|
18
|
+
│ │ │
|
|
19
|
+
│ ▼ │
|
|
20
|
+
│ Phase 1: DISCOVERY (5 agents in parallel) │
|
|
21
|
+
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐│
|
|
22
|
+
│ │ Security │ │ Quality │ │ Arch │ │ Deps │ │ Perf ││
|
|
23
|
+
│ │ Agent │ │ Agent │ │ Agent │ │ Agent │ │ Agent ││
|
|
24
|
+
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ └───┬────┘│
|
|
25
|
+
│ │ │ │ │ │ │
|
|
26
|
+
│ └────────────┴────────────┴────────────┴───────────┘ │
|
|
27
|
+
│ │ │
|
|
28
|
+
│ ▼ │
|
|
29
|
+
│ Phase 2: CROSS-VALIDATION (3 agents in parallel) │
|
|
30
|
+
│ ┌──────────────────────────────────────────────────────────┐ │
|
|
31
|
+
│ │ Validator A: Find false positives │ │
|
|
32
|
+
│ │ Validator B: Challenge HIGH/CRITICAL findings │ │
|
|
33
|
+
│ │ Validator C: Find MISSED issues │ │
|
|
34
|
+
│ └──────────────────────────────────────────────────────────┘ │
|
|
35
|
+
│ │ │
|
|
36
|
+
│ ▼ │
|
|
37
|
+
│ Phase 3: DEEP DIVE (on disputed findings) │
|
|
38
|
+
│ ┌──────────────────────────────────────────────────────────┐ │
|
|
39
|
+
│ │ Expert analysis with full context for disagreements │ │
|
|
40
|
+
│ └──────────────────────────────────────────────────────────┘ │
|
|
41
|
+
│ │ │
|
|
42
|
+
│ ▼ │
|
|
43
|
+
│ Phase 4: CONSENSUS & CONFIDENCE SCORING │
|
|
44
|
+
│ ┌──────────────────────────────────────────────────────────┐ │
|
|
45
|
+
│ │ Calculate confidence, filter false positives, sort │ │
|
|
46
|
+
│ └──────────────────────────────────────────────────────────┘ │
|
|
47
|
+
│ │ │
|
|
48
|
+
│ ▼ │
|
|
49
|
+
│ Phase 5: REPORT GENERATION │
|
|
50
|
+
│ ┌──────────────────────────────────────────────────────────┐ │
|
|
51
|
+
│ │ Professional PDF with findings, fixes, and positives │ │
|
|
52
|
+
│ └──────────────────────────────────────────────────────────┘ │
|
|
53
|
+
│ │
|
|
54
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Install globally
|
|
61
|
+
npm install -g vibecode-tracker
|
|
62
|
+
|
|
63
|
+
# Or use npx
|
|
64
|
+
npx vibecode-tracker init
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This installs the `/scan` slash command into your `.claude/commands/` directory.
|
|
68
|
+
|
|
69
|
+
## Usage
|
|
70
|
+
|
|
71
|
+
### In Claude Code
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Full scan (all categories)
|
|
75
|
+
/scan
|
|
76
|
+
|
|
77
|
+
# Security-focused scan
|
|
78
|
+
/scan security
|
|
79
|
+
|
|
80
|
+
# Quality-focused scan
|
|
81
|
+
/scan quality
|
|
82
|
+
|
|
83
|
+
# Quick scan (skip validation)
|
|
84
|
+
/scan --quick
|
|
85
|
+
|
|
86
|
+
# JSON output only
|
|
87
|
+
/scan --json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### CLI
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Initialize commands in current project
|
|
94
|
+
vibecode init
|
|
95
|
+
|
|
96
|
+
# Initialize globally
|
|
97
|
+
vibecode init --global
|
|
98
|
+
|
|
99
|
+
# Run scan (outputs orchestration instructions)
|
|
100
|
+
vibecode scan ./my-project
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## What It Finds
|
|
104
|
+
|
|
105
|
+
### Security Issues
|
|
106
|
+
- SQL/NoSQL Injection
|
|
107
|
+
- Cross-Site Scripting (XSS)
|
|
108
|
+
- Command Injection
|
|
109
|
+
- Authentication/Authorization flaws
|
|
110
|
+
- Hardcoded secrets
|
|
111
|
+
- SSRF, Path Traversal
|
|
112
|
+
- Insecure cryptography
|
|
113
|
+
- Session management issues
|
|
114
|
+
|
|
115
|
+
### Quality Issues
|
|
116
|
+
- DRY violations (duplicated code)
|
|
117
|
+
- High complexity functions
|
|
118
|
+
- Dead code
|
|
119
|
+
- Anti-patterns
|
|
120
|
+
- Error handling problems
|
|
121
|
+
- Type safety issues
|
|
122
|
+
|
|
123
|
+
### Architecture Issues
|
|
124
|
+
- Layer violations
|
|
125
|
+
- Circular dependencies
|
|
126
|
+
- Missing abstractions
|
|
127
|
+
- Coupling problems
|
|
128
|
+
- API design issues
|
|
129
|
+
|
|
130
|
+
### Dependency Issues
|
|
131
|
+
- Known CVEs
|
|
132
|
+
- Outdated packages
|
|
133
|
+
- License compliance
|
|
134
|
+
- Supply chain risks
|
|
135
|
+
|
|
136
|
+
### Performance Issues
|
|
137
|
+
- N+1 queries
|
|
138
|
+
- Memory leaks
|
|
139
|
+
- Blocking operations
|
|
140
|
+
- Missing caching
|
|
141
|
+
|
|
142
|
+
## Why Multi-Agent?
|
|
143
|
+
|
|
144
|
+
Traditional scanners have high false positive rates. Vibecode uses a unique approach:
|
|
145
|
+
|
|
146
|
+
1. **Multiple perspectives**: 5 specialized agents scan independently
|
|
147
|
+
2. **Cross-validation**: 3 validators challenge the findings
|
|
148
|
+
3. **Deep dive**: Expert analysis for disputed findings
|
|
149
|
+
4. **Consensus**: Only high-confidence findings make the report
|
|
150
|
+
|
|
151
|
+
This results in:
|
|
152
|
+
- **Lower false positive rate** - Validators catch mistakes
|
|
153
|
+
- **Higher coverage** - Multiple agents find different issues
|
|
154
|
+
- **Better evidence** - Each finding is verified with context
|
|
155
|
+
- **Confidence scores** - Know how certain each finding is
|
|
156
|
+
|
|
157
|
+
## Report Output
|
|
158
|
+
|
|
159
|
+
The scan produces a professional PDF report:
|
|
160
|
+
|
|
161
|
+
1. **Cover Page** - Project name, date, severity counts
|
|
162
|
+
2. **Executive Summary** - One-page overview for leadership
|
|
163
|
+
3. **Scan Overview** - Methodology and statistics
|
|
164
|
+
4. **Critical Issues** - Full detail with code and fixes
|
|
165
|
+
5. **High Issues** - Full detail
|
|
166
|
+
6. **Medium Issues** - Summarized table
|
|
167
|
+
7. **Low Issues** - Simple list
|
|
168
|
+
8. **Positive Observations** - Good patterns found
|
|
169
|
+
9. **Recommendations** - Prioritized action items
|
|
170
|
+
|
|
171
|
+
## Configuration
|
|
172
|
+
|
|
173
|
+
Create `.vibecode.yml` in your project root:
|
|
174
|
+
|
|
175
|
+
```yaml
|
|
176
|
+
# Categories to scan
|
|
177
|
+
categories:
|
|
178
|
+
- security
|
|
179
|
+
- quality
|
|
180
|
+
- architecture
|
|
181
|
+
- dependencies
|
|
182
|
+
- performance
|
|
183
|
+
|
|
184
|
+
# Minimum severity to report
|
|
185
|
+
minSeverity: low
|
|
186
|
+
|
|
187
|
+
# Validation rounds
|
|
188
|
+
validation:
|
|
189
|
+
enabled: true
|
|
190
|
+
rounds: 1
|
|
191
|
+
|
|
192
|
+
# Output format
|
|
193
|
+
output:
|
|
194
|
+
format: pdf
|
|
195
|
+
path: ./reports/
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Requirements
|
|
199
|
+
|
|
200
|
+
- Claude Code CLI installed and authenticated
|
|
201
|
+
- Node.js 18+
|
|
202
|
+
- No external API keys needed (uses your Claude Code session)
|
|
203
|
+
|
|
204
|
+
## How It Differs From CodeRabbit/Snyk/etc.
|
|
205
|
+
|
|
206
|
+
| Feature | Vibecode | Traditional Tools |
|
|
207
|
+
|---------|----------|-------------------|
|
|
208
|
+
| Multi-agent validation | Yes (11 agents) | No |
|
|
209
|
+
| Cross-validation | Yes | No |
|
|
210
|
+
| Confidence scores | Yes | No |
|
|
211
|
+
| Context-aware | Reads your docs | Pattern matching |
|
|
212
|
+
| False positive filtering | Built-in | Manual |
|
|
213
|
+
| Uses your Claude Code | Yes (free*) | Separate subscription |
|
|
214
|
+
|
|
215
|
+
*Uses your existing Claude Code quota
|
|
216
|
+
|
|
217
|
+
## Contributing
|
|
218
|
+
|
|
219
|
+
PRs welcome! See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
MIT
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
Built with Claude Code
|
package/commands/scan.md
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# Vibecode Tracker - Multi-Agent Code Scanner
|
|
2
|
+
|
|
3
|
+
Run a comprehensive code analysis using 11 AI agents with cross-validation.
|
|
4
|
+
|
|
5
|
+
$ARGUMENTS
|
|
6
|
+
|
|
7
|
+
## Execution Flow
|
|
8
|
+
|
|
9
|
+
You will orchestrate a multi-phase code scan. Follow each phase exactly.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## PHASE 0: Context Discovery (REQUIRED FIRST)
|
|
14
|
+
|
|
15
|
+
Before ANY scanning, understand the project:
|
|
16
|
+
|
|
17
|
+
**Launch ONE agent with Task tool (subagent_type="Explore"):**
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Understand this codebase thoroughly.
|
|
21
|
+
|
|
22
|
+
1. Find and read ALL documentation:
|
|
23
|
+
- README.md, CLAUDE.md, .claude/CLAUDE.md
|
|
24
|
+
- docs/*.md, ARCHITECTURE.md, SECURITY.md
|
|
25
|
+
|
|
26
|
+
2. Identify tech stack from:
|
|
27
|
+
- package.json (Node.js)
|
|
28
|
+
- requirements.txt (Python)
|
|
29
|
+
- go.mod, Cargo.toml, etc.
|
|
30
|
+
|
|
31
|
+
3. Map the architecture:
|
|
32
|
+
- Entry points (routes, controllers)
|
|
33
|
+
- Middleware and auth
|
|
34
|
+
- Database access patterns
|
|
35
|
+
- External service integrations
|
|
36
|
+
|
|
37
|
+
4. Note security-relevant components:
|
|
38
|
+
- Auth system used
|
|
39
|
+
- Encryption implementations
|
|
40
|
+
- File handling
|
|
41
|
+
- User input processing
|
|
42
|
+
|
|
43
|
+
Output a structured JSON summary of the project context.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Wait for this agent to complete before proceeding.**
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## PHASE 1: Discovery Scan (5 Agents in Parallel)
|
|
51
|
+
|
|
52
|
+
Launch ALL 5 agents simultaneously using parallel Task tool calls:
|
|
53
|
+
|
|
54
|
+
### Agent 1: Security Scanner
|
|
55
|
+
```
|
|
56
|
+
You are a security researcher. Scan this codebase for vulnerabilities.
|
|
57
|
+
|
|
58
|
+
PROJECT CONTEXT: {paste context from Phase 0}
|
|
59
|
+
|
|
60
|
+
Check for:
|
|
61
|
+
- SQL/NoSQL injection, XSS, Command injection
|
|
62
|
+
- Authentication/Authorization flaws
|
|
63
|
+
- Cryptography issues, hardcoded secrets
|
|
64
|
+
- SSRF, Path traversal, File upload issues
|
|
65
|
+
- Rate limiting, Session management
|
|
66
|
+
|
|
67
|
+
For EACH finding output JSON:
|
|
68
|
+
{
|
|
69
|
+
"id": "SEC-001",
|
|
70
|
+
"title": "...",
|
|
71
|
+
"severity": "critical|high|medium|low",
|
|
72
|
+
"file": "path/to/file.js",
|
|
73
|
+
"line": 123,
|
|
74
|
+
"code": "vulnerable code snippet",
|
|
75
|
+
"description": "What's wrong",
|
|
76
|
+
"exploit": "How to exploit",
|
|
77
|
+
"recommendation": "How to fix",
|
|
78
|
+
"evidence": ["data flow proof"]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
Be thorough. Check EVERY file.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Agent 2: Quality Analyzer
|
|
85
|
+
```
|
|
86
|
+
You are a code quality expert. Scan for quality issues.
|
|
87
|
+
|
|
88
|
+
PROJECT CONTEXT: {paste context from Phase 0}
|
|
89
|
+
|
|
90
|
+
Check for:
|
|
91
|
+
- DRY violations (duplicated code)
|
|
92
|
+
- High complexity functions
|
|
93
|
+
- Dead code, unused imports
|
|
94
|
+
- Error handling issues
|
|
95
|
+
- Type safety problems
|
|
96
|
+
- Anti-patterns
|
|
97
|
+
|
|
98
|
+
Output findings as JSON with "QUAL-XXX" IDs.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Agent 3: Architecture Reviewer
|
|
102
|
+
```
|
|
103
|
+
You are a software architect. Review the codebase structure.
|
|
104
|
+
|
|
105
|
+
PROJECT CONTEXT: {paste context from Phase 0}
|
|
106
|
+
|
|
107
|
+
Check for:
|
|
108
|
+
- Layer violations
|
|
109
|
+
- Circular dependencies
|
|
110
|
+
- Missing abstractions
|
|
111
|
+
- Component coupling
|
|
112
|
+
- API design issues
|
|
113
|
+
- Configuration problems
|
|
114
|
+
|
|
115
|
+
Output findings as JSON with "ARCH-XXX" IDs.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Agent 4: Dependency Auditor
|
|
119
|
+
```
|
|
120
|
+
You are a dependency security expert. Audit all dependencies.
|
|
121
|
+
|
|
122
|
+
PROJECT CONTEXT: {paste context from Phase 0}
|
|
123
|
+
|
|
124
|
+
Check for:
|
|
125
|
+
- CVEs in dependencies
|
|
126
|
+
- Outdated packages
|
|
127
|
+
- License compliance
|
|
128
|
+
- Unused dependencies
|
|
129
|
+
- Supply chain risks
|
|
130
|
+
|
|
131
|
+
Output findings as JSON with "DEPS-XXX" IDs.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Agent 5: Performance Hunter
|
|
135
|
+
```
|
|
136
|
+
You are a performance engineer. Find performance issues.
|
|
137
|
+
|
|
138
|
+
PROJECT CONTEXT: {paste context from Phase 0}
|
|
139
|
+
|
|
140
|
+
Check for:
|
|
141
|
+
- N+1 query patterns
|
|
142
|
+
- Memory leaks
|
|
143
|
+
- Blocking operations
|
|
144
|
+
- Missing caching
|
|
145
|
+
- Inefficient algorithms
|
|
146
|
+
|
|
147
|
+
Output findings as JSON with "PERF-XXX" IDs.
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Wait for ALL 5 agents to complete before proceeding.**
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## PHASE 2: Cross-Validation (3 Agents in Parallel)
|
|
155
|
+
|
|
156
|
+
Collect ALL findings from Phase 1, then launch 3 validators:
|
|
157
|
+
|
|
158
|
+
### Validator A: False Positive Hunter
|
|
159
|
+
```
|
|
160
|
+
Review all findings from Phase 1 for FALSE POSITIVES.
|
|
161
|
+
|
|
162
|
+
FINDINGS TO VALIDATE:
|
|
163
|
+
{paste all findings from Phase 1}
|
|
164
|
+
|
|
165
|
+
For each finding:
|
|
166
|
+
1. Read the actual code
|
|
167
|
+
2. Check for mitigating controls
|
|
168
|
+
3. Verify the issue is real
|
|
169
|
+
|
|
170
|
+
Output:
|
|
171
|
+
{
|
|
172
|
+
"confirmed": ["SEC-001", "QUAL-003", ...],
|
|
173
|
+
"falsePositives": [
|
|
174
|
+
{"id": "SEC-002", "reason": "Input is sanitized at line X"}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Validator B: Evidence Challenger
|
|
180
|
+
```
|
|
181
|
+
Challenge every HIGH and CRITICAL finding.
|
|
182
|
+
|
|
183
|
+
FINDINGS TO VALIDATE:
|
|
184
|
+
{paste HIGH/CRITICAL findings only}
|
|
185
|
+
|
|
186
|
+
For each finding:
|
|
187
|
+
1. Read the full code context
|
|
188
|
+
2. Trace the data flow
|
|
189
|
+
3. Attempt to construct an exploit
|
|
190
|
+
4. Determine if truly exploitable
|
|
191
|
+
|
|
192
|
+
Output same format as Validator A.
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Validator C: Missing Issues Hunter
|
|
196
|
+
```
|
|
197
|
+
Look for issues that Phase 1 agents MISSED.
|
|
198
|
+
|
|
199
|
+
EXISTING FINDINGS:
|
|
200
|
+
{paste all findings}
|
|
201
|
+
|
|
202
|
+
Search for:
|
|
203
|
+
- Business logic flaws
|
|
204
|
+
- Race conditions
|
|
205
|
+
- Edge cases
|
|
206
|
+
- Integration vulnerabilities
|
|
207
|
+
- Combination attacks
|
|
208
|
+
|
|
209
|
+
Output:
|
|
210
|
+
{
|
|
211
|
+
"missedIssues": [
|
|
212
|
+
{full finding object with new ID}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Wait for ALL 3 validators to complete.**
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## PHASE 3: Deep Dive (If Needed)
|
|
222
|
+
|
|
223
|
+
For any finding where Validator A and B disagree, launch a Deep Dive agent:
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
DISPUTED FINDING:
|
|
227
|
+
{finding details}
|
|
228
|
+
|
|
229
|
+
VALIDATOR A SAYS: {verdict}
|
|
230
|
+
VALIDATOR B SAYS: {verdict}
|
|
231
|
+
|
|
232
|
+
Perform exhaustive analysis:
|
|
233
|
+
1. Read ALL relevant code
|
|
234
|
+
2. Trace complete data flow
|
|
235
|
+
3. Check all mitigating controls
|
|
236
|
+
4. Determine the TRUE status
|
|
237
|
+
|
|
238
|
+
Output your final verdict with detailed evidence.
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## PHASE 4: Build Consensus
|
|
244
|
+
|
|
245
|
+
Now aggregate all results:
|
|
246
|
+
|
|
247
|
+
1. **Merge duplicates** - Same issue from multiple agents
|
|
248
|
+
2. **Calculate confidence**:
|
|
249
|
+
- Each validator confirmation: +15%
|
|
250
|
+
- Each false_positive vote: -20%
|
|
251
|
+
- Deep dive confirmation: +25%
|
|
252
|
+
3. **Filter**: Remove findings with <50% confidence
|
|
253
|
+
4. **Sort**: By severity, then confidence
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## PHASE 5: Generate Report
|
|
258
|
+
|
|
259
|
+
Create a professional PDF report:
|
|
260
|
+
|
|
261
|
+
### Structure:
|
|
262
|
+
1. **Cover Page** - Project name, date, finding counts
|
|
263
|
+
2. **Executive Summary** - One page for leadership
|
|
264
|
+
3. **Scan Overview** - Files scanned, duration, methodology
|
|
265
|
+
4. **Critical Issues** - Full detail with code and fixes
|
|
266
|
+
5. **High Issues** - Full detail
|
|
267
|
+
6. **Medium Issues** - Summarized table
|
|
268
|
+
7. **Low Issues** - List only
|
|
269
|
+
8. **Positive Observations** - Good patterns found
|
|
270
|
+
9. **Recommendations** - Prioritized action items
|
|
271
|
+
|
|
272
|
+
### Generate Report:
|
|
273
|
+
|
|
274
|
+
Use the report generator prompt to create the Markdown content, then convert to PDF:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
npx md-to-pdf vibecode-report.md
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Or use the Read tool to save directly as PDF if available.
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Output
|
|
285
|
+
|
|
286
|
+
Save the final report as:
|
|
287
|
+
```
|
|
288
|
+
vibecode-report-{YYYY-MM-DD}.pdf
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Also save the raw findings as:
|
|
292
|
+
```
|
|
293
|
+
vibecode-findings-{YYYY-MM-DD}.json
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Quick Options
|
|
299
|
+
|
|
300
|
+
If the user specifies options:
|
|
301
|
+
|
|
302
|
+
- `/scan security` - Only run Security Scanner + validators
|
|
303
|
+
- `/scan quality` - Only run Quality Analyzer + validators
|
|
304
|
+
- `/scan --quick` - Skip validation phase (faster, less accurate)
|
|
305
|
+
- `/scan --json` - Output JSON only, no PDF
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Important Notes
|
|
310
|
+
|
|
311
|
+
1. **Always run Phase 0 first** - Context is critical
|
|
312
|
+
2. **Use parallel Task calls** - Faster execution
|
|
313
|
+
3. **Wait between phases** - Each phase needs previous results
|
|
314
|
+
4. **Be thorough** - Better to find more and filter than miss issues
|
|
315
|
+
5. **Include positives** - Good patterns are important too
|
|
316
|
+
|
|
317
|
+
BEGIN SCAN NOW.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const init_js_1 = require("./init.js");
|
|
6
|
+
const scan_js_1 = require("./scan.js");
|
|
7
|
+
const index_js_1 = require("../report/index.js");
|
|
8
|
+
const program = new commander_1.Command();
|
|
9
|
+
program
|
|
10
|
+
.name('vibecode')
|
|
11
|
+
.description('AI-powered code scanner with multi-agent verification for Claude Code')
|
|
12
|
+
.version('1.0.0');
|
|
13
|
+
program
|
|
14
|
+
.command('init')
|
|
15
|
+
.description('Install vibecode slash commands into .claude/commands/')
|
|
16
|
+
.option('-g, --global', 'Install globally to ~/.claude/commands/')
|
|
17
|
+
.action(init_js_1.init);
|
|
18
|
+
program
|
|
19
|
+
.command('scan')
|
|
20
|
+
.description('Scan codebase with multi-agent AI verification')
|
|
21
|
+
.argument('[path]', 'Path to scan', '.')
|
|
22
|
+
.option('-o, --output <format>', 'Output format: json, pdf, md, html', 'pdf')
|
|
23
|
+
.option('-O, --output-path <path>', 'Output file path')
|
|
24
|
+
.option('-c, --categories <cats>', 'Categories to scan: security,quality,arch,deps,perf', 'all')
|
|
25
|
+
.option('-s, --severity <level>', 'Minimum severity: critical,high,medium,low,info', 'low')
|
|
26
|
+
.option('-v, --verbose', 'Verbose output')
|
|
27
|
+
.option('-p, --parallel <num>', 'Number of parallel agents', '5')
|
|
28
|
+
.action(scan_js_1.scan);
|
|
29
|
+
program
|
|
30
|
+
.command('report')
|
|
31
|
+
.description('Generate PDF/HTML report from scan JSON')
|
|
32
|
+
.argument('<json-file>', 'Path to scan results JSON file')
|
|
33
|
+
.option('-o, --output <path>', 'Output file path')
|
|
34
|
+
.option('-f, --format <format>', 'Output format: pdf, html', 'pdf')
|
|
35
|
+
.action(async (jsonFile, options) => {
|
|
36
|
+
await (0, index_js_1.generateReport)(jsonFile, options.output, options.format || 'pdf');
|
|
37
|
+
});
|
|
38
|
+
program.parse();
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,uCAAiC;AACjC,uCAAiC;AACjC,iDAAoD;AAEpD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,UAAU,CAAC;KAChB,WAAW,CAAC,uEAAuE,CAAC;KACpF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,wDAAwD,CAAC;KACrE,MAAM,CAAC,cAAc,EAAE,yCAAyC,CAAC;KACjE,MAAM,CAAC,cAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,gDAAgD,CAAC;KAC7D,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC;KACvC,MAAM,CAAC,uBAAuB,EAAE,oCAAoC,EAAE,KAAK,CAAC;KAC5E,MAAM,CAAC,0BAA0B,EAAE,kBAAkB,CAAC;KACtD,MAAM,CAAC,yBAAyB,EAAE,qDAAqD,EAAE,KAAK,CAAC;KAC/F,MAAM,CAAC,wBAAwB,EAAE,iDAAiD,EAAE,KAAK,CAAC;KAC1F,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC;KACzC,MAAM,CAAC,sBAAsB,EAAE,2BAA2B,EAAE,GAAG,CAAC;KAChE,MAAM,CAAC,cAAI,CAAC,CAAC;AAEhB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,yCAAyC,CAAC;KACtD,QAAQ,CAAC,aAAa,EAAE,gCAAgC,CAAC;KACzD,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;KACjD,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,EAAE,KAAK,CAAC;KAClE,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,OAAqD,EAAE,EAAE;IACxF,MAAM,IAAA,yBAAc,EAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAiiBD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA2D9D"}
|