@istmx/skills 2.0.0 → 2.1.1

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 (230) hide show
  1. package/README.md +141 -51
  2. package/RELEASE_v2.1.0.md +68 -0
  3. package/bin/cli.js +64 -86
  4. package/context/conversation_transcript.md +786 -0
  5. package/context/progress.md +129 -0
  6. package/istm/SKILL.md +20 -11
  7. package/istm-animate/SKILL.md +19 -11
  8. package/istm-architecture/SKILL.md +70 -14
  9. package/istm-architecture/templates/agents.md +21 -2
  10. package/istm-awwward-designer/SKILL.md +31 -7
  11. package/istm-design/SKILL.md +26 -12
  12. package/istm-design/anti-laziness/architectural-patterns.md +55 -0
  13. package/istm-design/anti-laziness/parameter-tuning.md +44 -0
  14. package/istm-design/anti-laziness/prompt-engineering.md +52 -0
  15. package/istm-design/anti-laziness/reference-prompts.md +79 -0
  16. package/istm-design/archetypes/brandkit/SKILL.md +798 -0
  17. package/istm-design/archetypes/brutalist/SKILL.md +92 -0
  18. package/istm-design/archetypes/minimalist/SKILL.md +85 -0
  19. package/istm-design/archetypes/soft/SKILL.md +98 -0
  20. package/istm-design/core/ui-ux-pro-max/data/stacks/wpf.csv +1 -1
  21. package/istm-design/core/ui-ux-pro-max/scripts/design_system.py +1 -1
  22. package/istm-design/image-to-code/SKILL.md +1228 -0
  23. package/istm-design/imagegen/SKILL.md +987 -0
  24. package/istm-design/presets/airbnb/DESIGN.md +545 -0
  25. package/istm-design/presets/airbnb/README.md +5 -0
  26. package/istm-design/presets/airtable/DESIGN.md +554 -0
  27. package/istm-design/presets/airtable/README.md +5 -0
  28. package/istm-design/presets/apple/DESIGN.md +562 -0
  29. package/istm-design/presets/apple/README.md +5 -0
  30. package/istm-design/presets/binance/DESIGN.md +634 -0
  31. package/istm-design/presets/binance/README.md +5 -0
  32. package/istm-design/presets/bmw/DESIGN.md +544 -0
  33. package/istm-design/presets/bmw/README.md +5 -0
  34. package/istm-design/presets/bmw-m/DESIGN.md +503 -0
  35. package/istm-design/presets/bmw-m/README.md +5 -0
  36. package/istm-design/presets/bugatti/DESIGN.md +454 -0
  37. package/istm-design/presets/bugatti/README.md +5 -0
  38. package/istm-design/presets/cal/DESIGN.md +542 -0
  39. package/istm-design/presets/cal/README.md +5 -0
  40. package/istm-design/presets/catalog.md +127 -0
  41. package/istm-design/presets/claude/DESIGN.md +589 -0
  42. package/istm-design/presets/claude/README.md +5 -0
  43. package/istm-design/presets/clay/DESIGN.md +541 -0
  44. package/istm-design/presets/clay/README.md +5 -0
  45. package/istm-design/presets/clickhouse/DESIGN.md +544 -0
  46. package/istm-design/presets/clickhouse/README.md +5 -0
  47. package/istm-design/presets/cohere/DESIGN.md +451 -0
  48. package/istm-design/presets/cohere/README.md +5 -0
  49. package/istm-design/presets/coinbase/DESIGN.md +570 -0
  50. package/istm-design/presets/coinbase/README.md +5 -0
  51. package/istm-design/presets/composio/DESIGN.md +506 -0
  52. package/istm-design/presets/composio/README.md +5 -0
  53. package/istm-design/presets/cursor/DESIGN.md +537 -0
  54. package/istm-design/presets/cursor/README.md +5 -0
  55. package/istm-design/presets/dell-1996/DESIGN.md +632 -0
  56. package/istm-design/presets/dell-1996/README.md +5 -0
  57. package/istm-design/presets/elevenlabs/DESIGN.md +504 -0
  58. package/istm-design/presets/elevenlabs/README.md +5 -0
  59. package/istm-design/presets/expo/DESIGN.md +526 -0
  60. package/istm-design/presets/expo/README.md +5 -0
  61. package/istm-design/presets/ferrari/DESIGN.md +531 -0
  62. package/istm-design/presets/ferrari/README.md +5 -0
  63. package/istm-design/presets/figma/DESIGN.md +578 -0
  64. package/istm-design/presets/figma/README.md +5 -0
  65. package/istm-design/presets/framer/DESIGN.md +544 -0
  66. package/istm-design/presets/framer/README.md +5 -0
  67. package/istm-design/presets/hashicorp/DESIGN.md +575 -0
  68. package/istm-design/presets/hashicorp/README.md +5 -0
  69. package/istm-design/presets/hp/DESIGN.md +670 -0
  70. package/istm-design/presets/hp/README.md +5 -0
  71. package/istm-design/presets/ibm/DESIGN.md +550 -0
  72. package/istm-design/presets/ibm/README.md +5 -0
  73. package/istm-design/presets/intercom/DESIGN.md +546 -0
  74. package/istm-design/presets/intercom/README.md +5 -0
  75. package/istm-design/presets/kraken/DESIGN.md +125 -0
  76. package/istm-design/presets/kraken/README.md +5 -0
  77. package/istm-design/presets/lamborghini/DESIGN.md +288 -0
  78. package/istm-design/presets/lamborghini/README.md +5 -0
  79. package/istm-design/presets/linear/DESIGN.md +548 -0
  80. package/istm-design/presets/linear/README.md +5 -0
  81. package/istm-design/presets/lovable/DESIGN.md +298 -0
  82. package/istm-design/presets/lovable/README.md +5 -0
  83. package/istm-design/presets/mastercard/DESIGN.md +365 -0
  84. package/istm-design/presets/mastercard/README.md +5 -0
  85. package/istm-design/presets/meta/DESIGN.md +683 -0
  86. package/istm-design/presets/meta/README.md +5 -0
  87. package/istm-design/presets/minimax/DESIGN.md +746 -0
  88. package/istm-design/presets/minimax/README.md +5 -0
  89. package/istm-design/presets/mintlify/DESIGN.md +852 -0
  90. package/istm-design/presets/mintlify/README.md +5 -0
  91. package/istm-design/presets/miro/DESIGN.md +825 -0
  92. package/istm-design/presets/miro/README.md +5 -0
  93. package/istm-design/presets/mistral/DESIGN.md +773 -0
  94. package/istm-design/presets/mistral/README.md +5 -0
  95. package/istm-design/presets/mongodb/DESIGN.md +767 -0
  96. package/istm-design/presets/mongodb/README.md +5 -0
  97. package/istm-design/presets/nike/DESIGN.md +575 -0
  98. package/istm-design/presets/nike/README.md +5 -0
  99. package/istm-design/presets/nintendo-2001/DESIGN.md +649 -0
  100. package/istm-design/presets/nintendo-2001/README.md +5 -0
  101. package/istm-design/presets/notion/DESIGN.md +821 -0
  102. package/istm-design/presets/notion/README.md +5 -0
  103. package/istm-design/presets/nvidia/DESIGN.md +640 -0
  104. package/istm-design/presets/nvidia/README.md +5 -0
  105. package/istm-design/presets/ollama/DESIGN.md +539 -0
  106. package/istm-design/presets/ollama/README.md +5 -0
  107. package/istm-design/presets/opencode/DESIGN.md +521 -0
  108. package/istm-design/presets/opencode/README.md +5 -0
  109. package/istm-design/presets/pinterest/DESIGN.md +597 -0
  110. package/istm-design/presets/pinterest/README.md +5 -0
  111. package/istm-design/presets/playstation/DESIGN.md +661 -0
  112. package/istm-design/presets/playstation/README.md +5 -0
  113. package/istm-design/presets/posthog/DESIGN.md +690 -0
  114. package/istm-design/presets/posthog/README.md +5 -0
  115. package/istm-design/presets/raycast/DESIGN.md +669 -0
  116. package/istm-design/presets/raycast/README.md +5 -0
  117. package/istm-design/presets/renault/DESIGN.md +589 -0
  118. package/istm-design/presets/renault/README.md +5 -0
  119. package/istm-design/presets/replicate/DESIGN.md +616 -0
  120. package/istm-design/presets/replicate/README.md +5 -0
  121. package/istm-design/presets/resend/DESIGN.md +585 -0
  122. package/istm-design/presets/resend/README.md +5 -0
  123. package/istm-design/presets/revolut/DESIGN.md +636 -0
  124. package/istm-design/presets/revolut/README.md +5 -0
  125. package/istm-design/presets/runwayml/DESIGN.md +244 -0
  126. package/istm-design/presets/runwayml/README.md +5 -0
  127. package/istm-design/presets/sanity/DESIGN.md +357 -0
  128. package/istm-design/presets/sanity/README.md +5 -0
  129. package/istm-design/presets/sentry/DESIGN.md +551 -0
  130. package/istm-design/presets/sentry/README.md +5 -0
  131. package/istm-design/presets/shopify/DESIGN.md +516 -0
  132. package/istm-design/presets/shopify/README.md +5 -0
  133. package/istm-design/presets/slack/DESIGN.md +482 -0
  134. package/istm-design/presets/spacex/DESIGN.md +363 -0
  135. package/istm-design/presets/spacex/README.md +5 -0
  136. package/istm-design/presets/spotify/DESIGN.md +246 -0
  137. package/istm-design/presets/spotify/README.md +5 -0
  138. package/istm-design/presets/starbucks/DESIGN.md +580 -0
  139. package/istm-design/presets/starbucks/README.md +5 -0
  140. package/istm-design/presets/stripe/DESIGN.md +487 -0
  141. package/istm-design/presets/stripe/README.md +5 -0
  142. package/istm-design/presets/supabase/DESIGN.md +462 -0
  143. package/istm-design/presets/supabase/README.md +5 -0
  144. package/istm-design/presets/superhuman/DESIGN.md +448 -0
  145. package/istm-design/presets/superhuman/README.md +5 -0
  146. package/istm-design/presets/tesla/DESIGN.md +286 -0
  147. package/istm-design/presets/tesla/README.md +5 -0
  148. package/istm-design/presets/theverge/DESIGN.md +339 -0
  149. package/istm-design/presets/theverge/README.md +5 -0
  150. package/istm-design/presets/together/DESIGN.md +633 -0
  151. package/istm-design/presets/together/README.md +5 -0
  152. package/istm-design/presets/uber/DESIGN.md +636 -0
  153. package/istm-design/presets/uber/README.md +5 -0
  154. package/istm-design/presets/vercel/DESIGN.md +736 -0
  155. package/istm-design/presets/vercel/README.md +5 -0
  156. package/istm-design/presets/vodafone/DESIGN.md +538 -0
  157. package/istm-design/presets/vodafone/README.md +5 -0
  158. package/istm-design/presets/voltagent/DESIGN.md +521 -0
  159. package/istm-design/presets/voltagent/README.md +5 -0
  160. package/istm-design/presets/warp/DESIGN.md +526 -0
  161. package/istm-design/presets/warp/README.md +5 -0
  162. package/istm-design/presets/webflow/DESIGN.md +588 -0
  163. package/istm-design/presets/webflow/README.md +5 -0
  164. package/istm-design/presets/wired/DESIGN.md +497 -0
  165. package/istm-design/presets/wired/README.md +5 -0
  166. package/istm-design/presets/wise/DESIGN.md +544 -0
  167. package/istm-design/presets/wise/README.md +5 -0
  168. package/istm-design/presets/xai/DESIGN.md +465 -0
  169. package/istm-design/presets/xai/README.md +5 -0
  170. package/istm-design/presets/zapier/DESIGN.md +537 -0
  171. package/istm-design/presets/zapier/README.md +5 -0
  172. package/istm-design/references/pick-ui-library.md +1 -1
  173. package/istm-design/semantic-design/DESIGN.md +121 -0
  174. package/istm-design/semantic-design/SKILL.md +184 -0
  175. package/istm-system-design/SKILL.md +12 -5
  176. package/istm-workflow/istm-autoplan/SKILL.md +1905 -0
  177. package/istm-workflow/istm-autoplan/SKILL.md.tmpl +923 -0
  178. package/istm-workflow/istm-craft/SKILL.md +12 -6
  179. package/istm-workflow/istm-cso/ACKNOWLEDGEMENTS.md +14 -0
  180. package/istm-workflow/istm-cso/SKILL.md +1313 -0
  181. package/istm-workflow/istm-cso/SKILL.md.tmpl +407 -0
  182. package/istm-workflow/istm-cso/sections/audit-phases.md +253 -0
  183. package/istm-workflow/istm-cso/sections/audit-phases.md.tmpl +251 -0
  184. package/istm-workflow/istm-cso/sections/manifest.json +14 -0
  185. package/istm-workflow/istm-debt/SKILL.md +44 -0
  186. package/istm-workflow/istm-debug/SKILL.md +12 -3
  187. package/istm-workflow/istm-design-review/SKILL.md +2053 -0
  188. package/istm-workflow/istm-design-review/SKILL.md.tmpl +312 -0
  189. package/istm-workflow/istm-develop/SKILL.md +10 -4
  190. package/istm-workflow/istm-eng-review/SKILL.md +1112 -0
  191. package/istm-workflow/istm-eng-review/SKILL.md.tmpl +163 -0
  192. package/istm-workflow/istm-eng-review/sections/manifest.json +14 -0
  193. package/istm-workflow/istm-eng-review/sections/review-sections.md +942 -0
  194. package/istm-workflow/istm-eng-review/sections/review-sections.md.tmpl +225 -0
  195. package/istm-workflow/istm-gain/SKILL.md +50 -0
  196. package/istm-workflow/istm-health/SKILL.md +1104 -0
  197. package/istm-workflow/istm-health/SKILL.md.tmpl +320 -0
  198. package/istm-workflow/istm-qa/BROWSER.md +1468 -0
  199. package/istm-workflow/istm-qa/SKILL.md +1743 -0
  200. package/istm-workflow/istm-qa/SKILL.md.tmpl +354 -0
  201. package/istm-workflow/istm-qa/references/issue-taxonomy.md +85 -0
  202. package/istm-workflow/istm-qa/templates/qa-report-template.md +126 -0
  203. package/istm-workflow/istm-release/SKILL.md +989 -0
  204. package/istm-workflow/istm-release/SKILL.md.tmpl +160 -0
  205. package/istm-workflow/istm-release/sections/manifest.json +14 -0
  206. package/istm-workflow/istm-release/sections/release-body.md +547 -0
  207. package/istm-workflow/istm-release/sections/release-body.md.tmpl +420 -0
  208. package/istm-workflow/istm-review/SKILL.md +57 -0
  209. package/istm-workflow/istm-ship/SKILL.md +1504 -0
  210. package/istm-workflow/istm-ship/SKILL.md.tmpl +582 -0
  211. package/istm-workflow/istm-ship/sections/adversarial.md +218 -0
  212. package/istm-workflow/istm-ship/sections/adversarial.md.tmpl +19 -0
  213. package/istm-workflow/istm-ship/sections/apple-release.md +58 -0
  214. package/istm-workflow/istm-ship/sections/apple-release.md.tmpl +56 -0
  215. package/istm-workflow/istm-ship/sections/changelog.md +45 -0
  216. package/istm-workflow/istm-ship/sections/changelog.md.tmpl +3 -0
  217. package/istm-workflow/istm-ship/sections/greptile.md +51 -0
  218. package/istm-workflow/istm-ship/sections/greptile.md.tmpl +49 -0
  219. package/istm-workflow/istm-ship/sections/manifest.json +62 -0
  220. package/istm-workflow/istm-ship/sections/plan-completion.md +329 -0
  221. package/istm-workflow/istm-ship/sections/plan-completion.md.tmpl +31 -0
  222. package/istm-workflow/istm-ship/sections/pr-body.md +209 -0
  223. package/istm-workflow/istm-ship/sections/pr-body.md.tmpl +207 -0
  224. package/istm-workflow/istm-ship/sections/review-army.md +406 -0
  225. package/istm-workflow/istm-ship/sections/review-army.md.tmpl +56 -0
  226. package/istm-workflow/istm-ship/sections/test-coverage.md +264 -0
  227. package/istm-workflow/istm-ship/sections/test-coverage.md.tmpl +23 -0
  228. package/istm-workflow/istm-ship/sections/tests.md +403 -0
  229. package/istm-workflow/istm-ship/sections/tests.md.tmpl +116 -0
  230. package/package.json +6 -3
@@ -0,0 +1,251 @@
1
+ **Scope gate (read first).** This section holds every scope-dependent phase (2-11), but you run ONLY the phases your resolved mode selected back in `## Mode Resolution` (always-loaded in the skeleton). Phases 0, 1, 12, 13, 14 always run; Phases 2-11 are scope-gated. "Execute in full" means work through this section applying that selection, NOT run a phase your mode did not select just because its prose lives here. Example: `--owasp` runs Phase 9 from this section, not Phases 2-8/10/11.
2
+
3
+ ### Phase 2: Secrets Archaeology
4
+
5
+ Scan git history for leaked credentials, check tracked `.env` files, find CI configs with inline secrets.
6
+
7
+ **Canonical pattern catalog.** The HIGH-tier credential prefixes the archaeology
8
+ greps below target (AKIA, ghp_, sk-ant-, sk_live_, xoxb-, `-----BEGIN ... PRIVATE
9
+ KEY-----`, etc.) are the same set `/spec`'s in-flight redaction blocks on. The full
10
+ 3-tier taxonomy (HIGH credentials, MEDIUM PII/legal/internal, LOW) is generated from
11
+ and lives in `lib/redact-patterns.ts` — the single source of truth shared by the
12
+ `istm-workflow-redact` engine, `/spec`, `/ship`, and the `/document-*` skills.
13
+
14
+ **Git history — known secret prefixes:**
15
+ ```bash
16
+ git log -p --all -S "AKIA" --diff-filter=A -- "*.env" "*.yml" "*.yaml" "*.json" "*.toml" 2>/dev/null
17
+ git log -p --all -S "sk-" --diff-filter=A -- "*.env" "*.yml" "*.json" "*.ts" "*.js" "*.py" 2>/dev/null
18
+ git log -p --all -G "ghp_|gho_|github_pat_" 2>/dev/null
19
+ git log -p --all -G "xoxb-|xoxp-|xapp-" 2>/dev/null
20
+ git log -p --all -G "password|secret|token|api_key" -- "*.env" "*.yml" "*.json" "*.conf" 2>/dev/null
21
+ ```
22
+
23
+ **.env files tracked by git:**
24
+ ```bash
25
+ git ls-files '*.env' '.env.*' 2>/dev/null | grep -v '.example\|.sample\|.template'
26
+ grep -q "^\.env$\|^\.env\.\*" .gitignore 2>/dev/null && echo ".env IS gitignored" || echo "WARNING: .env NOT in .gitignore"
27
+ ```
28
+
29
+ **CI configs with inline secrets (not using secret stores):**
30
+ ```bash
31
+ for f in $(find .github/workflows -maxdepth 1 \( -name '*.yml' -o -name '*.yaml' \) 2>/dev/null) .gitlab-ci.yml .circleci/config.yml; do
32
+ [ -f "$f" ] && grep -n "password:\|token:\|secret:\|api_key:" "$f" | grep -v '\${{' | grep -v 'secrets\.'
33
+ done 2>/dev/null
34
+ ```
35
+
36
+ **Severity:** CRITICAL for active secret patterns in git history (AKIA, sk_live_, ghp_, xoxb-). HIGH for .env tracked by git, CI configs with inline credentials. MEDIUM for suspicious .env.example values.
37
+
38
+ **FP rules:** Placeholders ("your_", "changeme", "TODO") excluded. Test fixtures excluded unless same value in non-test code. Rotated secrets still flagged (they were exposed). `.env.local` in `.gitignore` is expected.
39
+
40
+ **Diff mode:** Replace `git log -p --all` with `git log -p <base>..HEAD`.
41
+
42
+ ### Phase 3: Dependency Supply Chain
43
+
44
+ Goes beyond `npm audit`. Checks actual supply chain risk.
45
+
46
+ **Package manager detection:**
47
+ ```bash
48
+ [ -f package.json ] && echo "DETECTED: npm/yarn/bun"
49
+ [ -f Gemfile ] && echo "DETECTED: bundler"
50
+ [ -f requirements.txt ] || [ -f pyproject.toml ] && echo "DETECTED: pip"
51
+ [ -f Cargo.toml ] && echo "DETECTED: cargo"
52
+ [ -f go.mod ] && echo "DETECTED: go"
53
+ ```
54
+
55
+ **Standard vulnerability scan:** Run whichever package manager's audit tool is available. Each tool is optional — if not installed, note it in the report as "SKIPPED — tool not installed" with install instructions. This is informational, NOT a finding. The audit continues with whatever tools ARE available.
56
+
57
+ **Install scripts in production deps (supply chain attack vector):** For Node.js projects with hydrated `node_modules`, check production dependencies for `preinstall`, `postinstall`, or `install` scripts.
58
+
59
+ **Lockfile integrity:** Check that lockfiles exist AND are tracked by git.
60
+
61
+ **Severity:** CRITICAL for known CVEs (high/critical) in direct deps. HIGH for install scripts in prod deps / missing lockfile. MEDIUM for abandoned packages / medium CVEs / lockfile not tracked.
62
+
63
+ **FP rules:** devDependency CVEs are MEDIUM max. `node-gyp`/`cmake` install scripts expected (MEDIUM not HIGH). No-fix-available advisories without known exploits excluded. Missing lockfile for library repos (not apps) is NOT a finding.
64
+
65
+ ### Phase 4: CI/CD Pipeline Security
66
+
67
+ Check who can modify workflows and what secrets they can access.
68
+
69
+ **GitHub Actions analysis:** For each workflow file, check for:
70
+ - Unpinned third-party actions (not SHA-pinned) — use Grep for `uses:` lines missing `@[sha]`
71
+ - `pull_request_target` (dangerous: fork PRs get write access)
72
+ - Script injection via `${{ github.event.* }}` in `run:` steps
73
+ - Secrets as env vars (could leak in logs)
74
+ - CODEOWNERS protection on workflow files
75
+
76
+ **Severity:** CRITICAL for `pull_request_target` + checkout of PR code / script injection via `${{ github.event.*.body }}` in `run:` steps. HIGH for unpinned third-party actions / secrets as env vars without masking. MEDIUM for missing CODEOWNERS on workflow files.
77
+
78
+ **FP rules:** First-party `actions/*` unpinned = MEDIUM not HIGH. `pull_request_target` without PR ref checkout is safe (precedent #11). Secrets in `with:` blocks (not `env:`/`run:`) are handled by runtime.
79
+
80
+ ### Phase 5: Infrastructure Shadow Surface
81
+
82
+ Find shadow infrastructure with excessive access.
83
+
84
+ **Dockerfiles:** For each Dockerfile, check for missing `USER` directive (runs as root), secrets passed as `ARG`, `.env` files copied into images, exposed ports.
85
+
86
+ **Config files with prod credentials:** Use Grep to search for database connection strings (postgres://, mysql://, mongodb://, redis://) in config files, excluding localhost/127.0.0.1/example.com. Check for staging/dev configs referencing prod.
87
+
88
+ **IaC security:** For Terraform files, check for `"*"` in IAM actions/resources, hardcoded secrets in `.tf`/`.tfvars`. For K8s manifests, check for privileged containers, hostNetwork, hostPID.
89
+
90
+ **Severity:** CRITICAL for prod DB URLs with credentials in committed config / `"*"` IAM on sensitive resources / secrets baked into Docker images. HIGH for root containers in prod / staging with prod DB access / privileged K8s. MEDIUM for missing USER directive / exposed ports without documented purpose.
91
+
92
+ **FP rules:** `docker-compose.yml` for local dev with localhost = not a finding (precedent #12). Terraform `"*"` in `data` sources (read-only) excluded. K8s manifests in `test/`/`dev/`/`local/` with localhost networking excluded.
93
+
94
+ ### Phase 6: Webhook & Integration Audit
95
+
96
+ Find inbound endpoints that accept anything.
97
+
98
+ **Webhook routes:** Use Grep to find files containing webhook/hook/callback route patterns. For each file, check whether it also contains signature verification (signature, hmac, verify, digest, x-hub-signature, stripe-signature, svix). Files with webhook routes but NO signature verification are findings.
99
+
100
+ **TLS verification disabled:** Use Grep to search for patterns like `verify.*false`, `VERIFY_NONE`, `InsecureSkipVerify`, `NODE_TLS_REJECT_UNAUTHORIZED.*0`.
101
+
102
+ **OAuth scope analysis:** Use Grep to find OAuth configurations and check for overly broad scopes.
103
+
104
+ **Verification approach (code-tracing only — NO live requests):** For webhook findings, trace the handler code to determine if signature verification exists anywhere in the middleware chain (parent router, middleware stack, API gateway config). Do NOT make actual HTTP requests to webhook endpoints.
105
+
106
+ **Severity:** CRITICAL for webhooks without any signature verification. HIGH for TLS verification disabled in prod code / overly broad OAuth scopes. MEDIUM for undocumented outbound data flows to third parties.
107
+
108
+ **FP rules:** TLS disabled in test code excluded. Internal service-to-service webhooks on private networks = MEDIUM max. Webhook endpoints behind API gateway that handles signature verification upstream are NOT findings — but require evidence.
109
+
110
+ ### Phase 7: LLM & AI Security
111
+
112
+ Check for AI/LLM-specific vulnerabilities. This is a new attack class.
113
+
114
+ Use Grep to search for these patterns:
115
+ - **Prompt injection vectors:** User input flowing into system prompts or tool schemas — look for string interpolation near system prompt construction
116
+ - **Unsanitized LLM output:** `dangerouslySetInnerHTML`, `v-html`, `innerHTML`, `.html()`, `raw()` rendering LLM responses
117
+ - **Tool/function calling without validation:** `tool_choice`, `function_call`, `tools=`, `functions=`
118
+ - **AI API keys in code (not env vars):** `sk-` patterns, hardcoded API key assignments
119
+ - **Eval/exec of LLM output:** `eval()`, `exec()`, `Function()`, `new Function` processing AI responses
120
+
121
+ **Key checks (beyond grep):**
122
+ - Trace user content flow — does it enter system prompts or tool schemas?
123
+ - RAG poisoning: can external documents influence AI behavior via retrieval?
124
+ - Tool calling permissions: are LLM tool calls validated before execution?
125
+ - Output sanitization: is LLM output treated as trusted (rendered as HTML, executed as code)?
126
+ - Cost/resource attacks: can a user trigger unbounded LLM calls?
127
+
128
+ **Severity:** CRITICAL for user input in system prompts / unsanitized LLM output rendered as HTML / eval of LLM output. HIGH for missing tool call validation / exposed AI API keys. MEDIUM for unbounded LLM calls / RAG without input validation.
129
+
130
+ **FP rules:** User content in the user-message position of an AI conversation is NOT prompt injection (precedent #13). Only flag when user content enters system prompts, tool schemas, or function-calling contexts.
131
+
132
+ ### Phase 8: Skill Supply Chain
133
+
134
+ Scan installed Claude Code skills for malicious patterns. 36% of published skills have security flaws, 13.4% are outright malicious (Snyk ToxicSkills research).
135
+
136
+ **Tier 1 — repo-local (automatic):** Scan the repo's local skills directory for suspicious patterns:
137
+
138
+ ```bash
139
+ ls -la .claude/skills/ 2>/dev/null
140
+ ```
141
+
142
+ Use Grep to search all local skill SKILL.md files for suspicious patterns:
143
+ - `curl`, `wget`, `fetch`, `http`, `exfiltrat` (network exfiltration)
144
+ - `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `env.`, `process.env` (credential access)
145
+ - `IGNORE PREVIOUS`, `system override`, `disregard`, `forget your instructions` (prompt injection)
146
+
147
+ **Tier 2 — global skills (requires permission):** Before scanning globally installed skills or user settings, use AskUserQuestion:
148
+ "Phase 8 can scan your globally installed AI coding agent skills and hooks for malicious patterns. This reads files outside the repo. Want to include this?"
149
+ Options: A) Yes — scan global skills too B) No — repo-local only
150
+
151
+ If approved, run the same Grep patterns on globally installed skill files and check hooks in user settings.
152
+
153
+ **Severity:** CRITICAL for credential exfiltration attempts / prompt injection in skill files. HIGH for suspicious network calls / overly broad tool permissions. MEDIUM for skills from unverified sources without review.
154
+
155
+ **FP rules:** istm-workflow's own skills are trusted (check if skill path resolves to a known repo). Skills that use `curl` for legitimate purposes (downloading tools, health checks) need context — only flag when the target URL is suspicious or when the command includes credential variables.
156
+
157
+ ### Phase 9: OWASP Top 10 Assessment
158
+
159
+ For each OWASP category, perform targeted analysis. Use the Grep tool for all searches — scope file extensions to detected stacks from Phase 0.
160
+
161
+ #### A01: Broken Access Control
162
+ - Check for missing auth on controllers/routes (skip_before_action, skip_authorization, public, no_auth)
163
+ - Check for direct object reference patterns (params[:id], req.params.id, request.args.get)
164
+ - Can user A access user B's resources by changing IDs?
165
+ - Is there horizontal/vertical privilege escalation?
166
+
167
+ #### A02: Cryptographic Failures
168
+ - Weak crypto (MD5, SHA1, DES, ECB) or hardcoded secrets
169
+ - Is sensitive data encrypted at rest and in transit?
170
+ - Are keys/secrets properly managed (env vars, not hardcoded)?
171
+
172
+ #### A03: Injection
173
+ - SQL injection: raw queries, string interpolation in SQL
174
+ - Command injection: system(), exec(), spawn(), popen
175
+ - Template injection: render with params, eval(), html_safe, raw()
176
+ - LLM prompt injection: see Phase 7 for comprehensive coverage
177
+
178
+ #### A04: Insecure Design
179
+ - Rate limits on authentication endpoints?
180
+ - Account lockout after failed attempts?
181
+ - Business logic validated server-side?
182
+
183
+ #### A05: Security Misconfiguration
184
+ - CORS configuration (wildcard origins in production?)
185
+ - CSP headers present?
186
+ - Debug mode / verbose errors in production?
187
+
188
+ #### A06: Vulnerable and Outdated Components
189
+ See **Phase 3 (Dependency Supply Chain)** for comprehensive component analysis.
190
+
191
+ #### A07: Identification and Authentication Failures
192
+ - Session management: creation, storage, invalidation
193
+ - Password policy: complexity, rotation, breach checking
194
+ - MFA: available? enforced for admin?
195
+ - Token management: JWT expiration, refresh rotation
196
+
197
+ #### A08: Software and Data Integrity Failures
198
+ See **Phase 4 (CI/CD Pipeline Security)** for pipeline protection analysis.
199
+ - Deserialization inputs validated?
200
+ - Integrity checking on external data?
201
+
202
+ #### A09: Security Logging and Monitoring Failures
203
+ - Authentication events logged?
204
+ - Authorization failures logged?
205
+ - Admin actions audit-trailed?
206
+ - Logs protected from tampering?
207
+
208
+ #### A10: Server-Side Request Forgery (SSRF)
209
+ - URL construction from user input?
210
+ - Internal service reachability from user-controlled URLs?
211
+ - Allowlist/blocklist enforcement on outbound requests?
212
+
213
+ ### Phase 10: STRIDE Threat Model
214
+
215
+ For each major component identified in Phase 0, evaluate:
216
+
217
+ ```
218
+ COMPONENT: [Name]
219
+ Spoofing: Can an attacker impersonate a user/service?
220
+ Tampering: Can data be modified in transit/at rest?
221
+ Repudiation: Can actions be denied? Is there an audit trail?
222
+ Information Disclosure: Can sensitive data leak?
223
+ Denial of Service: Can the component be overwhelmed?
224
+ Elevation of Privilege: Can a user gain unauthorized access?
225
+ ```
226
+
227
+ ### Phase 11: Data Classification
228
+
229
+ Classify all data handled by the application:
230
+
231
+ ```
232
+ DATA CLASSIFICATION
233
+ ═══════════════════
234
+ RESTRICTED (breach = legal liability):
235
+ - Passwords/credentials: [where stored, how protected]
236
+ - Payment data: [where stored, PCI compliance status]
237
+ - PII: [what types, where stored, retention policy]
238
+
239
+ CONFIDENTIAL (breach = business damage):
240
+ - API keys: [where stored, rotation policy]
241
+ - Business logic: [trade secrets in code?]
242
+ - User behavior data: [analytics, tracking]
243
+
244
+ INTERNAL (breach = embarrassment):
245
+ - System logs: [what they contain, who can access]
246
+ - Configuration: [what's exposed in error messages]
247
+
248
+ PUBLIC:
249
+ - Marketing content, documentation, public APIs
250
+ ```
251
+
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://istm-workflow.dev/schemas/section-manifest.json",
3
+ "skill": "cso",
4
+ "version": 1,
5
+ "note": "PASSIVE registry (v2 plan T9 / CM2). id/file/title/trigger text ONLY. Mode dispatch (## Arguments, ## Mode Resolution), always-run phases (0,1), and FP-filtering exceptions (Phase 12) stay in the always-loaded skeleton; only the scope-dependent audit phases are on demand.",
6
+ "sections": [
7
+ {
8
+ "id": "audit-phases",
9
+ "file": "audit-phases.md",
10
+ "title": "Scope-dependent audit phases: secrets, dependencies, CI/CD, infra, webhooks, LLM/AI, skill supply chain, OWASP Top 10, STRIDE, data classification (Phases 2-11)",
11
+ "trigger": "running the scope-dependent audit phases (Phases 2-11) selected by the resolved mode, after the Phase 0 stack detection and Phase 1 attack-surface census"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: istm-debt
3
+ description: >
4
+ Harvest every `istm:` comment in the codebase into a debt ledger, so the
5
+ deliberate shortcuts and deferrals istm leaves behind get tracked instead
6
+ of rotting into "later means never". Use when the user says "istm debt",
7
+ "/istm-debt", "what did istm defer", "list the shortcuts", "istm
8
+ ledger", or "what did we mark to do later". One-shot report, changes nothing.
9
+ ---
10
+
11
+ Every deliberate istm shortcut is marked with a `istm:` comment naming
12
+ its ceiling and upgrade path. This collects them into one ledger so a deferral
13
+ can't quietly become permanent.
14
+
15
+ ## Scan
16
+
17
+ Grep the repo for comment markers, skipping `node_modules`, `.git`, and build
18
+ output:
19
+
20
+ `grep -rnE '(#|//) ?istm:' .` (add other comment prefixes if your stack uses them)
21
+
22
+ Each hit is one ledger row. The comment prefix keeps prose that merely mentions
23
+ the convention out of the ledger.
24
+
25
+ ## Output
26
+
27
+ One row per marker, grouped by file:
28
+
29
+ `<file>:<line>, <what was simplified>. ceiling: <the limit named>. upgrade: <the trigger to revisit>.`
30
+
31
+ The convention is `istm: <ceiling>, <upgrade path>`, so pull the ceiling
32
+ and the trigger straight from the comment. Want an owner per row too? add
33
+ `git blame -L<line>,<line>`.
34
+
35
+ Flag the rot risk: any `istm:` comment that names no upgrade path or
36
+ trigger gets a `no-trigger` tag, those are the ones that silently rot.
37
+
38
+ End with `<N> markers, <M> with no trigger.` Nothing found: `No istm: debt. Clean ledger.`
39
+
40
+ ## Boundaries
41
+
42
+ Reads and reports only, changes nothing. To persist it, ask and it writes the
43
+ ledger to a file (e.g. `ISTM-DEBT.md`). One-shot. "stop istm-debt" or
44
+ "normal mode" to revert.
@@ -66,16 +66,25 @@ Design the smallest experiment that confirms or refutes it (a targeted log, an a
66
66
 
67
67
  Loop Steps 3 to 4 until a hypothesis is confirmed by evidence. **Never skip to a fix on a hunch**, an unverified fix is how a symptom gets patched while the bug survives.
68
68
 
69
- ### Step 5: Fix at the root
69
+ ### Step 5: Fix at the root (The 7-Rung Efficiency Ladder)
70
70
 
71
- Make the **minimal, targeted** change that addresses the proven cause. Don't fix the symptom (clamping the null), fix the cause (why it's null). Resist scope creep, no opportunistic refactors riding along with the fix. Follow the project's conventions (`.istm-context/agents.md`, neighbouring code).
71
+ Stop at the first rung that holds before writing code:
72
+ 1. **Does this need to be built at all?** (YAGNI / delete dead code).
73
+ 2. **Does it already exist in this codebase?** Reuse the helper or pattern already here.
74
+ 3. **Does the standard library already do this?** Use standard APIs.
75
+ 4. **Does a native platform feature cover it?** Use it.
76
+ 5. **Does an already-installed dependency solve it?** Use it.
77
+ 6. **Can this be one line?** Make it one line.
78
+ 7. **Only then: write the minimum clean code that works.**
79
+
80
+ **Root Cause Caller Grep**: Grep every caller of the function you touch and fix the shared contract once. One clean guard there is a smaller diff than patching only the path the symptom named.
72
81
 
73
82
  ### Step 6: Verify and protect
74
83
 
75
84
  - Run the Step 1 reproduction again, confirm it now passes.
76
85
  - Run the surrounding test suite, confirm no regression.
77
86
  - **Add a regression test** that fails without the fix and passes with it, so this bug can't silently return; write it inline, or hand the spec to `/istm-test`.
78
- - **Check for siblings**: the same root cause often hides in other places (same pattern, same bad assumption). Grep for them and note or fix them.
87
+ - **Check for siblings**: the same root cause often hides in other places (same pattern, same bad assumption). Grep for them and fix them at the root.
79
88
 
80
89
  ### Optional: run it in a subagent
81
90