@boshu2/vibe-check 1.1.0 → 1.3.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/.claude/settings.local.json +6 -0
- package/CHANGELOG.md +9 -0
- package/README.md +94 -229
- package/SECURITY.md +178 -0
- package/claude-progress.json +44 -0
- package/claude-progress.txt +98 -0
- package/dist/cli.js +3 -6
- package/dist/cli.js.map +1 -1
- package/dist/commands/analyze.d.ts +0 -2
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +59 -62
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +5 -3
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init-hook.d.ts +3 -0
- package/dist/commands/init-hook.d.ts.map +1 -0
- package/dist/commands/init-hook.js +165 -0
- package/dist/commands/init-hook.js.map +1 -0
- package/dist/commands/start.d.ts +21 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +139 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/output/json.d.ts.map +1 -1
- package/dist/output/json.js +0 -8
- package/dist/output/json.js.map +1 -1
- package/dist/output/markdown.d.ts.map +1 -1
- package/dist/output/markdown.js +0 -6
- package/dist/output/markdown.js.map +1 -1
- package/dist/output/terminal.d.ts.map +1 -1
- package/dist/output/terminal.js +0 -20
- package/dist/output/terminal.js.map +1 -1
- package/dist/types.d.ts +0 -33
- package/dist/types.d.ts.map +1 -1
- package/feature-list.json +56 -0
- package/hooks/pre-push +107 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.2.0] - 2025-11-29
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Git Hook** - `vibe-check init-hook` command to install pre-push hook
|
|
12
|
+
- Runs vibe-check automatically before every git push
|
|
13
|
+
- `--block-low` option to reject pushes with LOW rating
|
|
14
|
+
- Configurable via environment variables
|
|
15
|
+
- Pre-push hook script in `hooks/pre-push` for manual installation
|
|
16
|
+
|
|
8
17
|
## [1.1.0] - 2025-11-29
|
|
9
18
|
|
|
10
19
|
### Added
|
package/README.md
CHANGED
|
@@ -1,58 +1,10 @@
|
|
|
1
1
|
# vibe-check
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Quick check: are you building or spiraling?**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Analyzes your git history to tell you if you're making progress or stuck in fix loops.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
You're using AI to write code, but how do you know if it's actually helping?
|
|
10
|
-
|
|
11
|
-
Are you shipping features faster, or just generating more commits? Building new features, or debugging AI mistakes? Moving forward, or stuck in fix-fix-fix loops?
|
|
12
|
-
|
|
13
|
-
Without data, you're guessing.
|
|
14
|
-
|
|
15
|
-
## The Insight
|
|
16
|
-
|
|
17
|
-
vibe-check analyzes your git history and tells you:
|
|
18
|
-
|
|
19
|
-
| What You'll Learn | Why It Matters |
|
|
20
|
-
|-------------------|----------------|
|
|
21
|
-
| **Trust Pass Rate** | Are you accepting AI code that works, or code that breaks immediately? |
|
|
22
|
-
| **Debug Spirals** | Are you stuck in fix loops on the same component? |
|
|
23
|
-
| **Rework Ratio** | What percentage of your work is building vs. cleaning up? |
|
|
24
|
-
| **Pattern Detection** | What types of problems keep recurring? (auth, config, APIs...) |
|
|
25
|
-
|
|
26
|
-
## Quick Demo
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
$ npx @boshu2/vibe-check --since "1 week ago"
|
|
30
|
-
|
|
31
|
-
================================================================
|
|
32
|
-
VIBE-CHECK RESULTS
|
|
33
|
-
================================================================
|
|
34
|
-
Period: Nov 21 - Nov 28, 2025 (12.5h active)
|
|
35
|
-
Commits: 47 total (28 feat, 15 fix, 4 docs)
|
|
36
|
-
|
|
37
|
-
METRIC VALUE RATING
|
|
38
|
-
--------------------------------------------------
|
|
39
|
-
Iteration Velocity 4.2/hr HIGH
|
|
40
|
-
Rework Ratio 35% MEDIUM
|
|
41
|
-
Trust Pass Rate 92% HIGH
|
|
42
|
-
Debug Spiral Duration 18min HIGH
|
|
43
|
-
Flow Efficiency 85% HIGH
|
|
44
|
-
|
|
45
|
-
DEBUG SPIRALS (2 detected):
|
|
46
|
-
- auth: 4 commits, 25m (SECRETS_AUTH)
|
|
47
|
-
- api: 3 commits, 12m (API_MISMATCH)
|
|
48
|
-
|
|
49
|
-
OVERALL: HIGH
|
|
50
|
-
================================================================
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**What this tells you:** You're productive (4.2 commits/hour, 92% trust pass rate), but 35% of your work is fixing things—room to improve. OAuth caused a 25-minute spiral. Next time: validate auth flows with a tracer test before full implementation.
|
|
54
|
-
|
|
55
|
-
## Installation
|
|
7
|
+
## Install
|
|
56
8
|
|
|
57
9
|
```bash
|
|
58
10
|
npm install -g @boshu2/vibe-check
|
|
@@ -64,145 +16,134 @@ Or run directly:
|
|
|
64
16
|
npx @boshu2/vibe-check
|
|
65
17
|
```
|
|
66
18
|
|
|
67
|
-
##
|
|
19
|
+
## Quick Start
|
|
68
20
|
|
|
69
21
|
```bash
|
|
70
|
-
#
|
|
71
|
-
vibe-check
|
|
72
|
-
|
|
73
|
-
# Analyze specific time period
|
|
22
|
+
# Check your recent work
|
|
74
23
|
vibe-check --since "1 week ago"
|
|
75
|
-
vibe-check --since "2025-11-01"
|
|
76
24
|
|
|
77
|
-
#
|
|
78
|
-
vibe-check --
|
|
79
|
-
|
|
25
|
+
# Simple one-liner for hooks
|
|
26
|
+
vibe-check --simple
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Example Output
|
|
80
30
|
|
|
81
|
-
# Analyze a different repo
|
|
82
|
-
vibe-check --repo /path/to/repo
|
|
83
31
|
```
|
|
32
|
+
VIBE-CHECK Nov 21 - Nov 28
|
|
84
33
|
|
|
85
|
-
|
|
34
|
+
Rating: HIGH
|
|
35
|
+
Trust: 92% HIGH
|
|
36
|
+
Rework: 35% MEDIUM
|
|
86
37
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
| **Iteration Velocity** | Commits per hour | >5/hr | 3-5/hr | <3/hr |
|
|
90
|
-
| **Rework Ratio** | % of commits that are fixes | <30% | 30-50% | >50% |
|
|
91
|
-
| **Trust Pass Rate** | % of commits without immediate fix | >95% | 80-95% | <80% |
|
|
92
|
-
| **Debug Spiral Duration** | Avg time stuck in fix chains | <15m | 15-30m | >30m |
|
|
93
|
-
| **Flow Efficiency** | % time building vs debugging | >90% | 75-90% | <75% |
|
|
38
|
+
Run without --simple for full details
|
|
39
|
+
```
|
|
94
40
|
|
|
95
|
-
|
|
41
|
+
## Session Workflow
|
|
96
42
|
|
|
97
|
-
|
|
98
|
-
- **HIGH**: Generally healthy patterns, some areas to watch
|
|
99
|
-
- **MEDIUM**: Mixed signals—review individual metrics
|
|
100
|
-
- **LOW**: Commit patterns suggest friction—investigate causes
|
|
43
|
+
Declare your trust level before starting, then check if reality matched:
|
|
101
44
|
|
|
102
|
-
|
|
45
|
+
```bash
|
|
46
|
+
# Before work: declare your expectation
|
|
47
|
+
vibe-check start --level 3
|
|
103
48
|
|
|
104
|
-
|
|
49
|
+
# ... do your work ...
|
|
105
50
|
|
|
106
|
-
|
|
51
|
+
# After work: compare reality vs expectation
|
|
52
|
+
vibe-check --since "1 hour ago"
|
|
53
|
+
```
|
|
107
54
|
|
|
108
|
-
|
|
109
|
-
|---------|---------------|------------|
|
|
110
|
-
| `SECRETS_AUTH` | Auth/OAuth/credentials issues | Validate auth flow before implementation |
|
|
111
|
-
| `API_MISMATCH` | API version or schema problems | Check API docs, deploy minimal test first |
|
|
112
|
-
| `VOLUME_CONFIG` | Mount/path/permission issues | Test volume config in isolation |
|
|
113
|
-
| `SSL_TLS` | Certificate/HTTPS problems | Verify certs before deploying |
|
|
114
|
-
| `IMAGE_REGISTRY` | Container pull/tag issues | Test image pull separately |
|
|
55
|
+
Output:
|
|
115
56
|
|
|
116
|
-
|
|
57
|
+
```
|
|
58
|
+
SESSION COMPLETE
|
|
117
59
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
- **Weekly**: Track trends over time
|
|
121
|
-
- **After frustrating sessions**: Identify what went wrong
|
|
60
|
+
Declared: Level 3 - Balanced (60% trust)
|
|
61
|
+
Duration: 45 min, 12 commits
|
|
122
62
|
|
|
123
|
-
|
|
63
|
+
Trust Pass: 85% (expected >65%) ✓
|
|
64
|
+
Rework: 20% (expected <30%) ✓
|
|
124
65
|
|
|
66
|
+
✓ Level 3 was appropriate for this work
|
|
125
67
|
```
|
|
126
|
-
-V, --version Output version number
|
|
127
|
-
--since <date> Start date (e.g., "1 week ago", "2025-11-01")
|
|
128
|
-
--until <date> End date (default: now)
|
|
129
|
-
-f, --format <type> Output: terminal, json, markdown
|
|
130
|
-
-r, --repo <path> Repository path (default: current directory)
|
|
131
|
-
-o, --output <file> Write JSON results to file
|
|
132
|
-
-v, --verbose Show detailed output
|
|
133
|
-
--score Include VibeScore (semantic-free metrics)
|
|
134
|
-
--recommend Include level recommendation
|
|
135
|
-
--simple Show simplified output (less verbose)
|
|
136
|
-
-h, --help Display help
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Gamification
|
|
140
68
|
|
|
141
|
-
|
|
69
|
+
### Vibe Levels
|
|
142
70
|
|
|
143
|
-
|
|
71
|
+
| Level | Name | Trust | When to Use |
|
|
72
|
+
|-------|------|-------|-------------|
|
|
73
|
+
| 5 | Full Automation | 95% | Formatting, linting |
|
|
74
|
+
| 4 | High Trust | 80% | Boilerplate, CRUD |
|
|
75
|
+
| 3 | Balanced | 60% | Features, tests |
|
|
76
|
+
| 2 | Careful | 40% | Integrations, APIs |
|
|
77
|
+
| 1 | Skeptical | 20% | Architecture, security |
|
|
78
|
+
| 0 | Manual | 0% | Novel research |
|
|
144
79
|
|
|
145
|
-
|
|
146
|
-
|-------|------|-------------|
|
|
147
|
-
| 1 | Newbie | 0 |
|
|
148
|
-
| 2 | Regular | 100 |
|
|
149
|
-
| 3 | Committed | 300 |
|
|
150
|
-
| 4 | Dedicated | 600 |
|
|
151
|
-
| 5 | Expert | 1000 |
|
|
152
|
-
| 6 | Master | 1500 |
|
|
153
|
-
| 7 | Grandmaster | 2100 |
|
|
154
|
-
| 8 | Guru | 2800 |
|
|
155
|
-
| 9 | Sage | 3600 |
|
|
156
|
-
| 10 | Legend | 4500 |
|
|
80
|
+
## The Core Metrics
|
|
157
81
|
|
|
158
|
-
|
|
82
|
+
| Metric | What It Measures | Elite | Needs Work |
|
|
83
|
+
|--------|------------------|-------|------------|
|
|
84
|
+
| **Trust Pass Rate** | % commits without immediate fix | >95% | <80% |
|
|
85
|
+
| **Rework Ratio** | % commits that are fixes | <30% | >50% |
|
|
86
|
+
| **Debug Spiral** | Stuck in fix loops? | 0 detected | 3+ detected |
|
|
159
87
|
|
|
160
|
-
|
|
88
|
+
## Git Hook
|
|
161
89
|
|
|
162
|
-
|
|
163
|
-
- ⚔️ **Week Warrior** - Maintain a 7-day streak
|
|
164
|
-
- 👑 **Monthly Master** - Maintain a 30-day streak
|
|
165
|
-
- ✨ **Elite Vibes** - Achieve ELITE rating
|
|
166
|
-
- 🏅 **Ninety Club** - Vibe Score of 90%+
|
|
167
|
-
- 🧘 **Zen Master** - 50+ commits, 0 debug spirals
|
|
168
|
-
- ...and 12 more, including 2 hidden achievements!
|
|
90
|
+
Run automatically before every push:
|
|
169
91
|
|
|
170
|
-
|
|
92
|
+
```bash
|
|
93
|
+
vibe-check init-hook
|
|
94
|
+
```
|
|
171
95
|
|
|
172
|
-
|
|
96
|
+
Block pushes on LOW rating:
|
|
173
97
|
|
|
174
98
|
```bash
|
|
175
|
-
|
|
176
|
-
|
|
99
|
+
vibe-check init-hook --block-low
|
|
100
|
+
```
|
|
177
101
|
|
|
178
|
-
|
|
179
|
-
vibe-check profile --achievements
|
|
102
|
+
## Gamification
|
|
180
103
|
|
|
181
|
-
|
|
182
|
-
vibe-check profile --stats
|
|
104
|
+
Track progress with XP, streaks, and achievements:
|
|
183
105
|
|
|
184
|
-
|
|
185
|
-
vibe-check profile
|
|
106
|
+
```bash
|
|
107
|
+
vibe-check profile
|
|
186
108
|
```
|
|
187
109
|
|
|
188
|
-
|
|
110
|
+
```
|
|
111
|
+
╭─────────────────────────────────────────────╮
|
|
112
|
+
│ Your Vibe Profile │
|
|
113
|
+
├─────────────────────────────────────────────┤
|
|
114
|
+
│ 🌲 Level 4 Expert │
|
|
115
|
+
│ ████████████████░░░░ 320/400 XP │
|
|
116
|
+
│ │
|
|
117
|
+
│ 🔥 Current Streak: 5 days │
|
|
118
|
+
│ 🏆 Achievements: 8/19 unlocked │
|
|
119
|
+
╰─────────────────────────────────────────────╯
|
|
120
|
+
```
|
|
189
121
|
|
|
190
|
-
|
|
191
|
-
# Write JSON to file while showing terminal output
|
|
192
|
-
vibe-check --since "1 week ago" --score -o results.json
|
|
122
|
+
## CLI Options
|
|
193
123
|
|
|
194
|
-
|
|
195
|
-
vibe-check
|
|
124
|
+
```
|
|
125
|
+
vibe-check [options]
|
|
126
|
+
|
|
127
|
+
Options:
|
|
128
|
+
--since <date> Start date (e.g., "1 week ago")
|
|
129
|
+
--until <date> End date (default: now)
|
|
130
|
+
-f, --format <type> Output: terminal, json, markdown
|
|
131
|
+
-r, --repo <path> Repository path
|
|
132
|
+
-o, --output <file> Write JSON to file
|
|
133
|
+
-s, --simple Simplified output
|
|
134
|
+
--score Include VibeScore
|
|
135
|
+
-v, --verbose Verbose output
|
|
136
|
+
|
|
137
|
+
Commands:
|
|
138
|
+
start --level <n> Start session with declared level (0-5)
|
|
139
|
+
profile View your gamification profile
|
|
140
|
+
init-hook Install pre-push git hook
|
|
196
141
|
```
|
|
197
142
|
|
|
198
143
|
## GitHub Action
|
|
199
144
|
|
|
200
|
-
Add automated vibe-check to your PRs:
|
|
201
|
-
|
|
202
145
|
```yaml
|
|
203
|
-
# .github/workflows/vibe-check.yml
|
|
204
146
|
name: Vibe Check
|
|
205
|
-
|
|
206
147
|
on:
|
|
207
148
|
pull_request:
|
|
208
149
|
branches: [main]
|
|
@@ -213,104 +154,28 @@ jobs:
|
|
|
213
154
|
permissions:
|
|
214
155
|
contents: read
|
|
215
156
|
pull-requests: write
|
|
216
|
-
|
|
217
157
|
steps:
|
|
218
158
|
- uses: actions/checkout@v4
|
|
219
159
|
with:
|
|
220
160
|
fetch-depth: 0
|
|
221
|
-
|
|
222
161
|
- name: Run Vibe Check
|
|
223
162
|
uses: boshu2/vibe-check@v1
|
|
224
163
|
with:
|
|
225
164
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
226
165
|
```
|
|
227
166
|
|
|
228
|
-
### Action Inputs
|
|
229
|
-
|
|
230
|
-
| Input | Description | Default |
|
|
231
|
-
|-------|-------------|---------|
|
|
232
|
-
| `github-token` | GitHub token for PR comments | `${{ github.token }}` |
|
|
233
|
-
| `since` | Start date for analysis | PR base commit |
|
|
234
|
-
| `threshold` | Minimum rating to pass (elite, solid, needs-work) | none |
|
|
235
|
-
| `include-score` | Include VibeScore | `true` |
|
|
236
|
-
| `include-recommendation` | Include level recommendation | `true` |
|
|
237
|
-
| `output-file` | Path to write JSON results | none |
|
|
238
|
-
| `comment-on-pr` | Post results as PR comment | `true` |
|
|
239
|
-
|
|
240
|
-
### Action Outputs
|
|
241
|
-
|
|
242
|
-
| Output | Description |
|
|
243
|
-
|--------|-------------|
|
|
244
|
-
| `overall` | Overall rating (elite, solid, needs-work, struggling) |
|
|
245
|
-
| `vibe-score` | Numeric score (0-100) |
|
|
246
|
-
| `json` | Full JSON results |
|
|
247
|
-
|
|
248
|
-
### Example: Fail PR if Below Threshold
|
|
249
|
-
|
|
250
|
-
```yaml
|
|
251
|
-
- uses: boshu2/vibe-check@v1
|
|
252
|
-
with:
|
|
253
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
254
|
-
threshold: 'solid' # Fails if below solid
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
### Example: Save Results to File
|
|
258
|
-
|
|
259
|
-
```yaml
|
|
260
|
-
- uses: boshu2/vibe-check@v1
|
|
261
|
-
with:
|
|
262
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
263
|
-
output-file: 'vibe-check-results.json'
|
|
264
|
-
|
|
265
|
-
- name: Upload results
|
|
266
|
-
uses: actions/upload-artifact@v4
|
|
267
|
-
with:
|
|
268
|
-
name: vibe-check-results
|
|
269
|
-
path: vibe-check-results.json
|
|
270
|
-
```
|
|
271
|
-
|
|
272
167
|
## Requirements
|
|
273
168
|
|
|
274
169
|
- Node.js >= 20.0.0
|
|
275
|
-
- Git repository
|
|
276
|
-
- Conventional commits recommended (but not required)
|
|
277
|
-
|
|
278
|
-
## Limitations & Caveats
|
|
279
|
-
|
|
280
|
-
### What This Tool Does NOT Measure
|
|
281
|
-
|
|
282
|
-
| Claim | Reality |
|
|
283
|
-
|-------|---------|
|
|
284
|
-
| Code quality | Measures commit patterns, not code correctness |
|
|
285
|
-
| Actual productivity | Measures velocity signals, not shipped value |
|
|
286
|
-
| AI effectiveness | Measures workflow patterns, not AI contribution |
|
|
287
|
-
|
|
288
|
-
### Known Limitations
|
|
289
|
-
|
|
290
|
-
1. **No ground truth validation**: The correlation between these metrics and actual productivity outcomes has not been independently validated.
|
|
291
|
-
|
|
292
|
-
2. **Threshold sensitivity**: Magic numbers (5 min spiral threshold, 3-file churn) are based on practitioner intuition, not empirical studies.
|
|
293
|
-
|
|
294
|
-
3. **Goodhart's Law risk**: Once you know the metrics, you may unconsciously optimize for them rather than actual outcomes.
|
|
295
|
-
|
|
296
|
-
4. **Cold start**: New repositories have no calibration data. Default model weights are educated guesses.
|
|
297
|
-
|
|
298
|
-
5. **Sample size**: The ML model requires 20+ calibration samples for meaningful learning. Results with fewer samples are unreliable.
|
|
170
|
+
- Git repository
|
|
299
171
|
|
|
300
|
-
|
|
172
|
+
## What This Is (and Isn't)
|
|
301
173
|
|
|
302
|
-
|
|
303
|
-
- To compare across teams or developers (different baselines)
|
|
304
|
-
- As the sole indicator of AI tool effectiveness
|
|
305
|
-
- Without understanding what each metric actually measures
|
|
174
|
+
**Is:** A quick feedback tool to catch debug spirals early
|
|
306
175
|
|
|
307
|
-
|
|
176
|
+
**Isn't:** A productivity metric, performance review tool, or AI effectiveness measure
|
|
308
177
|
|
|
309
|
-
Use
|
|
310
|
-
- Combine with code review feedback
|
|
311
|
-
- Track alongside deployment success rates
|
|
312
|
-
- Use for self-reflection, not external judgment
|
|
313
|
-
- Treat as directional, not precise
|
|
178
|
+
Use it for self-reflection, not external judgment.
|
|
314
179
|
|
|
315
180
|
## License
|
|
316
181
|
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
| Version | Supported |
|
|
6
|
+
| ------- | ------------------ |
|
|
7
|
+
| 1.x.x | :white_check_mark: |
|
|
8
|
+
|
|
9
|
+
## Security Assessment
|
|
10
|
+
|
|
11
|
+
**Last Review:** 2025-11-29
|
|
12
|
+
**Risk Level:** LOW
|
|
13
|
+
**Reviewer:** Automated + Manual
|
|
14
|
+
|
|
15
|
+
### Summary
|
|
16
|
+
|
|
17
|
+
vibe-check is a local CLI tool that reads git history and writes statistics to local files. It has a minimal attack surface:
|
|
18
|
+
|
|
19
|
+
- No network requests (except GitHub Action for PR comments)
|
|
20
|
+
- No sensitive data handling
|
|
21
|
+
- No privilege escalation paths
|
|
22
|
+
- Trusted, minimal dependencies
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Threat Model
|
|
27
|
+
|
|
28
|
+
### What vibe-check does
|
|
29
|
+
|
|
30
|
+
1. Reads git commit history via `simple-git`
|
|
31
|
+
2. Calculates metrics from commit patterns
|
|
32
|
+
3. Writes profile/calibration data to `.vibe-check/` directory
|
|
33
|
+
4. Optionally installs a pre-push git hook
|
|
34
|
+
|
|
35
|
+
### What vibe-check does NOT do
|
|
36
|
+
|
|
37
|
+
- Make network requests
|
|
38
|
+
- Handle authentication tokens (except GitHub Action)
|
|
39
|
+
- Execute user-provided code
|
|
40
|
+
- Access files outside the repository or `~/.vibe-check/`
|
|
41
|
+
- Run with elevated privileges
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Known Security Considerations
|
|
46
|
+
|
|
47
|
+
### 1. Shell Command Construction in Git Hook
|
|
48
|
+
|
|
49
|
+
**Severity:** Low
|
|
50
|
+
**Location:** `hooks/pre-push`, `src/commands/init-hook.ts`
|
|
51
|
+
|
|
52
|
+
The pre-push hook uses `eval` to construct commands:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
OUTPUT=$(eval "$VIBE_CMD $SINCE_FLAG" 2>&1)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Risk:** Theoretical command injection if git commit dates contain shell metacharacters.
|
|
59
|
+
|
|
60
|
+
**Mitigation:**
|
|
61
|
+
- `SINCE_FLAG` is derived from `git log --format=%ci` output
|
|
62
|
+
- Git date format is strictly controlled by git itself
|
|
63
|
+
- Attacker would need to compromise git internals
|
|
64
|
+
|
|
65
|
+
**Actual Risk:** Negligible in practice.
|
|
66
|
+
|
|
67
|
+
### 2. File Path Handling
|
|
68
|
+
|
|
69
|
+
**Severity:** Low
|
|
70
|
+
**Location:** `src/calibration/storage.ts`, `src/gamification/profile.ts`
|
|
71
|
+
|
|
72
|
+
The `--repo` flag accepts a path that's used for file operations.
|
|
73
|
+
|
|
74
|
+
**Risk:** Path traversal if malicious path provided.
|
|
75
|
+
|
|
76
|
+
**Mitigation:**
|
|
77
|
+
- User controls the `--repo` flag (self-targeted attack)
|
|
78
|
+
- Writes only to `.vibe-check/` subdirectory
|
|
79
|
+
- Profile stored in user's home directory, not repo
|
|
80
|
+
|
|
81
|
+
**Actual Risk:** None - users would only be affecting their own system.
|
|
82
|
+
|
|
83
|
+
### 3. GitHub Action Input Handling
|
|
84
|
+
|
|
85
|
+
**Severity:** Low
|
|
86
|
+
**Location:** `action.yml`
|
|
87
|
+
|
|
88
|
+
Action inputs are passed to shell commands.
|
|
89
|
+
|
|
90
|
+
**Mitigation:**
|
|
91
|
+
- GitHub sanitizes workflow inputs
|
|
92
|
+
- Only collaborators can trigger PR workflows
|
|
93
|
+
- Inputs validated by vibe-check CLI
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Dependencies
|
|
98
|
+
|
|
99
|
+
All dependencies are widely-used, trusted packages:
|
|
100
|
+
|
|
101
|
+
| Package | Purpose | Risk |
|
|
102
|
+
|---------|---------|------|
|
|
103
|
+
| simple-git | Git operations | Low - no shell execution |
|
|
104
|
+
| commander | CLI framework | Low - argument parsing only |
|
|
105
|
+
| chalk | Terminal colors | Low - output formatting only |
|
|
106
|
+
| date-fns | Date formatting | Low - pure functions |
|
|
107
|
+
| enquirer | CLI prompts | Low - user input handling |
|
|
108
|
+
|
|
109
|
+
Run `npm audit` to check for known vulnerabilities.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Security Best Practices for Users
|
|
114
|
+
|
|
115
|
+
### Git Hook
|
|
116
|
+
|
|
117
|
+
The pre-push hook executes on every `git push`. To review what it does:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
cat .git/hooks/pre-push
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
To disable temporarily:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git push --no-verify
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
To remove:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
rm .git/hooks/pre-push
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Profile Data
|
|
136
|
+
|
|
137
|
+
Profile data is stored in `~/.vibe-check/profile.json`. This contains:
|
|
138
|
+
- Session history (dates, scores, commits analyzed)
|
|
139
|
+
- XP and achievement data
|
|
140
|
+
- No sensitive information
|
|
141
|
+
|
|
142
|
+
To clear your profile:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
rm -rf ~/.vibe-check/
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Repository Data
|
|
149
|
+
|
|
150
|
+
Calibration data is stored in `.vibe-check/` within each repository. Add to `.gitignore` if you don't want to commit it:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
echo ".vibe-check/" >> .gitignore
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Reporting a Vulnerability
|
|
159
|
+
|
|
160
|
+
If you discover a security vulnerability, please:
|
|
161
|
+
|
|
162
|
+
1. **Do NOT** open a public issue
|
|
163
|
+
2. Email the maintainer directly or use GitHub's private vulnerability reporting
|
|
164
|
+
3. Include:
|
|
165
|
+
- Description of the vulnerability
|
|
166
|
+
- Steps to reproduce
|
|
167
|
+
- Potential impact
|
|
168
|
+
- Suggested fix (if any)
|
|
169
|
+
|
|
170
|
+
We aim to respond within 48 hours and will credit reporters in the fix announcement.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Changelog
|
|
175
|
+
|
|
176
|
+
| Date | Version | Change |
|
|
177
|
+
|------|---------|--------|
|
|
178
|
+
| 2025-11-29 | 1.2.0 | Initial security review documented |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"project": "vibe-check",
|
|
3
|
+
"created": "2025-11-29",
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"current_state": {
|
|
6
|
+
"working_on": null,
|
|
7
|
+
"blockers": [],
|
|
8
|
+
"next_steps": []
|
|
9
|
+
},
|
|
10
|
+
"stats": {
|
|
11
|
+
"test_files": 8,
|
|
12
|
+
"tests_passing": 108,
|
|
13
|
+
"npm_version": "1.2.0"
|
|
14
|
+
},
|
|
15
|
+
"sessions": [
|
|
16
|
+
{
|
|
17
|
+
"session_id": "2025-11-29-001",
|
|
18
|
+
"started": "2025-11-29T08:00:00Z",
|
|
19
|
+
"ended": "2025-11-29T09:30:00Z",
|
|
20
|
+
"vibe_level": 4,
|
|
21
|
+
"summary": "Implemented full gamification system: streaks, XP, 19 achievements, dashboard shell, profile command",
|
|
22
|
+
"commits": ["e132b83"],
|
|
23
|
+
"features_completed": ["VIBE-001", "VIBE-002", "VIBE-003"]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"session_id": "2025-11-29-002",
|
|
27
|
+
"started": "2025-11-29T12:00:00Z",
|
|
28
|
+
"ended": "2025-11-29T13:00:00Z",
|
|
29
|
+
"vibe_level": 3,
|
|
30
|
+
"summary": "GitHub Action, JSON output, --simple flag, 57 gamification tests, published v1.1.0",
|
|
31
|
+
"commits": ["70dbd6f", "9e06f71", "62c512a", "a2fb133", "c521144", "43bf561", "9fca764", "e4c9027"],
|
|
32
|
+
"features_completed": ["VIBE-004", "VIBE-005", "VIBE-007"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"session_id": "2025-11-29-003",
|
|
36
|
+
"started": "2025-11-29T13:00:00Z",
|
|
37
|
+
"ended": "2025-11-29T13:45:00Z",
|
|
38
|
+
"vibe_level": 3,
|
|
39
|
+
"summary": "Pre-push git hook, security review, published v1.2.0",
|
|
40
|
+
"commits": ["f1d0843", "ad18702", "464a4ee", "9ae35d6"],
|
|
41
|
+
"features_completed": ["VIBE-006", "VIBE-008"]
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|