vaspera 2.10.0 → 2.11.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.
Files changed (206) hide show
  1. package/dist/__tests__/scanners/ai-code/ai-detector.test.d.ts +2 -0
  2. package/dist/__tests__/scanners/ai-code/ai-detector.test.d.ts.map +1 -0
  3. package/dist/__tests__/scanners/ai-code/ai-detector.test.js +188 -0
  4. package/dist/__tests__/scanners/ai-code/ai-detector.test.js.map +1 -0
  5. package/dist/__tests__/scanners/ai-code/confidence-scorer.test.d.ts +2 -0
  6. package/dist/__tests__/scanners/ai-code/confidence-scorer.test.d.ts.map +1 -0
  7. package/dist/__tests__/scanners/ai-code/confidence-scorer.test.js +363 -0
  8. package/dist/__tests__/scanners/ai-code/confidence-scorer.test.js.map +1 -0
  9. package/dist/__tests__/scanners/ai-code/hallucination-checker.test.d.ts +2 -0
  10. package/dist/__tests__/scanners/ai-code/hallucination-checker.test.d.ts.map +1 -0
  11. package/dist/__tests__/scanners/ai-code/hallucination-checker.test.js +226 -0
  12. package/dist/__tests__/scanners/ai-code/hallucination-checker.test.js.map +1 -0
  13. package/dist/__tests__/scanners/ai-code/index.test.d.ts +2 -0
  14. package/dist/__tests__/scanners/ai-code/index.test.d.ts.map +1 -0
  15. package/dist/__tests__/scanners/ai-code/index.test.js +214 -0
  16. package/dist/__tests__/scanners/ai-code/index.test.js.map +1 -0
  17. package/dist/__tests__/scanners/deploy/health-checker.test.d.ts +2 -0
  18. package/dist/__tests__/scanners/deploy/health-checker.test.d.ts.map +1 -0
  19. package/dist/__tests__/scanners/deploy/health-checker.test.js +67 -0
  20. package/dist/__tests__/scanners/deploy/health-checker.test.js.map +1 -0
  21. package/dist/__tests__/scanners/deploy/index.test.d.ts +2 -0
  22. package/dist/__tests__/scanners/deploy/index.test.d.ts.map +1 -0
  23. package/dist/__tests__/scanners/deploy/index.test.js +84 -0
  24. package/dist/__tests__/scanners/deploy/index.test.js.map +1 -0
  25. package/dist/__tests__/scanners/deploy/provider-detector.test.d.ts +2 -0
  26. package/dist/__tests__/scanners/deploy/provider-detector.test.d.ts.map +1 -0
  27. package/dist/__tests__/scanners/deploy/provider-detector.test.js +88 -0
  28. package/dist/__tests__/scanners/deploy/provider-detector.test.js.map +1 -0
  29. package/dist/__tests__/scanners/deploy/types.test.d.ts +2 -0
  30. package/dist/__tests__/scanners/deploy/types.test.d.ts.map +1 -0
  31. package/dist/__tests__/scanners/deploy/types.test.js +126 -0
  32. package/dist/__tests__/scanners/deploy/types.test.js.map +1 -0
  33. package/dist/__tests__/scanners/fp-feedback.test.js +1 -1
  34. package/dist/__tests__/scanners/fp-feedback.test.js.map +1 -1
  35. package/dist/__tests__/scanners/fp-tracker.test.js +1 -1
  36. package/dist/__tests__/scanners/fp-tracker.test.js.map +1 -1
  37. package/dist/__tests__/scanners/runtime/app-launcher.test.d.ts +2 -0
  38. package/dist/__tests__/scanners/runtime/app-launcher.test.d.ts.map +1 -0
  39. package/dist/__tests__/scanners/runtime/app-launcher.test.js +94 -0
  40. package/dist/__tests__/scanners/runtime/app-launcher.test.js.map +1 -0
  41. package/dist/__tests__/scanners/runtime/golden-path-runner.test.d.ts +2 -0
  42. package/dist/__tests__/scanners/runtime/golden-path-runner.test.d.ts.map +1 -0
  43. package/dist/__tests__/scanners/runtime/golden-path-runner.test.js +195 -0
  44. package/dist/__tests__/scanners/runtime/golden-path-runner.test.js.map +1 -0
  45. package/dist/__tests__/scanners/runtime/index.test.d.ts +2 -0
  46. package/dist/__tests__/scanners/runtime/index.test.d.ts.map +1 -0
  47. package/dist/__tests__/scanners/runtime/index.test.js +120 -0
  48. package/dist/__tests__/scanners/runtime/index.test.js.map +1 -0
  49. package/dist/__tests__/scanners/runtime/types.test.d.ts +2 -0
  50. package/dist/__tests__/scanners/runtime/types.test.d.ts.map +1 -0
  51. package/dist/__tests__/scanners/runtime/types.test.js +126 -0
  52. package/dist/__tests__/scanners/runtime/types.test.js.map +1 -0
  53. package/dist/__tests__/scanners/scale/bottleneck-detector.test.d.ts +2 -0
  54. package/dist/__tests__/scanners/scale/bottleneck-detector.test.d.ts.map +1 -0
  55. package/dist/__tests__/scanners/scale/bottleneck-detector.test.js +187 -0
  56. package/dist/__tests__/scanners/scale/bottleneck-detector.test.js.map +1 -0
  57. package/dist/__tests__/scanners/scale/index.test.d.ts +2 -0
  58. package/dist/__tests__/scanners/scale/index.test.d.ts.map +1 -0
  59. package/dist/__tests__/scanners/scale/index.test.js +87 -0
  60. package/dist/__tests__/scanners/scale/index.test.js.map +1 -0
  61. package/dist/__tests__/scanners/scale/load-profiler.test.d.ts +2 -0
  62. package/dist/__tests__/scanners/scale/load-profiler.test.d.ts.map +1 -0
  63. package/dist/__tests__/scanners/scale/load-profiler.test.js +122 -0
  64. package/dist/__tests__/scanners/scale/load-profiler.test.js.map +1 -0
  65. package/dist/__tests__/scanners/scale/types.test.d.ts +2 -0
  66. package/dist/__tests__/scanners/scale/types.test.d.ts.map +1 -0
  67. package/dist/__tests__/scanners/scale/types.test.js +129 -0
  68. package/dist/__tests__/scanners/scale/types.test.js.map +1 -0
  69. package/dist/action/pr-comment.test.js +8 -0
  70. package/dist/action/pr-comment.test.js.map +1 -1
  71. package/dist/action/sarif-upload.test.js +8 -0
  72. package/dist/action/sarif-upload.test.js.map +1 -1
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +874 -0
  75. package/dist/index.js.map +1 -1
  76. package/dist/install-skills.d.ts +11 -0
  77. package/dist/install-skills.d.ts.map +1 -0
  78. package/dist/install-skills.js +81 -0
  79. package/dist/install-skills.js.map +1 -0
  80. package/dist/scanners/ai-code/ai-detector.d.ts +25 -0
  81. package/dist/scanners/ai-code/ai-detector.d.ts.map +1 -0
  82. package/dist/scanners/ai-code/ai-detector.js +192 -0
  83. package/dist/scanners/ai-code/ai-detector.js.map +1 -0
  84. package/dist/scanners/ai-code/confidence-scorer.d.ts +40 -0
  85. package/dist/scanners/ai-code/confidence-scorer.d.ts.map +1 -0
  86. package/dist/scanners/ai-code/confidence-scorer.js +148 -0
  87. package/dist/scanners/ai-code/confidence-scorer.js.map +1 -0
  88. package/dist/scanners/ai-code/hallucination-checker.d.ts +36 -0
  89. package/dist/scanners/ai-code/hallucination-checker.d.ts.map +1 -0
  90. package/dist/scanners/ai-code/hallucination-checker.js +298 -0
  91. package/dist/scanners/ai-code/hallucination-checker.js.map +1 -0
  92. package/dist/scanners/ai-code/index.d.ts +30 -0
  93. package/dist/scanners/ai-code/index.d.ts.map +1 -0
  94. package/dist/scanners/ai-code/index.js +224 -0
  95. package/dist/scanners/ai-code/index.js.map +1 -0
  96. package/dist/scanners/ai-code/types.d.ts +192 -0
  97. package/dist/scanners/ai-code/types.d.ts.map +1 -0
  98. package/dist/scanners/ai-code/types.js +37 -0
  99. package/dist/scanners/ai-code/types.js.map +1 -0
  100. package/dist/scanners/cache.d.ts.map +1 -1
  101. package/dist/scanners/cache.js +8 -0
  102. package/dist/scanners/cache.js.map +1 -1
  103. package/dist/scanners/dast.d.ts +40 -0
  104. package/dist/scanners/dast.d.ts.map +1 -0
  105. package/dist/scanners/dast.js +228 -0
  106. package/dist/scanners/dast.js.map +1 -0
  107. package/dist/scanners/deploy/health-checker.d.ts +38 -0
  108. package/dist/scanners/deploy/health-checker.d.ts.map +1 -0
  109. package/dist/scanners/deploy/health-checker.js +272 -0
  110. package/dist/scanners/deploy/health-checker.js.map +1 -0
  111. package/dist/scanners/deploy/index.d.ts +44 -0
  112. package/dist/scanners/deploy/index.d.ts.map +1 -0
  113. package/dist/scanners/deploy/index.js +208 -0
  114. package/dist/scanners/deploy/index.js.map +1 -0
  115. package/dist/scanners/deploy/provider-detector.d.ts +25 -0
  116. package/dist/scanners/deploy/provider-detector.d.ts.map +1 -0
  117. package/dist/scanners/deploy/provider-detector.js +177 -0
  118. package/dist/scanners/deploy/provider-detector.js.map +1 -0
  119. package/dist/scanners/deploy/types.d.ts +406 -0
  120. package/dist/scanners/deploy/types.d.ts.map +1 -0
  121. package/dist/scanners/deploy/types.js +58 -0
  122. package/dist/scanners/deploy/types.js.map +1 -0
  123. package/dist/scanners/deploy/vercel-integration.d.ts +52 -0
  124. package/dist/scanners/deploy/vercel-integration.d.ts.map +1 -0
  125. package/dist/scanners/deploy/vercel-integration.js +280 -0
  126. package/dist/scanners/deploy/vercel-integration.js.map +1 -0
  127. package/dist/scanners/index.d.ts +4 -4
  128. package/dist/scanners/index.d.ts.map +1 -1
  129. package/dist/scanners/index.js +133 -15
  130. package/dist/scanners/index.js.map +1 -1
  131. package/dist/scanners/index.test.js +6 -6
  132. package/dist/scanners/index.test.js.map +1 -1
  133. package/dist/scanners/openapi.d.ts +20 -0
  134. package/dist/scanners/openapi.d.ts.map +1 -0
  135. package/dist/scanners/openapi.js +226 -0
  136. package/dist/scanners/openapi.js.map +1 -0
  137. package/dist/scanners/runtime/app-launcher.d.ts +33 -0
  138. package/dist/scanners/runtime/app-launcher.d.ts.map +1 -0
  139. package/dist/scanners/runtime/app-launcher.js +419 -0
  140. package/dist/scanners/runtime/app-launcher.js.map +1 -0
  141. package/dist/scanners/runtime/golden-path-runner.d.ts +48 -0
  142. package/dist/scanners/runtime/golden-path-runner.d.ts.map +1 -0
  143. package/dist/scanners/runtime/golden-path-runner.js +373 -0
  144. package/dist/scanners/runtime/golden-path-runner.js.map +1 -0
  145. package/dist/scanners/runtime/index.d.ts +41 -0
  146. package/dist/scanners/runtime/index.d.ts.map +1 -0
  147. package/dist/scanners/runtime/index.js +164 -0
  148. package/dist/scanners/runtime/index.js.map +1 -0
  149. package/dist/scanners/runtime/playwright-executor.d.ts +50 -0
  150. package/dist/scanners/runtime/playwright-executor.d.ts.map +1 -0
  151. package/dist/scanners/runtime/playwright-executor.js +387 -0
  152. package/dist/scanners/runtime/playwright-executor.js.map +1 -0
  153. package/dist/scanners/runtime/types.d.ts +215 -0
  154. package/dist/scanners/runtime/types.d.ts.map +1 -0
  155. package/dist/scanners/runtime/types.js +40 -0
  156. package/dist/scanners/runtime/types.js.map +1 -0
  157. package/dist/scanners/rust.d.ts +22 -0
  158. package/dist/scanners/rust.d.ts.map +1 -0
  159. package/dist/scanners/rust.js +239 -0
  160. package/dist/scanners/rust.js.map +1 -0
  161. package/dist/scanners/scale/bottleneck-detector.d.ts +17 -0
  162. package/dist/scanners/scale/bottleneck-detector.d.ts.map +1 -0
  163. package/dist/scanners/scale/bottleneck-detector.js +250 -0
  164. package/dist/scanners/scale/bottleneck-detector.js.map +1 -0
  165. package/dist/scanners/scale/capacity-estimator.d.ts +17 -0
  166. package/dist/scanners/scale/capacity-estimator.d.ts.map +1 -0
  167. package/dist/scanners/scale/capacity-estimator.js +197 -0
  168. package/dist/scanners/scale/capacity-estimator.js.map +1 -0
  169. package/dist/scanners/scale/index.d.ts +37 -0
  170. package/dist/scanners/scale/index.d.ts.map +1 -0
  171. package/dist/scanners/scale/index.js +101 -0
  172. package/dist/scanners/scale/index.js.map +1 -0
  173. package/dist/scanners/scale/load-profiler.d.ts +48 -0
  174. package/dist/scanners/scale/load-profiler.d.ts.map +1 -0
  175. package/dist/scanners/scale/load-profiler.js +377 -0
  176. package/dist/scanners/scale/load-profiler.js.map +1 -0
  177. package/dist/scanners/scale/types.d.ts +529 -0
  178. package/dist/scanners/scale/types.d.ts.map +1 -0
  179. package/dist/scanners/scale/types.js +57 -0
  180. package/dist/scanners/scale/types.js.map +1 -0
  181. package/dist/scanners/secrets.d.ts.map +1 -1
  182. package/dist/scanners/secrets.js +13 -2
  183. package/dist/scanners/secrets.js.map +1 -1
  184. package/dist/scanners/terraform.d.ts +23 -0
  185. package/dist/scanners/terraform.d.ts.map +1 -0
  186. package/dist/scanners/terraform.js +207 -0
  187. package/dist/scanners/terraform.js.map +1 -0
  188. package/dist/scanners/types.d.ts +1 -1
  189. package/dist/scanners/types.d.ts.map +1 -1
  190. package/dist/scanners/types.js +8 -0
  191. package/dist/scanners/types.js.map +1 -1
  192. package/package.json +4 -2
  193. package/skills/vaspera-add-tests/SKILL.md +102 -0
  194. package/skills/vaspera-ai-verify/SKILL.md +166 -0
  195. package/skills/vaspera-audit/SKILL.md +67 -0
  196. package/skills/vaspera-certify/SKILL.md +130 -0
  197. package/skills/vaspera-deploy/SKILL.md +152 -0
  198. package/skills/vaspera-fix-critical/SKILL.md +52 -0
  199. package/skills/vaspera-fix-high/SKILL.md +81 -0
  200. package/skills/vaspera-fix-medium/SKILL.md +56 -0
  201. package/skills/vaspera-fix-rls/SKILL.md +85 -0
  202. package/skills/vaspera-harden/SKILL.md +102 -0
  203. package/skills/vaspera-help/SKILL.md +61 -0
  204. package/skills/vaspera-load-test/SKILL.md +167 -0
  205. package/skills/vaspera-verify/SKILL.md +70 -0
  206. package/skills/vaspera-verify-e2e/SKILL.md +117 -0
@@ -0,0 +1,67 @@
1
+ ---
2
+ description: Run a security audit and write findings to .vaspera/audit/
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Bash, Read, Grep, Glob
5
+ ---
6
+
7
+ Run a security audit against the specified project (or current directory).
8
+
9
+ ## Steps
10
+
11
+ 1. **Validate project path**
12
+ - Default to `.` if no argument provided
13
+ - Confirm the path exists and contains code (`package.json`, `go.mod`, `requirements.txt`, etc.)
14
+
15
+ 2. **Run certification scan**
16
+ - Use the `certification_scan` MCP tool if available in session
17
+ - Otherwise: `npx vaspera-hardening-mcp-server scan <path>`
18
+ - Auto-detect languages and run appropriate scanners:
19
+ - JavaScript/TypeScript: semgrep, npm-audit, tsc, eslint
20
+ - Python: semgrep, bandit
21
+ - Go: semgrep, gosec
22
+ - Ruby: semgrep, brakeman
23
+ - All: gitleaks (secrets), trivy (containers)
24
+
25
+ 3. **Write findings to stable location**
26
+ - Create `.vaspera/audit/` directory if it doesn't exist
27
+ - Write findings to `.vaspera/audit/{ISO-timestamp}.json`
28
+ - Schema:
29
+ ```json
30
+ {
31
+ "timestamp": "2026-05-29T10:30:00.000Z",
32
+ "project_path": ".",
33
+ "scanners_run": ["semgrep", "npm-audit", "gitleaks"],
34
+ "findings": [...],
35
+ "summary": {
36
+ "total": 42,
37
+ "by_severity": {"critical": 2, "high": 5, "medium": 15, "low": 20},
38
+ "by_scanner": {"semgrep": 30, "npm-audit": 10, "gitleaks": 2}
39
+ },
40
+ "duration_ms": 12345
41
+ }
42
+ ```
43
+
44
+ 4. **Summarize results**
45
+ Present findings as a table:
46
+
47
+ | Severity | Count | Top Scanners |
48
+ |----------|-------|--------------|
49
+ | critical | N | semgrep, gitleaks |
50
+ | high | N | npm-audit |
51
+ | medium | N | semgrep |
52
+ | low | N | eslint |
53
+
54
+ Then list **top 5 findings** with clickable file references:
55
+ - `[src/auth/login.ts:42](src/auth/login.ts#L42)` — SQL injection (CWE-89)
56
+ - etc.
57
+
58
+ 5. **Provide recommendations**
59
+ - Identify the 3 highest-impact fixes (severity × fixability)
60
+ - Do NOT modify code or open PRs
61
+ - Suggest running `/vaspera-fix-critical` for remediation (future skill)
62
+
63
+ ## Important
64
+
65
+ - This skill is READ-ONLY — it audits but does not fix
66
+ - Findings are written to `.vaspera/audit/` (separate from MCP cache)
67
+ - Use this skill for A/B comparison against the `certification_scan` MCP tool
@@ -0,0 +1,130 @@
1
+ ---
2
+ description: Full production readiness certification (code + security + runtime)
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Bash, Read, Write, Glob, Grep
5
+ ---
6
+
7
+ Run complete production readiness certification across all dimensions.
8
+
9
+ ## Overview
10
+
11
+ This is the master certification skill that combines:
12
+ - **Code Quality** (20%) — Type safety, patterns, test coverage
13
+ - **Security** (25%) — Vulnerabilities, secrets, RLS policies
14
+ - **Runtime Verified** (25%) — E2E tests, visual regression, API tests
15
+ - **Scale Ready** (15%) — Load tested, capacity estimation (M8)
16
+ - **Deploy Ready** (15%) — Canary success, health checks (M9)
17
+
18
+ ## Steps
19
+
20
+ 1. **Validate project path**
21
+ - Default to `.` if no argument provided
22
+ - Detect project type (web app, API, CLI, library)
23
+
24
+ 2. **Run security audit** (`/vaspera-audit` equivalent)
25
+ - Use `certification_scan` MCP tool
26
+ - Collect findings by severity
27
+
28
+ 3. **Run runtime verification** (`/vaspera-verify-e2e` equivalent)
29
+ - Detect framework
30
+ - Launch app (if web/API project)
31
+ - Execute golden path flows
32
+ - Calculate runtime score
33
+
34
+ 4. **Run scale assessment** (M8 - if available)
35
+ - Check for `.vaspera/load/*.yaml` profiles
36
+ - Run load tests if profiles exist
37
+ - Calculate scale score
38
+
39
+ 5. **Check deployment readiness** (M9 - if available)
40
+ - Verify health endpoints exist
41
+ - Check for deployment configuration
42
+ - Calculate deploy score
43
+
44
+ 6. **Calculate Production Readiness Score**
45
+ ```
46
+ Score = (
47
+ code_quality * 0.20 +
48
+ security * 0.25 +
49
+ runtime * 0.25 +
50
+ scale * 0.15 +
51
+ deploy * 0.15
52
+ )
53
+ ```
54
+
55
+ 7. **Determine certification level**
56
+ | Score | Level | Badge | Recommendation |
57
+ |-------|-------|-------|----------------|
58
+ | 90-100 | CERTIFIED | 🟢 | Ship to production |
59
+ | 70-89 | APPROVED | 🟡 | Ship with monitoring |
60
+ | 40-69 | REVIEW_REQUIRED | 🟠 | Fix before shipping |
61
+ | 0-39 | BLOCKED | 🔴 | Critical issues |
62
+
63
+ 8. **Generate certification report**
64
+ ```
65
+ ╔══════════════════════════════════════════════════════════════╗
66
+ ║ PRODUCTION READINESS CERTIFICATION ║
67
+ ╠══════════════════════════════════════════════════════════════╣
68
+ ║ ║
69
+ ║ Project: my-app ║
70
+ ║ Framework: Next.js 14.2.3 ║
71
+ ║ Certified: 2026-05-29T21:30:00Z ║
72
+ ║ ║
73
+ ╠══════════════════════════════════════════════════════════════╣
74
+ ║ ║
75
+ ║ Code Quality: 92/100 ████████████████████░░░░ (20%) ║
76
+ ║ Security: 88/100 ██████████████████░░░░░░ (25%) ║
77
+ ║ Runtime Verified: 95/100 █████████████████████░░░ (25%) ║
78
+ ║ Scale Ready: --/100 (not tested) (15%) ║
79
+ ║ Deploy Ready: --/100 (not tested) (15%) ║
80
+ ║ ────────────────────────────────────────────────────────── ║
81
+ ║ OVERALL: 88/100 ║
82
+ ║ ║
83
+ ╠══════════════════════════════════════════════════════════════╣
84
+ ║ ║
85
+ ║ Level: 🟡 APPROVED ║
86
+ ║ → Ship with monitoring ║
87
+ ║ ║
88
+ ╠══════════════════════════════════════════════════════════════╣
89
+ ║ ║
90
+ ║ Top Issues: ║
91
+ ║ 1. [CRITICAL] SQL injection in auth/login.ts:42 ║
92
+ ║ 2. [HIGH] Missing RLS on users table ║
93
+ ║ 3. [HIGH] No rate limiting on /api/checkout ║
94
+ ║ ║
95
+ ╚══════════════════════════════════════════════════════════════╝
96
+ ```
97
+
98
+ 9. **Write certification to stable location**
99
+ - Create `.vaspera/certifications/` directory
100
+ - Write to `.vaspera/certifications/{ISO-timestamp}.json`
101
+ - Include full breakdown and remediation recommendations
102
+
103
+ ## Fallback Scoring
104
+
105
+ When a dimension isn't testable:
106
+ - **No web app** → Runtime defaults to 50 (neutral)
107
+ - **No load profiles** → Scale defaults to 50 (neutral)
108
+ - **No deploy config** → Deploy defaults to 50 (neutral)
109
+
110
+ ## MCP Tools Used
111
+
112
+ - `certification_scan` — Security findings
113
+ - `runtime_detect` — Framework detection
114
+ - `runtime_verify` — Runtime verification (if applicable)
115
+ - `certification_summary` — Final summary
116
+
117
+ ## Certification Badge
118
+
119
+ Projects passing certification can display:
120
+
121
+ ```markdown
122
+ [![Production Ready](https://img.shields.io/badge/Production%20Ready-88%25-green)](CERTIFICATION.md)
123
+ ```
124
+
125
+ ## Important
126
+
127
+ - This is a comprehensive audit — may take several minutes
128
+ - Requires MCP server connection for full functionality
129
+ - Falls back to CLI tools when MCP unavailable
130
+ - Does NOT auto-fix issues — use `/vaspera-harden` for that
@@ -0,0 +1,152 @@
1
+ ---
2
+ description: Run deployment verification and health checks (M9)
3
+ argument-hint: "[deployment-url]"
4
+ allowed-tools: Bash, Read, Write, Glob, Grep
5
+ ---
6
+
7
+ Run deployment verification against a deployed app.
8
+
9
+ ## Steps
10
+
11
+ 1. **Validate deployment URL**
12
+ - Require deployment URL as argument
13
+ - Validate URL format
14
+
15
+ 2. **Detect deployment provider**
16
+ - Use `deploy_detect` MCP tool
17
+ - Check for Vercel, AWS, GCP, Railway, Render, Fly
18
+
19
+ 3. **Load deployment config**
20
+ - Look for `.vaspera/deploy.yaml`
21
+ - If not found, offer to generate sample config
22
+
23
+ 4. **Run health checks**
24
+ - Check configured health endpoints
25
+ - Default: `/`, `/api/health`
26
+ - Measure response times and status codes
27
+
28
+ 5. **Run smoke tests**
29
+ - Execute tests from config
30
+ - Check status codes, latency, response bodies
31
+
32
+ 6. **Analyze results**
33
+ - Calculate health score (0-100)
34
+ - Calculate smoke test score (0-100)
35
+ - Calculate overall deploy score
36
+
37
+ 7. **Present results**
38
+ ```
39
+ Deployment Verification Results
40
+ ================================
41
+ Provider: Vercel (detected)
42
+ URL: https://my-app.vercel.app
43
+
44
+ Health Checks:
45
+ ┌────────────────┬──────────┬──────────┬────────────┐
46
+ │ Endpoint │ Status │ Code │ Time (ms) │
47
+ ├────────────────┼──────────┼──────────┼────────────┤
48
+ │ / │ ✅ healthy│ 200 │ 89 │
49
+ │ /api/health │ ✅ healthy│ 200 │ 45 │
50
+ │ /api/data │ ⚠️ degraded│ 200 │ 612 │
51
+ └────────────────┴──────────┴──────────┴────────────┘
52
+
53
+ Smoke Tests:
54
+ ┌────────────────────────┬──────────┬────────────┐
55
+ │ Test │ Status │ Time (ms) │
56
+ ├────────────────────────┼──────────┼────────────┤
57
+ │ Homepage loads │ ✅ PASS │ 89 │
58
+ │ API health check │ ✅ PASS │ 45 │
59
+ │ User can login │ ❌ FAIL │ 1200 │
60
+ └────────────────────────┴──────────┴────────────┘
61
+
62
+ Scores:
63
+ - Health: 87/100
64
+ - Smoke Tests: 67/100
65
+ - Overall: 77/100
66
+
67
+ Certification Level: 🟡 APPROVED
68
+ → Ship with monitoring
69
+ ```
70
+
71
+ 8. **Vercel-specific actions** (if Vercel detected)
72
+ - List recent deployments
73
+ - Promote preview to production
74
+ - Rollback to previous version
75
+
76
+ ## Config Format
77
+
78
+ Config is defined in `.vaspera/deploy.yaml`:
79
+
80
+ ```yaml
81
+ provider: vercel # Optional, auto-detected
82
+
83
+ healthEndpoints:
84
+ - /
85
+ - /api/health
86
+ - /api/ready
87
+
88
+ smokeTests:
89
+ - name: "Homepage loads"
90
+ endpoint: "/"
91
+ method: GET
92
+ expectedStatus: 200
93
+
94
+ - name: "API health check"
95
+ endpoint: "/api/health"
96
+ method: GET
97
+ expectedStatus: 200
98
+ assertions:
99
+ - type: latency
100
+ operator: lt
101
+ value: 500
102
+
103
+ - name: "User can login"
104
+ endpoint: "/api/auth/login"
105
+ method: POST
106
+ expectedStatus: 200
107
+ body:
108
+ email: "test@example.com"
109
+ password: "testpass"
110
+
111
+ canary:
112
+ enabled: true
113
+ trafficPercent: 10
114
+ duration: "10m"
115
+ thresholds:
116
+ errorRate: 0.01
117
+ p95Latency: 500
118
+ rollbackOnFailure: true
119
+
120
+ rollback:
121
+ autoRollback: true
122
+ retainVersions: 5
123
+ ```
124
+
125
+ ## MCP Tools Used
126
+
127
+ - `deploy_detect` — Detect deployment provider
128
+ - `deploy_verify` — Full verification
129
+ - `deploy_health` — Quick health check
130
+ - `deploy_config_generate` — Create sample config
131
+ - `deploy_vercel_list` — List Vercel deployments
132
+ - `deploy_vercel_promote` — Promote to production
133
+ - `deploy_vercel_rollback` — Rollback deployment
134
+
135
+ ## Vercel Integration
136
+
137
+ Set `VERCEL_TOKEN` for full Vercel integration:
138
+ ```bash
139
+ export VERCEL_TOKEN=your_token_here
140
+ ```
141
+
142
+ Commands available with Vercel token:
143
+ - List recent deployments
144
+ - Promote preview to production
145
+ - Rollback to previous version
146
+
147
+ ## Important
148
+
149
+ - Always verify deployment URLs before promoting to production
150
+ - Smoke tests hit the actual deployment — use test data
151
+ - Canary analysis requires the app to be running for the duration
152
+ - Rollbacks are immediate — verify the target deployment first
@@ -0,0 +1,52 @@
1
+ ---
2
+ description: Fix all CRITICAL severity security findings
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Read, Edit, Write, Bash, Grep, Glob
5
+ ---
6
+
7
+ Remediate all CRITICAL severity findings with verification loop.
8
+
9
+ ## Steps
10
+
11
+ 1. **Load audit findings**
12
+ - Read latest from `.vaspera/audit/*.json` (most recent by timestamp)
13
+ - If no audit exists, run `/vaspera-audit` first
14
+ - Filter findings where `severity === "critical"`
15
+
16
+ 2. **Categorize critical findings**
17
+ Critical categories:
18
+ - Unhandled async/await (crashes)
19
+ - Missing auth checks (unauthorized access)
20
+ - Missing RLS policies (data leakage)
21
+ - Hardcoded secrets (credential exposure)
22
+ - Raw SQL injection (CWE-89)
23
+ - dangerouslySetInnerHTML (XSS, CWE-79)
24
+ - Publicly exposed endpoints
25
+ - Missing CORS configuration
26
+
27
+ 3. **For each finding**
28
+ - Show file location with context (3 lines before/after)
29
+ - Preview the fix (before/after diff)
30
+ - Apply fix:
31
+ - Auto-apply if pattern has `safeToAutoApply: true`
32
+ - Otherwise, confirm with user
33
+ - Run `npm run build` to verify no compile errors
34
+
35
+ 4. **Verification loop**
36
+ - After fixing a group of related findings, re-run the targeted scanner
37
+ - Example: after fixing gitleaks findings, run gitleaks again
38
+ - Confirm finding count decreased
39
+ - If new findings appear (regressions), flag immediately
40
+
41
+ 5. **Final report**
42
+ - N critical findings fixed
43
+ - M critical findings remaining (with reasons)
44
+ - Any regressions introduced
45
+ - Suggest `/vaspera-fix-high` as next step
46
+
47
+ ## Important
48
+
49
+ - ALWAYS run `npm run build` after each fix to catch compile errors early
50
+ - NEVER skip the verification loop — re-scan to confirm fixes worked
51
+ - Stage changes but do NOT commit unless user requests
52
+ - If a fix requires manual intervention, explain why and provide guidance
@@ -0,0 +1,81 @@
1
+ ---
2
+ description: Fix HIGH severity findings in 4 rounds
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Read, Edit, Write, Bash, Grep, Glob
5
+ ---
6
+
7
+ Remediate HIGH severity findings systematically in 4 rounds.
8
+
9
+ ## Steps
10
+
11
+ 1. **Load audit findings**
12
+ - Read latest from `.vaspera/audit/*.json`
13
+ - Filter findings where `severity === "high"`
14
+ - Group by category for round assignment
15
+
16
+ 2. **Round A: Input Validation**
17
+ Target findings related to:
18
+ - Missing Zod schemas
19
+ - Missing safeParse calls
20
+ - Missing 400 responses for invalid input
21
+ - Unvalidated user input
22
+
23
+ For each:
24
+ - Add Zod schema if missing
25
+ - Replace direct access with safeParse
26
+ - Add proper error responses
27
+ - Run `npm run build` to verify
28
+
29
+ 3. **Round B: TypeScript Strictness**
30
+ Target findings related to:
31
+ - `any` type annotations
32
+ - Missing explicit return types
33
+ - Unsafe type assertions (`as unknown as T`)
34
+
35
+ For each:
36
+ - Replace `any` with proper types or `unknown`
37
+ - Add explicit return types to functions
38
+ - Replace unsafe casts with type guards
39
+ - Run `npm run build` to verify
40
+
41
+ 4. **Round C: UI Resilience**
42
+ Target findings related to:
43
+ - Missing loading states
44
+ - Missing error states
45
+ - Missing empty states
46
+ - Missing cleanup for subscriptions/listeners
47
+ - Missing Error Boundaries
48
+
49
+ For each:
50
+ - Add loading/error/empty state handling
51
+ - Add cleanup in useEffect return
52
+ - Wrap risky components in Error Boundaries
53
+ - Run `npm run build` to verify
54
+
55
+ 5. **Round D: API Hardening**
56
+ Target findings related to:
57
+ - Error response leaking internal details
58
+ - Missing revalidatePath calls
59
+ - Inconsistent response shapes
60
+
61
+ For each:
62
+ - Sanitize error responses
63
+ - Add cache invalidation
64
+ - Standardize response format
65
+ - Run `npm run build` to verify
66
+
67
+ 6. **After each round**
68
+ - Commit with: `fix: resolve high-severity issues (round X)`
69
+ - Re-scan to verify finding count decreased
70
+ - Report progress: N fixed in round X
71
+
72
+ 7. **Final report**
73
+ - Total high findings fixed across all rounds
74
+ - Remaining high findings (if any)
75
+ - Suggest `/vaspera-fix-medium` as next step
76
+
77
+ ## Important
78
+
79
+ - Complete each round fully before moving to next
80
+ - Commit after each round for clean rollback if needed
81
+ - If a fix is unclear, ask for guidance rather than guessing
@@ -0,0 +1,56 @@
1
+ ---
2
+ description: Fix MEDIUM severity findings
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Read, Edit, Write, Bash, Grep, Glob
5
+ ---
6
+
7
+ Remediate MEDIUM severity findings in a single pass.
8
+
9
+ ## Steps
10
+
11
+ 1. **Load audit findings**
12
+ - Read latest from `.vaspera/audit/*.json`
13
+ - Filter findings where `severity === "medium"`
14
+
15
+ 2. **Categorize and fix**
16
+ Medium categories:
17
+
18
+ **Code Quality**
19
+ - Missing test files → Add basic test coverage
20
+ - Code duplication → Extract shared utilities
21
+ - Components >300 lines → Split into smaller components
22
+ - Hardcoded strings → Extract to constants/i18n
23
+
24
+ **Type Safety**
25
+ - Missing return types → Add explicit return types
26
+ - Implicit any (not explicit) → Add proper typing
27
+
28
+ **Error Handling**
29
+ - No structured logging → Add logger calls
30
+ - Inconsistent error responses → Standardize format
31
+ - No error boundaries → Add React Error Boundaries
32
+
33
+ **Architecture**
34
+ - Manual schema management → Add migration files
35
+ - Scattered Supabase clients → Centralize client creation
36
+
37
+ 3. **For each finding**
38
+ - Show context and proposed fix
39
+ - Apply fix with user confirmation
40
+ - Run `npm run build` to verify
41
+
42
+ 4. **Verification**
43
+ - After all fixes, re-run audit
44
+ - Confirm medium count decreased
45
+ - Flag any regressions
46
+
47
+ 5. **Final report**
48
+ - N medium findings fixed
49
+ - Remaining medium findings
50
+ - Suggest `/vaspera-add-tests` as next step
51
+
52
+ ## Important
53
+
54
+ - Medium fixes are lower priority but improve maintainability
55
+ - Some fixes may require architectural decisions — ask if unclear
56
+ - Stage changes but do NOT commit unless user requests
@@ -0,0 +1,85 @@
1
+ ---
2
+ description: Generate and apply Supabase Row Level Security policies
3
+ argument-hint: "[project-path: defaults to .]"
4
+ allowed-tools: Read, Write, Bash, Grep, Glob
5
+ ---
6
+
7
+ Generate RLS policies for Supabase tables to prevent unauthorized data access.
8
+
9
+ ## Steps
10
+
11
+ 1. **Discover tables**
12
+ - Scan `supabase/migrations/` for CREATE TABLE statements
13
+ - Scan seed files for table references
14
+ - Scan codebase for `supabase.from('table_name')` calls
15
+ - Build complete table inventory
16
+
17
+ 2. **Detect existing policies**
18
+ - Look for `CREATE POLICY` statements in migrations
19
+ - Look for `ALTER TABLE ... ENABLE ROW LEVEL SECURITY`
20
+ - Identify tables with RLS enabled vs disabled
21
+
22
+ 3. **Analyze access patterns**
23
+ For each `supabase.from()` call:
24
+ - What columns are selected?
25
+ - Is there a `.eq('user_id', ...)` filter?
26
+ - Is it in an authenticated context?
27
+ - Infer ownership column (usually `user_id` or `owner_id`)
28
+
29
+ 4. **Generate migration**
30
+ For tables missing RLS:
31
+ ```sql
32
+ -- Enable RLS
33
+ ALTER TABLE table_name ENABLE ROW LEVEL SECURITY;
34
+
35
+ -- SELECT: users can only read their own rows
36
+ CREATE POLICY "Users can view own rows"
37
+ ON table_name FOR SELECT
38
+ USING (auth.uid() = user_id);
39
+
40
+ -- INSERT: users can only insert with their user_id
41
+ CREATE POLICY "Users can insert own rows"
42
+ ON table_name FOR INSERT
43
+ WITH CHECK (auth.uid() = user_id);
44
+
45
+ -- UPDATE: users can only update their own rows
46
+ CREATE POLICY "Users can update own rows"
47
+ ON table_name FOR UPDATE
48
+ USING (auth.uid() = user_id);
49
+
50
+ -- DELETE: users can only delete their own rows
51
+ CREATE POLICY "Users can delete own rows"
52
+ ON table_name FOR DELETE
53
+ USING (auth.uid() = user_id);
54
+ ```
55
+
56
+ 5. **Write migration file**
57
+ - Create `supabase/migrations/{timestamp}_add_rls_policies.sql`
58
+ - Include all generated policies
59
+
60
+ 6. **Generate RLS-REPORT.md**
61
+ ```markdown
62
+ # RLS Policy Report
63
+
64
+ ## Tables with RLS
65
+ | Table | SELECT | INSERT | UPDATE | DELETE |
66
+ |-------|--------|--------|--------|--------|
67
+ | users | ✅ | ✅ | ✅ | ✅ |
68
+
69
+ ## Tables MISSING RLS (CRITICAL)
70
+ - orders (no policies, added in migration)
71
+
72
+ ## Service Role Usage (review required)
73
+ - src/api/admin.ts:42 — uses service role key
74
+ ```
75
+
76
+ 7. **Optionally apply**
77
+ - If user confirms: `supabase db push`
78
+ - Otherwise: leave migration file for manual review
79
+
80
+ ## Important
81
+
82
+ - RLS is the MOST IMPORTANT security control for multi-tenant Supabase apps
83
+ - Missing RLS = any authenticated user can read ALL data
84
+ - Service role key bypasses RLS — flag all usages for review
85
+ - Always test policies locally before pushing to production