bigpowers 2.34.1 → 2.35.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/.pi/package.json +2 -2
- package/.pi/prompts/deploy.md +53 -28
- package/.pi/prompts/develop-tdd.md +5 -80
- package/.pi/prompts/migrate-spec.md +273 -197
- package/.pi/prompts/publish-package.md +125 -67
- package/.pi/prompts/release-branch.md +85 -69
- package/.pi/prompts/security-review.md +323 -0
- package/.pi/prompts/smoke-test.md +98 -58
- package/.pi/prompts/using-bigpowers.md +2 -2
- package/.pi/prompts/validate-contracts.md +169 -54
- package/.pi/prompts/wire-ci.md +147 -89
- package/.pi/skills/deploy/SKILL.md +53 -28
- package/.pi/skills/develop-tdd/SKILL.md +5 -80
- package/.pi/skills/migrate-spec/SKILL.md +273 -197
- package/.pi/skills/publish-package/SKILL.md +125 -67
- package/.pi/skills/release-branch/SKILL.md +85 -69
- package/.pi/skills/security-review/SKILL.md +324 -0
- package/.pi/skills/smoke-test/SKILL.md +98 -58
- package/.pi/skills/using-bigpowers/SKILL.md +2 -2
- package/.pi/skills/validate-contracts/SKILL.md +169 -54
- package/.pi/skills/wire-ci/SKILL.md +147 -89
- package/CHANGELOG.md +14 -0
- package/README.md +4 -4
- package/SKILL-INDEX.md +2 -2
- package/deploy/REFERENCE.md +82 -0
- package/deploy/SKILL.md +3 -63
- package/develop-tdd/SKILL.md +5 -80
- package/migrate-spec/REFERENCE.md +268 -0
- package/migrate-spec/SKILL.md +5 -199
- package/package.json +2 -2
- package/publish-package/REFERENCE.md +239 -0
- package/publish-package/SKILL.md +8 -192
- package/release-branch/REFERENCE.md +83 -0
- package/release-branch/SKILL.md +2 -69
- package/scripts/generate-reference-tables.sh +1 -0
- package/scripts/sync-skills.sh +4 -1
- package/security-review/REFERENCE-confidence-rubric.md +85 -0
- package/security-review/REFERENCE-false-positives.md +68 -0
- package/security-review/REFERENCE-vuln-categories.md +103 -0
- package/security-review/SKILL.md +63 -0
- package/skills-lock.json +14 -9
- package/smoke-test/REFERENCE.md +162 -0
- package/smoke-test/SKILL.md +5 -130
- package/using-bigpowers/SKILL.md +2 -2
- package/validate-contracts/REFERENCE.md +183 -0
- package/validate-contracts/SKILL.md +6 -77
- package/wire-ci/REFERENCE.md +257 -0
- package/wire-ci/SKILL.md +8 -210
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: > AI-powered security analysis of code changes — traces data flow, detects injection, auth bypass, secrets exposure, and unsafe deserialization across files. Use when reviewing pending changes, before release-branch, during verify-work Phase 5, during build-epic Step 0 threat modeling, or when the user says "security review" or "scan for vulns".
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# Security Review
|
|
7
|
+
|
|
8
|
+
> **HARD GATE** — Requires git context (branch with merge-base or diff). Never
|
|
9
|
+
> writes files outside `specs/security/`. Findings below confidence 8/10 are
|
|
10
|
+
> suppressed. **→ verify:** `git rev-parse HEAD >/dev/null 2>&1 && echo "ok" || echo "BLOCKED"`
|
|
11
|
+
|
|
12
|
+
## 5-phase scan
|
|
13
|
+
|
|
14
|
+
| # | Phase | What |
|
|
15
|
+
|---|-------|------|
|
|
16
|
+
| 1 | **Scope Resolution** | Detect diff via `git diff --merge-base origin/HEAD`; resolve languages/frameworks from dependency files |
|
|
17
|
+
| 2 | **Context Research** | Identify existing security patterns, sanitization, auth model in the codebase |
|
|
18
|
+
| 3 | **Vulnerability Assessment** | Trace user input → sink; check auth boundaries, crypto, deserialization, path ops |
|
|
19
|
+
| 4 | **False-Positive Filtering** | Cross-check each finding against exclusion rules; reject confidence < 8 |
|
|
20
|
+
| 5 | **Report Generation** | Output structured markdown: file:line, severity, category, exploit scenario, fix |
|
|
21
|
+
|
|
22
|
+
## Categories
|
|
23
|
+
|
|
24
|
+
Covered: SQLi, XSS, SSRF, command injection, auth bypass, unsafe deserialization, path traversal, IDOR, crypto flaws, secrets exposure, template injection, NoSQLi
|
|
25
|
+
|
|
26
|
+
## Integration points
|
|
27
|
+
|
|
28
|
+
| Skill | Touchpoint |
|
|
29
|
+
|-------|------------|
|
|
30
|
+
| `build-epic` | Step 0 — threat-model epic scope → `specs/security/epics/<id>/THREAT_MODEL.md` |
|
|
31
|
+
| `plan-work` | `security:` field (none/low/medium/high) on story tasks |
|
|
32
|
+
| `plan-release` | +2 WSJF risk boost for HIGH+ risk epics |
|
|
33
|
+
| `audit-code` | Checklist: "diff scanned — no unaddressed HIGH findings" |
|
|
34
|
+
| `request-review` | Inject threat model categories + false-positive rules into reviewer prompt |
|
|
35
|
+
| `investigate-bug` | Security-impact assessment in RCA (NONE→CRITICAL) |
|
|
36
|
+
| `validate-fix` | Recurrence hardening check for security bugs |
|
|
37
|
+
| `verify-work` | Phase 5 — blocks on HIGH findings ≥ 8 confidence |
|
|
38
|
+
| `release-branch` | Hard gate — blocks merge if unresolved HIGH findings |
|
|
39
|
+
|
|
40
|
+
## Report format
|
|
41
|
+
|
|
42
|
+
Each finding: **`File:Line` — Severity — Category**
|
|
43
|
+
- Description: how the vulnerability manifests
|
|
44
|
+
- Exploit scenario: concrete attack path
|
|
45
|
+
- Recommendation: fix with code example
|
|
46
|
+
|
|
47
|
+
## Reference files
|
|
48
|
+
|
|
49
|
+
- [Vuln categories](REFERENCE-vuln-categories.md) — detection guidance per vuln type
|
|
50
|
+
- [False positives](REFERENCE-false-positives.md) — hard exclusions + precedent
|
|
51
|
+
- [Confidence rubric](REFERENCE-confidence-rubric.md) — scoring methodology (0–10)
|
|
52
|
+
|
|
53
|
+
## Verify
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
test -d specs/security && echo "OK: specs/security/ exists" || mkdir -p specs/security
|
|
57
|
+
grep -q "Merge-base\|merge.base\|git diff" SKILL.md && echo "OK: git context verified"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
# Confidence Scoring Rubric
|
|
63
|
+
|
|
64
|
+
Every finding that survives Phase 4 false-positive filtering receives a confidence
|
|
65
|
+
score from 1 (speculative) to 10 (certain). Only findings ≥ 8 are reported.
|
|
66
|
+
|
|
67
|
+
## Score 9–10: Certain Exploit Path
|
|
68
|
+
|
|
69
|
+
**Criteria:**
|
|
70
|
+
- Concrete, testable exploit with clear reproduction steps
|
|
71
|
+
- No assumptions about uncommon configurations
|
|
72
|
+
- No chain of multiple unlikely conditions
|
|
73
|
+
- Attacker has full control over the input vector
|
|
74
|
+
|
|
75
|
+
**Examples:**
|
|
76
|
+
- User-supplied SQL in a `SELECT` statement with no parameterization
|
|
77
|
+
- `os.system(f"rm {user_path}")` where user controls the path
|
|
78
|
+
- Pickle deserialization of user-supplied data without any wrapping
|
|
79
|
+
|
|
80
|
+
**Severity:** HIGH
|
|
81
|
+
|
|
82
|
+
## Score 8: Clear Vulnerability Pattern
|
|
83
|
+
|
|
84
|
+
**Criteria:**
|
|
85
|
+
- Well-known vulnerability pattern with standard exploitation method
|
|
86
|
+
- Requires specific conditions but conditions are commonly met
|
|
87
|
+
- Exploitability is well-documented in OWASP / CVE databases
|
|
88
|
+
|
|
89
|
+
**Examples:**
|
|
90
|
+
- JWT without signature verification in authentication middleware
|
|
91
|
+
- SSRF where attacker controls the full URL including host
|
|
92
|
+
- Hardcoded AWS secret key in source code
|
|
93
|
+
|
|
94
|
+
**Severity:** HIGH or MEDIUM
|
|
95
|
+
|
|
96
|
+
## Score 7: Suspicious Pattern
|
|
97
|
+
|
|
98
|
+
**Criteria:**
|
|
99
|
+
- Unusual code that may indicate a vulnerability
|
|
100
|
+
- Requires specific conditions that may not be present
|
|
101
|
+
- Alternative secure interpretation is equally likely
|
|
102
|
+
- Defense-in-depth concern rather than direct exploit
|
|
103
|
+
|
|
104
|
+
**Examples:**
|
|
105
|
+
- A function accepting user input that passes through multiple layers before reaching a sink (unclear if sanitized)
|
|
106
|
+
- Custom encryption implementation (likely weak, but may not process sensitive data)
|
|
107
|
+
- Path construction that looks safe but has a subtle bypass
|
|
108
|
+
|
|
109
|
+
**Severity:** LOW or suppress
|
|
110
|
+
|
|
111
|
+
## Score < 7: Do Not Report
|
|
112
|
+
|
|
113
|
+
**Criteria:**
|
|
114
|
+
- Theoretical concern without exploit path
|
|
115
|
+
- Requires unrealistic attacker capabilities
|
|
116
|
+
- Violates one or more hard exclusion rules
|
|
117
|
+
- Better handled by separate tooling (dependency scanner, SAST, secret scanner)
|
|
118
|
+
- Purely stylistic or best-practice concern without security impact
|
|
119
|
+
|
|
120
|
+
**Examples:**
|
|
121
|
+
- "This function doesn't validate all inputs" without proving the validated input is the attack surface
|
|
122
|
+
- "This uses MD5" where the hash is not used for security (e.g., cache key)
|
|
123
|
+
- "This function could consume too much memory" (DOS exclusion)
|
|
124
|
+
|
|
125
|
+
**Action:** Suppress entirely. Do not include in report.
|
|
126
|
+
|
|
127
|
+
## Severity Mapping
|
|
128
|
+
|
|
129
|
+
Once confidence ≥ 8 is confirmed, map to severity:
|
|
130
|
+
|
|
131
|
+
| Severity | Impact | Examples |
|
|
132
|
+
|----------|--------|---------|
|
|
133
|
+
| **CRITICAL** | Remote compromise, full data breach | RCE, auth bypass with admin escalation, SQLi with data exfiltration |
|
|
134
|
+
| **HIGH** | Significant security boundary crossed | SSRF to internal services, hardcoded cloud credentials, insecure deserialization |
|
|
135
|
+
| **MEDIUM** | Limited impact or requires conditions | Stored XSS behind auth, IDOR on non-sensitive data, weak but not broken crypto |
|
|
136
|
+
| **LOW** | Defense-in-depth, minimal blast radius | Missing security header, verbose error messages in non-production |
|
|
137
|
+
|
|
138
|
+
## Quality Gate
|
|
139
|
+
|
|
140
|
+
The confidence rubric double-checks each finding against three lenses:
|
|
141
|
+
|
|
142
|
+
| Lens | Question |
|
|
143
|
+
|------|----------|
|
|
144
|
+
| **Exploitability** | Can a real attacker trigger this from a trust boundary? |
|
|
145
|
+
| **Actionability** | Would a security engineer accept a fix recommendation for this? |
|
|
146
|
+
| **Precedent** | Has this type of finding passed/failed human review before? |
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
# False-Positive Exclusion Rules
|
|
151
|
+
|
|
152
|
+
Applied during Phase 4 of the scan. Findings matching any hard exclusion are
|
|
153
|
+
automatically suppressed. Precedents from prior reviews guide borderline cases.
|
|
154
|
+
|
|
155
|
+
## Hard Exclusions
|
|
156
|
+
|
|
157
|
+
Automatically exclude findings matching these patterns:
|
|
158
|
+
|
|
159
|
+
| # | Rule | Rationale |
|
|
160
|
+
|---|------|-----------|
|
|
161
|
+
| 1 | **Denial of Service (DOS)** — resource exhaustion, CPU/memory attacks | Handled separately; not actionable in code review |
|
|
162
|
+
| 2 | **Secrets on disk** if otherwise secured | Secrets management is a separate concern |
|
|
163
|
+
| 3 | **Rate limiting** concerns | Operational, not a code vulnerability |
|
|
164
|
+
| 4 | **Memory consumption / CPU exhaustion** | Not actionable in diff review |
|
|
165
|
+
| 5 | **Input validation on non-security-critical fields** without proven exploit path | Theoretical, not concrete |
|
|
166
|
+
| 6 | **GitHub Actions input sanitization** unless clearly triggerable via untrusted input | Most workflow vulns are not exploitable |
|
|
167
|
+
| 7 | **Lack of hardening measures** | Code is not expected to implement all best practices |
|
|
168
|
+
| 8 | **Race conditions / timing attacks** that are theoretical | Only report if concretely problematic |
|
|
169
|
+
| 9 | **Outdated third-party libraries** | Managed separately by dependency scanners |
|
|
170
|
+
| 10 | **Memory safety** in Rust or other memory-safe languages | Impossible by language guarantees |
|
|
171
|
+
| 11 | **Unit test files only** | Not production risk |
|
|
172
|
+
| 12 | **Log spoofing** | Outputting unsanitized input to logs is not a vuln |
|
|
173
|
+
| 13 | **SSRF that only controls path** | Only host/protocol control is exploitable |
|
|
174
|
+
| 14 | **User-controlled content in AI system prompts** | Not a security vulnerability |
|
|
175
|
+
| 15 | **Regex injection** | Injecting untrusted content into regex is not a vuln |
|
|
176
|
+
| 16 | **Regex DOS** | Excluded alongside general DOS |
|
|
177
|
+
| 17 | **Documentation files** (.md, .txt) | Insecure docs are not code vulnerabilities |
|
|
178
|
+
| 18 | **Lack of audit logs** | Not a vulnerability |
|
|
179
|
+
|
|
180
|
+
## Precedent Rules
|
|
181
|
+
|
|
182
|
+
These guide borderline cases based on prior human review decisions:
|
|
183
|
+
|
|
184
|
+
| # | Precedent | Reasoning |
|
|
185
|
+
|---|-----------|-----------|
|
|
186
|
+
| 1 | **Logging high-value secrets in plaintext IS a vuln.** Logging URLs is safe. | Secrets in logs = credential exposure; URLs are not secrets |
|
|
187
|
+
| 2 | **UUIDs are unguessable** — no validation needed | Cryptographic property of UUID v4/v7 |
|
|
188
|
+
| 3 | **Environment variables and CLI flags are trusted values** | Attackers cannot modify these in secure environments |
|
|
189
|
+
| 4 | **Resource management issues** (memory leaks, fd leaks) are NOT valid | Operational, not security |
|
|
190
|
+
| 5 | **Tabnabbing, XS-Leaks, prototype pollution, open redirects** — do NOT report unless extremely high confidence | Subtle, low-impact, high false-positive rate |
|
|
191
|
+
| 6 | **React/Angular XSS** — safe unless `dangerouslySetInnerHTML`, `bypassSecurityTrustHtml`, etc. | Framework auto-escapes |
|
|
192
|
+
| 7 | **GitHub Action workflow vulns** — verify concrete attack path before reporting | Most are theoretical |
|
|
193
|
+
| 8 | **Client-side JS/TS auth checks** — not a vuln; server is authoritative | Client code is untrusted |
|
|
194
|
+
| 9 | **IPython notebook vulns** — only report if concrete untrusted-input trigger | Most are not exploitable |
|
|
195
|
+
| 10 | **Logging non-PII data** — not a vuln even if sensitive. Only PII/secrets/passwords. | Intent: operational logging vs credential exposure |
|
|
196
|
+
| 11 | **Shell script command injection** — only report if concrete untrusted-input path | Most shell scripts don't process untrusted input |
|
|
197
|
+
|
|
198
|
+
## Confidence Scoring
|
|
199
|
+
|
|
200
|
+
Findings that survive exclusions get a confidence score (1–10):
|
|
201
|
+
|
|
202
|
+
| Range | Meaning | Action |
|
|
203
|
+
|-------|---------|--------|
|
|
204
|
+
| 9–10 | Certain exploit path, testable | Report as HIGH |
|
|
205
|
+
| 8 | Clear vulnerability pattern | Report as HIGH/MEDIUM |
|
|
206
|
+
| 7 | Suspicious, needs conditions | Report as LOW or suppress |
|
|
207
|
+
| <7 | Too speculative | **Do not report** |
|
|
208
|
+
|
|
209
|
+
**Hard threshold:** Only report findings with confidence ≥ 8.
|
|
210
|
+
|
|
211
|
+
## Signal Quality Criteria
|
|
212
|
+
|
|
213
|
+
For remaining findings, assess:
|
|
214
|
+
1. Is there a concrete, exploitable vulnerability with a clear attack path?
|
|
215
|
+
2. Does this represent a real security risk (vs theoretical best practice)?
|
|
216
|
+
3. Are there specific code locations and reproduction steps?
|
|
217
|
+
4. Would this finding be actionable for a security team?
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
# Vulnerability Categories — Detection Guidance
|
|
222
|
+
|
|
223
|
+
Each category: vulnerable pattern → safe pattern → code example.
|
|
224
|
+
|
|
225
|
+
## SQL Injection
|
|
226
|
+
|
|
227
|
+
| Aspect | Detail |
|
|
228
|
+
|--------|--------|
|
|
229
|
+
| **Vulnerable** | String interpolation in SQL queries: `f"SELECT * FROM users WHERE id = {uid}"` |
|
|
230
|
+
| **Safe** | Parameterized queries / ORM: `cursor.execute("SELECT * FROM users WHERE id = %s", (uid,))` |
|
|
231
|
+
| **Look for** | f-strings, `+` concatenation, `format()` in query builders; raw SQL in ORM `.raw()` / `.execute()` |
|
|
232
|
+
| **False-positive guard** | Not a FP if the input is user-controlled (HTTP param, file, env var, CLI arg). Env vars are trusted (see exclusion rules). |
|
|
233
|
+
|
|
234
|
+
## Cross-Site Scripting (XSS)
|
|
235
|
+
|
|
236
|
+
| Aspect | Detail |
|
|
237
|
+
|--------|--------|
|
|
238
|
+
| **Vulnerable** | `element.innerHTML = userInput`, `dangerouslySetInnerHTML={{__html: userInput}}` |
|
|
239
|
+
| **Safe** | `element.textContent = userInput`, React JSX (auto-escaped), template engines with auto-escaping |
|
|
240
|
+
| **Look for** | `.innerHTML`, `document.write()`, `dangerouslySetInnerHTML`, `v-html` (Vue), `bypassSecurityTrustHtml` (Angular) |
|
|
241
|
+
| **False-positive guard** | React/Angular components without unsafe methods are NOT vulnerable (see exclusion rules). |
|
|
242
|
+
|
|
243
|
+
## Server-Side Request Forgery (SSRF)
|
|
244
|
+
|
|
245
|
+
| Aspect | Detail |
|
|
246
|
+
|--------|--------|
|
|
247
|
+
| **Vulnerable** | User-controlled URL passed to server-side HTTP client: `requests.get(user_url)` |
|
|
248
|
+
| **Safe** | URL allowlist validation, internal-network blocking, protocol/host restriction |
|
|
249
|
+
| **Look for** | User input → `fetch`, `requests.get`, `axios.get`, `urllib`, `curl`, `http.get`; host control only (path-only is excluded) |
|
|
250
|
+
|
|
251
|
+
## Command Injection
|
|
252
|
+
|
|
253
|
+
| Aspect | Detail |
|
|
254
|
+
|--------|--------|
|
|
255
|
+
| **Vulnerable** | User input in shell commands: `os.system(f"ping {host}")`, `subprocess.run(f"grep {pattern} file", shell=True)` |
|
|
256
|
+
| **Safe** | `subprocess.run(["ping", host])` with arguments as list; `shlex.quote()` |
|
|
257
|
+
| **Look for** | `shell=True`, `os.system`, `os.popen`, `exec()`, `eval()`, `$()`, backticks |
|
|
258
|
+
| **False-positive guard** | Shell scripts without untrusted user input are generally not exploitable. |
|
|
259
|
+
|
|
260
|
+
## Authentication/Authorization Bypass
|
|
261
|
+
|
|
262
|
+
| Aspect | Detail |
|
|
263
|
+
|--------|--------|
|
|
264
|
+
| **Vulnerable** | Missing auth check on protected endpoint; JWT without signature verification; hardcoded admin tokens |
|
|
265
|
+
| **Safe** | Consistent auth middleware; JWT with `RS256`/`HS256` verification; role-based access control |
|
|
266
|
+
| **Look for** | Routes without auth decorators; `@login_required` / `@require_auth` missing; JWT without `.verify()`; client-side auth checks only |
|
|
267
|
+
|
|
268
|
+
## Unsafe Deserialization
|
|
269
|
+
|
|
270
|
+
| Aspect | Detail |
|
|
271
|
+
|--------|--------|
|
|
272
|
+
| **Vulnerable** | `pickle.load(user_data)`, `yaml.load(user_input)`, `JSON.parse()` on untrusted tokens, `eval(input())` |
|
|
273
|
+
| **Safe** | `yaml.safe_load()`, `json.loads()` (safe for JSON), `pickle.load(weights_only=True)` (PyTorch), schema validation |
|
|
274
|
+
| **Look for** | `pickle.load`, `yaml.load` (not safe_load), `torch.load(weights_only=False)`, `eval`, `marshal.load`, `node-serialize` |
|
|
275
|
+
|
|
276
|
+
## Path Traversal
|
|
277
|
+
|
|
278
|
+
| Aspect | Detail |
|
|
279
|
+
|--------|--------|
|
|
280
|
+
| **Vulnerable** | User input in file paths: `open(f"/data/{filename}")`, `path.join(base, user_path)` |
|
|
281
|
+
| **Safe** | Path normalization + prefix check: `os.path.realpath(path).startswith(BASE_DIR)`; allowlist of valid filenames |
|
|
282
|
+
| **Look for** | `open()`, `read_file()`, `os.path.join` with user input; `../` traversal without normalization |
|
|
283
|
+
|
|
284
|
+
## Insecure Direct Object Reference (IDOR)
|
|
285
|
+
|
|
286
|
+
| Aspect | Detail |
|
|
287
|
+
|--------|--------|
|
|
288
|
+
| **Vulnerable** | API endpoint uses user-supplied ID without ownership check: `GET /api/order/{order_id}` — returns any user's order |
|
|
289
|
+
| **Safe** | Ownership verification: verify `order.user_id == current_user.id` before returning data |
|
|
290
|
+
| **Look for** | CRUD endpoints that accept IDs without authorization; horizontal/vertical privilege checks missing |
|
|
291
|
+
|
|
292
|
+
## Weak Cryptography
|
|
293
|
+
|
|
294
|
+
| Aspect | Detail |
|
|
295
|
+
|--------|--------|
|
|
296
|
+
| **Vulnerable** | MD5/SHA1 for passwords; ECB mode; hardcoded keys; `random` module (not `secrets`); short key lengths |
|
|
297
|
+
| **Safe** | `bcrypt`/`argon2` for passwords; AES-GCM; `secrets` module; RSA 2048+; proper IV generation |
|
|
298
|
+
| **Look for** | `md5`, `sha1`, `DES`, `ECB`, `PKCS1_v1_5`, `random` for crypto, hardcoded `key=`, `Crypto.Cipher` without AEAD |
|
|
299
|
+
|
|
300
|
+
## Secrets Exposure
|
|
301
|
+
|
|
302
|
+
| Aspect | Detail |
|
|
303
|
+
|--------|--------|
|
|
304
|
+
| **Vulnerable** | Hardcoded API keys, passwords, tokens in source code; secrets in logs; secrets in client-side code |
|
|
305
|
+
| **Safe** | Environment variables; secret manager (AWS Secrets Manager, HashiCorp Vault); `.env` excluded from VCS |
|
|
306
|
+
| **Look for** | `API_KEY=`, `password=`, `secret=`, `token=` in code; AWS keys, GitHub tokens, Stripe keys, JWTs in source |
|
|
307
|
+
| **False-positive guard** | Secrets stored on disk but otherwise secured ARE excluded. Logging high-value secrets IS a vuln. Logging URLs is safe. |
|
|
308
|
+
|
|
309
|
+
## Template Injection (SSTI)
|
|
310
|
+
|
|
311
|
+
| Aspect | Detail |
|
|
312
|
+
|--------|--------|
|
|
313
|
+
| **Vulnerable** | User input in template rendering: `Template(user_input).render()`, `render_template_string(user_input)` |
|
|
314
|
+
| **Safe** | Static templates; input passed as context variable, not template string |
|
|
315
|
+
| **Look for** | `render_template_string`, `Template()()` with user string; `eval` in template context; `${user_input}` in JS template literals on server |
|
|
316
|
+
|
|
317
|
+
## NoSQL Injection
|
|
318
|
+
|
|
319
|
+
| Aspect | Detail |
|
|
320
|
+
|--------|--------|
|
|
321
|
+
| **Vulnerable** | User input in MongoDB queries: `db.users.find({username: user_input})` where input is `{"$gt": ""}` |
|
|
322
|
+
| **Safe** | Schema validation; type checking on query params; ORM sanitization |
|
|
323
|
+
| **Look for** | MongoDB `$where`, `$gt`, `$regex` from user input; raw mongo queries without type coercion |
|
|
@@ -20,6 +20,94 @@ Can be run standalone for quick health checks or chained as the final step of th
|
|
|
20
20
|
|
|
21
21
|
Smoke checks are defined in `smoke-checks.yaml` at the project root:
|
|
22
22
|
|
|
23
|
+
See [REFERENCE.md](REFERENCE.md)
|
|
24
|
+
|
|
25
|
+
Checks can also be specified inline via environment variables or CLI arguments for ad-hoc use.
|
|
26
|
+
|
|
27
|
+
### Check Schema
|
|
28
|
+
|
|
29
|
+
| Field | Required | Default | Description |
|
|
30
|
+
|-------|----------|---------|-------------|
|
|
31
|
+
| `name` | Yes | — | Human-readable check name (used in report) |
|
|
32
|
+
| `path` | Yes | `/` | URL path relative to base_url |
|
|
33
|
+
| `method` | No | `GET` | HTTP method |
|
|
34
|
+
| `expected_status` | No | `200` | Expected HTTP status code |
|
|
35
|
+
| `content_signal` | No | — | Regex or string to find in response body |
|
|
36
|
+
| `max_response_time_ms` | No | — | Fail if response slower than this threshold (ms) |
|
|
37
|
+
|
|
38
|
+
## Process
|
|
39
|
+
|
|
40
|
+
### 1. Load smoke checks
|
|
41
|
+
|
|
42
|
+
See [REFERENCE.md](REFERENCE.md)
|
|
43
|
+
|
|
44
|
+
### 2. Run each check
|
|
45
|
+
|
|
46
|
+
For each check in the configuration, perform an HTTP request:
|
|
47
|
+
|
|
48
|
+
See [REFERENCE.md](REFERENCE.md)
|
|
49
|
+
|
|
50
|
+
### 3. Assert results
|
|
51
|
+
|
|
52
|
+
See [REFERENCE.md](REFERENCE.md)
|
|
53
|
+
|
|
54
|
+
### 4. Generate report
|
|
55
|
+
|
|
56
|
+
See [REFERENCE.md](REFERENCE.md)
|
|
57
|
+
|
|
58
|
+
## Integration with deploy skill
|
|
59
|
+
|
|
60
|
+
The `deploy` skill references `smoke-test` as its final verification step:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# In deploy workflow — after successful deploy
|
|
64
|
+
DEPLOY_URL="$DEPLOY_URL" bash scripts/run-smoke.sh
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
# Smoke Test — Reference
|
|
70
|
+
|
|
71
|
+
## Runner script
|
|
72
|
+
|
|
73
|
+
A ready-to-use runner is provided for standalone operation:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
bash scripts/run-smoke.sh [url] [smoke-checks-file]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The runner:
|
|
80
|
+
1. Uses `$DEPLOY_URL`, `$SMOKE_CHECKS_FILE`, or CLI arguments
|
|
81
|
+
2. Runs all defined checks
|
|
82
|
+
3. Prints a pass/fail summary
|
|
83
|
+
4. Exits 0 on all pass, non-zero on any failure
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Configuration reference
|
|
89
|
+
|
|
90
|
+
| Variable | Default | Description |
|
|
91
|
+
|----------|---------|-------------|
|
|
92
|
+
| `SMOKE_CHECKS_FILE` | `smoke-checks.yaml` | Path to smoke checks YAML |
|
|
93
|
+
| `DEPLOY_URL` / `BASE_URL` | *(required)* | Base URL for all checks |
|
|
94
|
+
| `SMOKE_TIMEOUT` | `30` | Per-check timeout (seconds) |
|
|
95
|
+
| `SMOKE_RETRIES` | `0` | Number of retries on failure |
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Verification
|
|
101
|
+
|
|
102
|
+
→ verify: `test -f smoke-test/SKILL.md && grep -q 'name: smoke-test' smoke-test/SKILL.md && echo OK`
|
|
103
|
+
→ verify: `grep -qi 'smoke.checks.yaml\|checklist\|expected_status\|content_signal' smoke-test/SKILL.md && echo OK`
|
|
104
|
+
→ verify: `grep -ci 'pass\|fail\|summary\|report' smoke-test/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`
|
|
105
|
+
→ verify: `grep -q 'smoke-test' SKILL-INDEX.md && echo OK`
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Reference block 1
|
|
110
|
+
|
|
23
111
|
```yaml
|
|
24
112
|
# smoke-checks.yaml — auto-loaded if present at project root
|
|
25
113
|
base_url: "https://example.com"
|
|
@@ -50,22 +138,9 @@ checks:
|
|
|
50
138
|
content_signal: "not found|404"
|
|
51
139
|
```
|
|
52
140
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
### Check Schema
|
|
56
|
-
|
|
57
|
-
| Field | Required | Default | Description |
|
|
58
|
-
|-------|----------|---------|-------------|
|
|
59
|
-
| `name` | Yes | — | Human-readable check name (used in report) |
|
|
60
|
-
| `path` | Yes | `/` | URL path relative to base_url |
|
|
61
|
-
| `method` | No | `GET` | HTTP method |
|
|
62
|
-
| `expected_status` | No | `200` | Expected HTTP status code |
|
|
63
|
-
| `content_signal` | No | — | Regex or string to find in response body |
|
|
64
|
-
| `max_response_time_ms` | No | — | Fail if response slower than this threshold (ms) |
|
|
65
|
-
|
|
66
|
-
## Process
|
|
141
|
+
---
|
|
67
142
|
|
|
68
|
-
|
|
143
|
+
## Reference block 2
|
|
69
144
|
|
|
70
145
|
```bash
|
|
71
146
|
SMOKE_CHECKS_FILE="${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"
|
|
@@ -81,9 +156,9 @@ else
|
|
|
81
156
|
fi
|
|
82
157
|
```
|
|
83
158
|
|
|
84
|
-
|
|
159
|
+
---
|
|
85
160
|
|
|
86
|
-
|
|
161
|
+
## Reference block 3
|
|
87
162
|
|
|
88
163
|
```bash
|
|
89
164
|
url="${BASE_URL}${path}"
|
|
@@ -96,7 +171,9 @@ status=$response
|
|
|
96
171
|
body=$(cat /tmp/smoke_body.txt)
|
|
97
172
|
```
|
|
98
173
|
|
|
99
|
-
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Reference block 4
|
|
100
177
|
|
|
101
178
|
```bash
|
|
102
179
|
checks_passed=0
|
|
@@ -131,7 +208,9 @@ if [ -n "$max_response_time_ms" ] && [ "$response_time" -gt "$max_response_time_
|
|
|
131
208
|
fi
|
|
132
209
|
```
|
|
133
210
|
|
|
134
|
-
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Reference block 5
|
|
135
214
|
|
|
136
215
|
```bash
|
|
137
216
|
total=$((checks_passed + checks_failed))
|
|
@@ -149,42 +228,3 @@ else
|
|
|
149
228
|
exit 0
|
|
150
229
|
fi
|
|
151
230
|
```
|
|
152
|
-
|
|
153
|
-
## Runner script
|
|
154
|
-
|
|
155
|
-
A ready-to-use runner is provided for standalone operation:
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
bash scripts/run-smoke.sh [url] [smoke-checks-file]
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
The runner:
|
|
162
|
-
1. Uses `$DEPLOY_URL`, `$SMOKE_CHECKS_FILE`, or CLI arguments
|
|
163
|
-
2. Runs all defined checks
|
|
164
|
-
3. Prints a pass/fail summary
|
|
165
|
-
4. Exits 0 on all pass, non-zero on any failure
|
|
166
|
-
|
|
167
|
-
## Integration with deploy skill
|
|
168
|
-
|
|
169
|
-
The `deploy` skill references `smoke-test` as its final verification step:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
# In deploy workflow — after successful deploy
|
|
173
|
-
DEPLOY_URL="$DEPLOY_URL" bash scripts/run-smoke.sh
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## Configuration reference
|
|
177
|
-
|
|
178
|
-
| Variable | Default | Description |
|
|
179
|
-
|----------|---------|-------------|
|
|
180
|
-
| `SMOKE_CHECKS_FILE` | `smoke-checks.yaml` | Path to smoke checks YAML |
|
|
181
|
-
| `DEPLOY_URL` / `BASE_URL` | *(required)* | Base URL for all checks |
|
|
182
|
-
| `SMOKE_TIMEOUT` | `30` | Per-check timeout (seconds) |
|
|
183
|
-
| `SMOKE_RETRIES` | `0` | Number of retries on failure |
|
|
184
|
-
|
|
185
|
-
## Verification
|
|
186
|
-
|
|
187
|
-
→ verify: `test -f smoke-test/SKILL.md && grep -q 'name: smoke-test' smoke-test/SKILL.md && echo OK`
|
|
188
|
-
→ verify: `grep -qi 'smoke.checks.yaml\|checklist\|expected_status\|content_signal' smoke-test/SKILL.md && echo OK`
|
|
189
|
-
→ verify: `grep -ci 'pass\|fail\|summary\|report' smoke-test/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`
|
|
190
|
-
→ verify: `grep -q 'smoke-test' SKILL-INDEX.md && echo OK`
|
|
@@ -7,7 +7,7 @@ description: One-time bootstrap that introduces the bigpowers skills system, the
|
|
|
7
7
|
> **HARD GATE** — **HARD GATE** — This skill is the entry point. Do NOT skip it when onboarding new users or starting a new session. It establishes the bigpowers methodology, lifecycle phases, and conventions.
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
Welcome to **bigpowers** — a lifecycle of **
|
|
10
|
+
Welcome to **bigpowers** — a lifecycle of **70** agent skills for production-ready, TDD-driven software by solo developers.
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
@@ -98,7 +98,7 @@ Start the HTTP dashboard with `visual-dashboard` → `GET /api/status?projectDir
|
|
|
98
98
|
- **Integrate:** team default is `gh pr` (team-pr); solo profile uses `land-branch.sh`. Never create GitHub issues from skills — use local Markdown files instead.
|
|
99
99
|
- **One skill, one thing.** If you're unsure which skill to call, call `survey-context` — it reads your current state and recommends the next step.
|
|
100
100
|
- **verify: every step.** Every epic task must have `verify: <runnable command>`. Evidence over claims.
|
|
101
|
-
- **
|
|
101
|
+
- **70 skills.** See `SKILL-INDEX.md`; find skills with `search-skills`.
|
|
102
102
|
|
|
103
103
|
## After this
|
|
104
104
|
|