@sentry/warden 0.21.0 → 0.23.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 (326) hide show
  1. package/.oxlintrc.json +169 -0
  2. package/CHANGELOG.md +390 -0
  3. package/README.md +4 -4
  4. package/dist/cli/args.d.ts +6 -2
  5. package/dist/cli/args.d.ts.map +1 -1
  6. package/dist/cli/args.js +175 -207
  7. package/dist/cli/args.js.map +1 -1
  8. package/dist/cli/commands/add.d.ts.map +1 -1
  9. package/dist/cli/commands/add.js +16 -5
  10. package/dist/cli/commands/add.js.map +1 -1
  11. package/dist/cli/commands/build.d.ts +13 -0
  12. package/dist/cli/commands/build.d.ts.map +1 -0
  13. package/dist/cli/commands/build.js +384 -0
  14. package/dist/cli/commands/build.js.map +1 -0
  15. package/dist/cli/commands/init.d.ts.map +1 -1
  16. package/dist/cli/commands/init.js +10 -2
  17. package/dist/cli/commands/init.js.map +1 -1
  18. package/dist/cli/commands/runs.d.ts.map +1 -1
  19. package/dist/cli/commands/runs.js +79 -15
  20. package/dist/cli/commands/runs.js.map +1 -1
  21. package/dist/cli/commands/sync.d.ts.map +1 -1
  22. package/dist/cli/commands/sync.js +4 -1
  23. package/dist/cli/commands/sync.js.map +1 -1
  24. package/dist/cli/context.d.ts.map +1 -1
  25. package/dist/cli/context.js +8 -1
  26. package/dist/cli/context.js.map +1 -1
  27. package/dist/cli/files.d.ts.map +1 -1
  28. package/dist/cli/files.js +27 -9
  29. package/dist/cli/files.js.map +1 -1
  30. package/dist/cli/help.d.ts +4 -0
  31. package/dist/cli/help.d.ts.map +1 -0
  32. package/dist/cli/help.js +448 -0
  33. package/dist/cli/help.js.map +1 -0
  34. package/dist/cli/index.js +2 -13
  35. package/dist/cli/index.js.map +1 -1
  36. package/dist/cli/input.d.ts +12 -0
  37. package/dist/cli/input.d.ts.map +1 -1
  38. package/dist/cli/input.js +60 -0
  39. package/dist/cli/input.js.map +1 -1
  40. package/dist/cli/log-cleanup.d.ts.map +1 -1
  41. package/dist/cli/log-cleanup.js +4 -0
  42. package/dist/cli/log-cleanup.js.map +1 -1
  43. package/dist/cli/main.d.ts +39 -2
  44. package/dist/cli/main.d.ts.map +1 -1
  45. package/dist/cli/main.js +482 -100
  46. package/dist/cli/main.js.map +1 -1
  47. package/dist/cli/output/box.js +1 -1
  48. package/dist/cli/output/formatters.d.ts +10 -2
  49. package/dist/cli/output/formatters.d.ts.map +1 -1
  50. package/dist/cli/output/formatters.js +32 -9
  51. package/dist/cli/output/formatters.js.map +1 -1
  52. package/dist/cli/output/index.d.ts +2 -2
  53. package/dist/cli/output/index.d.ts.map +1 -1
  54. package/dist/cli/output/index.js +2 -2
  55. package/dist/cli/output/index.js.map +1 -1
  56. package/dist/cli/output/ink-runner.d.ts +3 -1
  57. package/dist/cli/output/ink-runner.d.ts.map +1 -1
  58. package/dist/cli/output/ink-runner.js +79 -25
  59. package/dist/cli/output/ink-runner.js.map +1 -1
  60. package/dist/cli/output/jsonl-schema-gen.d.ts.map +1 -1
  61. package/dist/cli/output/jsonl-schema-gen.js +4 -2
  62. package/dist/cli/output/jsonl-schema-gen.js.map +1 -1
  63. package/dist/cli/output/jsonl.d.ts +147 -4
  64. package/dist/cli/output/jsonl.d.ts.map +1 -1
  65. package/dist/cli/output/jsonl.js +183 -7
  66. package/dist/cli/output/jsonl.js.map +1 -1
  67. package/dist/cli/output/live-status.d.ts +48 -0
  68. package/dist/cli/output/live-status.d.ts.map +1 -0
  69. package/dist/cli/output/live-status.js +173 -0
  70. package/dist/cli/output/live-status.js.map +1 -0
  71. package/dist/cli/output/reporter.d.ts +4 -0
  72. package/dist/cli/output/reporter.d.ts.map +1 -1
  73. package/dist/cli/output/reporter.js +20 -3
  74. package/dist/cli/output/reporter.js.map +1 -1
  75. package/dist/cli/output/tasks.d.ts +11 -5
  76. package/dist/cli/output/tasks.d.ts.map +1 -1
  77. package/dist/cli/output/tasks.js +126 -68
  78. package/dist/cli/output/tasks.js.map +1 -1
  79. package/dist/cli/signals.d.ts +15 -0
  80. package/dist/cli/signals.d.ts.map +1 -0
  81. package/dist/cli/signals.js +26 -0
  82. package/dist/cli/signals.js.map +1 -0
  83. package/dist/config/loader.d.ts +48 -7
  84. package/dist/config/loader.d.ts.map +1 -1
  85. package/dist/config/loader.js +228 -32
  86. package/dist/config/loader.js.map +1 -1
  87. package/dist/config/schema.d.ts +55 -0
  88. package/dist/config/schema.d.ts.map +1 -1
  89. package/dist/config/schema.js +34 -2
  90. package/dist/config/schema.js.map +1 -1
  91. package/dist/diff/context.d.ts +9 -2
  92. package/dist/diff/context.d.ts.map +1 -1
  93. package/dist/diff/context.js +65 -17
  94. package/dist/diff/context.js.map +1 -1
  95. package/dist/evals/runner.d.ts.map +1 -1
  96. package/dist/evals/runner.js +16 -0
  97. package/dist/evals/runner.js.map +1 -1
  98. package/dist/event/context.d.ts.map +1 -1
  99. package/dist/event/context.js +1 -0
  100. package/dist/event/context.js.map +1 -1
  101. package/dist/event/schedule-context.d.ts.map +1 -1
  102. package/dist/event/schedule-context.js +1 -0
  103. package/dist/event/schedule-context.js.map +1 -1
  104. package/dist/index.d.ts +6 -6
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js +3 -3
  107. package/dist/index.js.map +1 -1
  108. package/dist/output/dedup.d.ts +8 -11
  109. package/dist/output/dedup.d.ts.map +1 -1
  110. package/dist/output/dedup.js +39 -37
  111. package/dist/output/dedup.js.map +1 -1
  112. package/dist/output/github-checks.d.ts +1 -0
  113. package/dist/output/github-checks.d.ts.map +1 -1
  114. package/dist/output/github-checks.js +9 -7
  115. package/dist/output/github-checks.js.map +1 -1
  116. package/dist/sdk/analyze.d.ts.map +1 -1
  117. package/dist/sdk/analyze.js +166 -276
  118. package/dist/sdk/analyze.js.map +1 -1
  119. package/dist/sdk/circuit-breaker.d.ts +26 -0
  120. package/dist/sdk/circuit-breaker.d.ts.map +1 -0
  121. package/dist/sdk/circuit-breaker.js +53 -0
  122. package/dist/sdk/circuit-breaker.js.map +1 -0
  123. package/dist/sdk/errors.d.ts +5 -0
  124. package/dist/sdk/errors.d.ts.map +1 -1
  125. package/dist/sdk/errors.js +27 -0
  126. package/dist/sdk/errors.js.map +1 -1
  127. package/dist/sdk/extract.d.ts +18 -9
  128. package/dist/sdk/extract.d.ts.map +1 -1
  129. package/dist/sdk/extract.js +95 -87
  130. package/dist/sdk/extract.js.map +1 -1
  131. package/dist/sdk/fix-quality.d.ts +5 -0
  132. package/dist/sdk/fix-quality.d.ts.map +1 -1
  133. package/dist/sdk/fix-quality.js +42 -23
  134. package/dist/sdk/fix-quality.js.map +1 -1
  135. package/dist/sdk/haiku.d.ts +6 -0
  136. package/dist/sdk/haiku.d.ts.map +1 -1
  137. package/dist/sdk/haiku.js +75 -49
  138. package/dist/sdk/haiku.js.map +1 -1
  139. package/dist/sdk/json-output.d.ts +31 -0
  140. package/dist/sdk/json-output.d.ts.map +1 -0
  141. package/dist/sdk/json-output.js +98 -0
  142. package/dist/sdk/json-output.js.map +1 -0
  143. package/dist/sdk/model-pricing.json +56 -16
  144. package/dist/sdk/post-process.d.ts +29 -0
  145. package/dist/sdk/post-process.d.ts.map +1 -0
  146. package/dist/sdk/post-process.js +65 -0
  147. package/dist/sdk/post-process.js.map +1 -0
  148. package/dist/sdk/prepare.d.ts.map +1 -1
  149. package/dist/sdk/prepare.js +4 -1
  150. package/dist/sdk/prepare.js.map +1 -1
  151. package/dist/sdk/pricing.d.ts +18 -0
  152. package/dist/sdk/pricing.d.ts.map +1 -1
  153. package/dist/sdk/pricing.js +108 -3
  154. package/dist/sdk/pricing.js.map +1 -1
  155. package/dist/sdk/prompt-sections.d.ts +56 -0
  156. package/dist/sdk/prompt-sections.d.ts.map +1 -0
  157. package/dist/sdk/prompt-sections.js +118 -0
  158. package/dist/sdk/prompt-sections.js.map +1 -0
  159. package/dist/sdk/prompt.d.ts +2 -17
  160. package/dist/sdk/prompt.d.ts.map +1 -1
  161. package/dist/sdk/prompt.js +15 -37
  162. package/dist/sdk/prompt.js.map +1 -1
  163. package/dist/sdk/report-files.d.ts +15 -0
  164. package/dist/sdk/report-files.d.ts.map +1 -0
  165. package/dist/sdk/report-files.js +20 -0
  166. package/dist/sdk/report-files.js.map +1 -0
  167. package/dist/sdk/runner.d.ts +9 -1
  168. package/dist/sdk/runner.d.ts.map +1 -1
  169. package/dist/sdk/runner.js +6 -0
  170. package/dist/sdk/runner.js.map +1 -1
  171. package/dist/sdk/runtimes/claude.d.ts +3 -0
  172. package/dist/sdk/runtimes/claude.d.ts.map +1 -0
  173. package/dist/sdk/runtimes/claude.js +376 -0
  174. package/dist/sdk/runtimes/claude.js.map +1 -0
  175. package/dist/sdk/runtimes/index.d.ts +12 -0
  176. package/dist/sdk/runtimes/index.d.ts.map +1 -0
  177. package/dist/sdk/runtimes/index.js +22 -0
  178. package/dist/sdk/runtimes/index.js.map +1 -0
  179. package/dist/sdk/runtimes/types.d.ts +116 -0
  180. package/dist/sdk/runtimes/types.d.ts.map +1 -0
  181. package/dist/sdk/runtimes/types.js +17 -0
  182. package/dist/sdk/runtimes/types.js.map +1 -0
  183. package/dist/sdk/types.d.ts +42 -2
  184. package/dist/sdk/types.d.ts.map +1 -1
  185. package/dist/sdk/types.js.map +1 -1
  186. package/dist/sdk/usage.d.ts +21 -6
  187. package/dist/sdk/usage.d.ts.map +1 -1
  188. package/dist/sdk/usage.js +36 -23
  189. package/dist/sdk/usage.js.map +1 -1
  190. package/dist/sdk/verify.d.ts +25 -0
  191. package/dist/sdk/verify.d.ts.map +1 -0
  192. package/dist/sdk/verify.js +226 -0
  193. package/dist/sdk/verify.js.map +1 -0
  194. package/dist/skill-builder/agentic.d.ts +33 -0
  195. package/dist/skill-builder/agentic.d.ts.map +1 -0
  196. package/dist/skill-builder/agentic.js +240 -0
  197. package/dist/skill-builder/agentic.js.map +1 -0
  198. package/dist/skill-builder/authoring-provider.d.ts +5 -0
  199. package/dist/skill-builder/authoring-provider.d.ts.map +1 -0
  200. package/dist/skill-builder/authoring-provider.js +70 -0
  201. package/dist/skill-builder/authoring-provider.js.map +1 -0
  202. package/dist/skill-builder/definition.d.ts +46 -0
  203. package/dist/skill-builder/definition.d.ts.map +1 -0
  204. package/dist/skill-builder/definition.js +171 -0
  205. package/dist/skill-builder/definition.js.map +1 -0
  206. package/dist/skill-builder/outline-contract.d.ts +113 -0
  207. package/dist/skill-builder/outline-contract.d.ts.map +1 -0
  208. package/dist/skill-builder/outline-contract.js +73 -0
  209. package/dist/skill-builder/outline-contract.js.map +1 -0
  210. package/dist/skill-builder/outline-state.d.ts +158 -0
  211. package/dist/skill-builder/outline-state.d.ts.map +1 -0
  212. package/dist/skill-builder/outline-state.js +87 -0
  213. package/dist/skill-builder/outline-state.js.map +1 -0
  214. package/dist/skill-builder/outline.d.ts +36 -0
  215. package/dist/skill-builder/outline.d.ts.map +1 -0
  216. package/dist/skill-builder/outline.js +345 -0
  217. package/dist/skill-builder/outline.js.map +1 -0
  218. package/dist/skill-builder/skill-contract.d.ts +97 -0
  219. package/dist/skill-builder/skill-contract.d.ts.map +1 -0
  220. package/dist/skill-builder/skill-contract.js +58 -0
  221. package/dist/skill-builder/skill-contract.js.map +1 -0
  222. package/dist/skill-builder/skill-prompts.d.ts +61 -0
  223. package/dist/skill-builder/skill-prompts.d.ts.map +1 -0
  224. package/dist/skill-builder/skill-prompts.js +285 -0
  225. package/dist/skill-builder/skill-prompts.js.map +1 -0
  226. package/dist/skill-builder/skill.d.ts +23 -0
  227. package/dist/skill-builder/skill.d.ts.map +1 -0
  228. package/dist/skill-builder/skill.js +563 -0
  229. package/dist/skill-builder/skill.js.map +1 -0
  230. package/dist/skills/index.d.ts +2 -2
  231. package/dist/skills/index.d.ts.map +1 -1
  232. package/dist/skills/index.js +1 -1
  233. package/dist/skills/index.js.map +1 -1
  234. package/dist/skills/loader.d.ts +20 -6
  235. package/dist/skills/loader.d.ts.map +1 -1
  236. package/dist/skills/loader.js +88 -141
  237. package/dist/skills/loader.js.map +1 -1
  238. package/dist/skills/remote.d.ts +11 -7
  239. package/dist/skills/remote.d.ts.map +1 -1
  240. package/dist/skills/remote.js +62 -162
  241. package/dist/skills/remote.js.map +1 -1
  242. package/dist/triggers/matcher.d.ts.map +1 -1
  243. package/dist/triggers/matcher.js +28 -15
  244. package/dist/triggers/matcher.js.map +1 -1
  245. package/dist/types/index.d.ts +41 -0
  246. package/dist/types/index.d.ts.map +1 -1
  247. package/dist/types/index.js +24 -0
  248. package/dist/types/index.js.map +1 -1
  249. package/dist/utils/index.d.ts +1 -0
  250. package/dist/utils/index.d.ts.map +1 -1
  251. package/dist/utils/index.js +1 -0
  252. package/dist/utils/index.js.map +1 -1
  253. package/dist/utils/path.d.ts +17 -0
  254. package/dist/utils/path.d.ts.map +1 -0
  255. package/dist/utils/path.js +36 -0
  256. package/dist/utils/path.js.map +1 -0
  257. package/package.json +8 -8
  258. package/policies/README.md +22 -0
  259. package/policies/code-comments.md +20 -0
  260. package/policies/policy-template.md +14 -0
  261. package/skills/warden/SKILL.md +5 -5
  262. package/skills/warden/SOURCES.md +39 -0
  263. package/skills/warden/SPEC.md +112 -0
  264. package/skills/warden/references/cli-reference.md +11 -4
  265. package/skills/warden/references/config-schema.md +38 -13
  266. package/skills/warden/references/configuration.md +29 -8
  267. package/skills/warden-sweep/SKILL.md +43 -365
  268. package/skills/warden-sweep/SOURCES.md +43 -0
  269. package/skills/warden-sweep/SPEC.md +126 -0
  270. package/skills/warden-sweep/references/issue-phase.md +24 -0
  271. package/skills/warden-sweep/references/organize-phase.md +31 -0
  272. package/skills/warden-sweep/references/patch-phase.md +142 -0
  273. package/skills/warden-sweep/references/resume-and-artifacts.md +51 -0
  274. package/skills/warden-sweep/references/scan-phase.md +46 -0
  275. package/skills/warden-sweep/references/script-interfaces.md +127 -0
  276. package/skills/warden-sweep/references/verify-phase.md +69 -0
  277. package/src/builtin-skills/security-review/SKILL.md +81 -0
  278. package/src/builtin-skills/security-review/SPEC.md +77 -0
  279. package/src/builtin-skills/security-review/references/github-workflows.md +186 -0
  280. package/src/builtin-skills/security-review/references/javascript-typescript.md +69 -0
  281. package/src/builtin-skills/security-review/references/python.md +70 -0
  282. package/src/internal-skills/skill-writer/EVAL.md +124 -0
  283. package/src/internal-skills/skill-writer/SKILL.md +159 -0
  284. package/src/internal-skills/skill-writer/SOURCES.md +94 -0
  285. package/src/internal-skills/skill-writer/SPEC.md +153 -0
  286. package/src/internal-skills/skill-writer/references/artifact-layouts/argument-driven-skill-layout.md +32 -0
  287. package/src/internal-skills/skill-writer/references/artifact-layouts/asset-template-skill-layout.md +30 -0
  288. package/src/internal-skills/skill-writer/references/artifact-layouts/inline-skill-layout.md +28 -0
  289. package/src/internal-skills/skill-writer/references/artifact-layouts/reference-backed-skill-layout.md +35 -0
  290. package/src/internal-skills/skill-writer/references/artifact-layouts/script-backed-skill-layout.md +31 -0
  291. package/src/internal-skills/skill-writer/references/authoring-path.md +91 -0
  292. package/src/internal-skills/skill-writer/references/claude-code/argument-substitutions.md +20 -0
  293. package/src/internal-skills/skill-writer/references/claude-code/dynamic-context.md +16 -0
  294. package/src/internal-skills/skill-writer/references/claude-code/frontmatter-and-invocation.md +33 -0
  295. package/src/internal-skills/skill-writer/references/claude-code/hook-backed-skills.md +28 -0
  296. package/src/internal-skills/skill-writer/references/claude-code/subagent-fork-skills.md +22 -0
  297. package/src/internal-skills/skill-writer/references/description-optimization.md +28 -0
  298. package/src/internal-skills/skill-writer/references/design-principles.md +74 -0
  299. package/src/internal-skills/skill-writer/references/evaluation-path.md +73 -0
  300. package/src/internal-skills/skill-writer/references/examples/documentation-skill.md +70 -0
  301. package/src/internal-skills/skill-writer/references/examples/evaluator-loop-skill.md +38 -0
  302. package/src/internal-skills/skill-writer/references/examples/hook-backed-skill.md +39 -0
  303. package/src/internal-skills/skill-writer/references/examples/router-skill.md +41 -0
  304. package/src/internal-skills/skill-writer/references/examples/security-review-skill.md +69 -0
  305. package/src/internal-skills/skill-writer/references/examples/subagent-fork-skill.md +39 -0
  306. package/src/internal-skills/skill-writer/references/examples/workflow-process-skill.md +65 -0
  307. package/src/internal-skills/skill-writer/references/execution-shapes.md +68 -0
  308. package/src/internal-skills/skill-writer/references/iteration-evidence.md +82 -0
  309. package/src/internal-skills/skill-writer/references/iteration-path.md +40 -0
  310. package/src/internal-skills/skill-writer/references/mode-selection.md +67 -0
  311. package/src/internal-skills/skill-writer/references/output-contracts.md +68 -0
  312. package/src/internal-skills/skill-writer/references/reference-architecture.md +71 -0
  313. package/src/internal-skills/skill-writer/references/registration-validation.md +67 -0
  314. package/src/internal-skills/skill-writer/references/source-discovery.md +60 -0
  315. package/src/internal-skills/skill-writer/references/spec-template.md +118 -0
  316. package/src/internal-skills/skill-writer/references/structure-troubleshooting.md +111 -0
  317. package/src/internal-skills/skill-writer/references/synthesis-path.md +119 -0
  318. package/src/internal-skills/skill-writer/references/workflow-mechanics/evaluator-loops.md +25 -0
  319. package/src/internal-skills/skill-writer/references/workflow-mechanics/orchestrator-workers.md +25 -0
  320. package/src/internal-skills/skill-writer/references/workflow-mechanics/parallel-workflows.md +21 -0
  321. package/src/internal-skills/skill-writer/references/workflow-mechanics/plan-validate-execute.md +26 -0
  322. package/src/internal-skills/skill-writer/references/workflow-mechanics/prompt-chaining.md +24 -0
  323. package/src/internal-skills/skill-writer/references/workflow-mechanics/routing-workflows.md +28 -0
  324. package/src/internal-skills/skill-writer/references/workflow-mechanics/validation-loops.md +26 -0
  325. package/src/internal-skills/skill-writer/scripts/quick_validate.py +158 -0
  326. package/src/internal-skills/skill-writer/scripts/quick_validate_test.py +79 -0
@@ -0,0 +1,24 @@
1
+ # Issue Phase
2
+
3
+ Create a tracking issue that ties all generated PRs together and gives reviewers one overview.
4
+
5
+ ## Run
6
+
7
+ ```bash
8
+ uv run <skill-root>/scripts/create_issue.py ${SWEEP_DIR}
9
+ ```
10
+
11
+ ## Process
12
+
13
+ 1. Parse the JSON stdout.
14
+ 2. Save `issueUrl` and `issueNumber`.
15
+ 3. If the script fails, show the error and continue to the patch phase. PRs can still be created without a tracking issue.
16
+ 4. Update the checklist: Phase 3 complete.
17
+
18
+ ## Report Template
19
+
20
+ ```markdown
21
+ ## Tracking Issue Created
22
+
23
+ {issueUrl}
24
+ ```
@@ -0,0 +1,31 @@
1
+ # Organize Phase
2
+
3
+ Finalize sweep artifacts, security views, PR links, and the summary report.
4
+
5
+ ## Run
6
+
7
+ ```bash
8
+ uv run <skill-root>/scripts/organize.py ${SWEEP_DIR}
9
+ ```
10
+
11
+ ## Process
12
+
13
+ 1. Parse the JSON stdout.
14
+ 2. Confirm `summary.md` and `data/report.json` were produced.
15
+ 3. If the script fails, show the error and note which phases completed.
16
+ 4. Update the checklist: Phase 5 complete.
17
+
18
+ ## Report Template
19
+
20
+ ```markdown
21
+ ## Sweep Complete
22
+
23
+ | Metric | Count |
24
+ |--------|-------|
25
+ | Files scanned | {filesScanned} |
26
+ | Findings verified | {verified} |
27
+ | PRs created | {prsCreated} |
28
+ | Security findings | {securityFindings} |
29
+
30
+ Full report: `{summaryPath}`
31
+ ```
@@ -0,0 +1,142 @@
1
+ # Patch Phase
2
+
3
+ Create isolated fixes for verified findings and open draft PRs.
4
+
5
+ ## Contents
6
+
7
+ - Rules
8
+ - Setup
9
+ - Per-Finding Process
10
+ - Dedup Check
11
+ - Worktree, Fix, Reviewers, And PR
12
+ - Report Template
13
+
14
+ ## Rules
15
+
16
+ - Patch high-severity and above.
17
+ - Patch medium findings only when they come from bug-detection skills such as `code-review` or `security-review`.
18
+ - Skip low and info findings.
19
+ - Process findings sequentially.
20
+ - Create one worktree and one branch per finding.
21
+ - Clean up worktrees after success or failure.
22
+
23
+ ## Setup
24
+
25
+ Index existing PRs before patching:
26
+
27
+ ```bash
28
+ uv run <skill-root>/scripts/index_prs.py ${SWEEP_DIR}
29
+ ```
30
+
31
+ Parse the JSON stdout and use `fileIndex` for dedup checks.
32
+
33
+ Determine the default branch and fetch latest:
34
+
35
+ ```bash
36
+ DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
37
+ git fetch origin "${DEFAULT_BRANCH}"
38
+ ```
39
+
40
+ ## Per-Finding Process
41
+
42
+ For each finding in `data/verified.jsonl`:
43
+
44
+ 1. If the finding ID already exists in `data/patches.jsonl`, skip it.
45
+ 2. Run the dedup check.
46
+ 3. Create a worktree.
47
+ 4. Apply the fix using `references/patch-prompt.md`.
48
+ 5. If the patch task returns `"status": "skipped"`, record an error, clean up the worktree, and continue.
49
+ 6. Find reviewers.
50
+ 7. Push the branch.
51
+ 8. Create a draft PR.
52
+ 9. Record the result in `data/patches.jsonl`.
53
+ 10. Clean up the worktree.
54
+
55
+ ## Dedup Check
56
+
57
+ Use the file index from `index_prs.py`:
58
+
59
+ 1. File match: if no open Warden PR touches the finding file, proceed.
60
+ 2. Chunk overlap: if a PR touches the same file, read `data/pr-diffs/<number>.diff` and check whether changed hunks overlap or sit within roughly 10 lines of the finding range.
61
+ 3. Same concern: compare PR title and finding title/description.
62
+
63
+ Skip the finding only when there is both chunk overlap and the PR addresses the same concern. Record it with `"status": "existing"` and the matching `prUrl`.
64
+
65
+ ## Worktree, Fix, Reviewers, And PR
66
+
67
+ ```bash
68
+ BRANCH="warden-sweep/${RUN_ID}/${FINDING_ID}"
69
+ WORKTREE="${SWEEP_DIR}/worktrees/${FINDING_ID}"
70
+ git worktree add "${WORKTREE}" -b "${BRANCH}" "origin/${DEFAULT_BRANCH}"
71
+ ```
72
+
73
+ Each finding branches from the default branch so PRs contain only the fix commit.
74
+
75
+ Run patch work using the host agent's task/delegation mechanism when available. Read `references/patch-prompt.md` and substitute the finding values and worktree path into the `${...}` placeholders.
76
+
77
+ If delegated tasks are not available, apply the prompt instructions yourself in the worktree.
78
+
79
+ ```bash
80
+ uv run <skill-root>/scripts/find_reviewers.py "${FILE_PATH}"
81
+ ```
82
+
83
+ ```bash
84
+ cd "${WORKTREE}" && git push -u origin HEAD:"${BRANCH}"
85
+ ```
86
+
87
+ Create the PR with a short "what" summary followed by the finding description and verification reasoning:
88
+
89
+ ```bash
90
+ gh pr create --draft \
91
+ --label "warden" \
92
+ --title "fix: ${TITLE}" \
93
+ --body "$(cat <<'EOF'
94
+ ${FIX_WHAT_DESCRIPTION}
95
+
96
+ ${DESCRIPTION}
97
+
98
+ ${REASONING}
99
+
100
+ Automated fix for Warden finding ${FINDING_ID} (${SEVERITY}, detected by ${SKILL}).
101
+
102
+ <!-- Only include the next line if Phase 3 succeeded and ISSUE_NUMBER is available -->
103
+ Ref #${ISSUE_NUMBER}
104
+
105
+ > This PR was auto-generated by a Warden Sweep (run ${RUN_ID}).
106
+ > The finding has been validated through automated deep tracing,
107
+ > but human confirmation is requested as this is batch work.
108
+ EOF
109
+ )" ${REVIEWERS}
110
+ ```
111
+
112
+ ## Record Result
113
+
114
+ Append to `data/patches.jsonl`. Use `"created"` for successful PRs, not the patch task's `"applied"` status.
115
+
116
+ ```json
117
+ {"findingId": "...", "prUrl": "https://...", "branch": "...", "reviewers": ["user1", "user2"], "filesChanged": ["..."], "status": "created|existing|error"}
118
+ ```
119
+
120
+ Clean up:
121
+
122
+ ```bash
123
+ cd "$(git rev-parse --show-toplevel)"
124
+ git worktree remove "${WORKTREE}" --force
125
+ ```
126
+
127
+ On failure at any step, write `"status": "error"` with an `"error"` message, clean up the worktree, and continue.
128
+
129
+ Update the manifest: set `phases.patch` to `"complete"`.
130
+
131
+ ## Report Template
132
+
133
+ ```markdown
134
+ ## PRs Created
135
+
136
+ **{created}** created, **{skipped}** skipped (existing), **{failed}** failed.
137
+
138
+ | # | Finding | PR | Status |
139
+ |---|---------|----|--------|
140
+ | 1 | `security-review-a1b2c3d4` SQL injection in query builder | #142 | created |
141
+ | 2 | `code-review-e5f6g7h8` Null pointer in handler | - | existing (#138) |
142
+ ```
@@ -0,0 +1,51 @@
1
+ # Resume And Artifacts
2
+
3
+ Use this reference when resuming a partial sweep or inspecting generated files.
4
+
5
+ ## Resume Rules
6
+
7
+ Each phase is incremental:
8
+
9
+ 1. Check `data/manifest.json` for phase state.
10
+ 2. For scan, pass `--sweep-dir` to `scan.py`.
11
+ 3. For verify, skip existing `data/verify/<id>.json` files.
12
+ 4. For issue, `create_issue.py` skips if `issueUrl` exists in the manifest.
13
+ 5. For patch, skip existing entries in `data/patches.jsonl`.
14
+ 6. For organize, rerun safely.
15
+
16
+ Continue from the first incomplete phase. Do not start a new sweep unless the user asks for a clean run.
17
+
18
+ ## Output Directory Structure
19
+
20
+ ```text
21
+ .warden/sweeps/<run-id>/
22
+ summary.md # Stats, key findings, PR links
23
+ findings/ # One markdown per verified finding
24
+ <finding-id>.md
25
+ security/ # Security-specific view
26
+ index.jsonl # Security findings index
27
+ <finding-id>.md # Copies of security findings
28
+ data/ # Structured data for tooling
29
+ manifest.json # Run metadata, phase state
30
+ scan-index.jsonl # Per-file scan tracking
31
+ all-findings.jsonl # Every finding from scan
32
+ verified.jsonl # Findings that passed verification
33
+ rejected.jsonl # Findings that failed verification
34
+ patches.jsonl # Finding -> PR URL -> reviewers
35
+ existing-prs.json # Cached open Warden PRs
36
+ report.json # Machine-readable summary
37
+ verify/ # Individual verification results
38
+ <finding-id>.json
39
+ logs/ # Warden JSONL logs per file
40
+ <hash>.jsonl
41
+ pr-diffs/ # Cached PR diffs for dedup
42
+ <number>.diff
43
+ ```
44
+
45
+ ## Failure Handling
46
+
47
+ - Preserve partial artifacts.
48
+ - Record per-finding errors in the relevant JSONL file.
49
+ - Distinguish timed-out files from errored files.
50
+ - Clean up worktrees before retrying patch work.
51
+ - Re-run organize after manual recovery to refresh reports.
@@ -0,0 +1,46 @@
1
+ # Scan Phase
2
+
3
+ Run Warden across repository files and collect normalized findings.
4
+
5
+ ## Run
6
+
7
+ ```bash
8
+ uv run <skill-root>/scripts/scan.py
9
+ ```
10
+
11
+ To scan only specific files:
12
+
13
+ ```bash
14
+ uv run <skill-root>/scripts/scan.py src/foo.ts src/bar.ts
15
+ ```
16
+
17
+ To resume a partial scan:
18
+
19
+ ```bash
20
+ uv run <skill-root>/scripts/scan.py --sweep-dir .warden/sweeps/<run-id>
21
+ ```
22
+
23
+ ## Process
24
+
25
+ 1. Parse the JSON stdout.
26
+ 2. Save `runId` and `sweepDir`.
27
+ 3. Treat exit code `1` as fatal and stop.
28
+ 4. Treat exit code `2` as partial: report timed-out and errored files separately, then continue only if the user accepts the partial results.
29
+ 5. Render every finding from the `findings` array.
30
+ 6. Update the checklist: Phase 1 complete.
31
+
32
+ ## Report Template
33
+
34
+ ```markdown
35
+ ## Scan Complete
36
+
37
+ Scanned **{filesScanned}** files, **{filesTimedOut}** timed out, **{filesErrored}** errors.
38
+
39
+ ### Findings ({totalFindings} total)
40
+
41
+ | # | Severity | Skill | File | Title |
42
+ |---|----------|-------|------|-------|
43
+ | 1 | **HIGH** | security-review | `src/db/query.ts:42` | SQL injection in query builder |
44
+ ```
45
+
46
+ Bold severity for high and above.
@@ -0,0 +1,127 @@
1
+ # Script Interfaces
2
+
3
+ Use this reference before running Warden Sweep scripts. Run scripts from the repository root and pass the host skill-root path.
4
+
5
+ ## Contents
6
+
7
+ - `scan.py`
8
+ - `index_prs.py`
9
+ - `create_issue.py`
10
+ - `organize.py`
11
+ - `extract_findings.py`
12
+ - `generate_report.py`
13
+ - `find_reviewers.py`
14
+
15
+ ## `scripts/scan.py`
16
+
17
+ Runs setup and scan in one call: generates a run ID, creates the sweep directory, checks dependencies, creates the `warden` label, enumerates files, runs Warden per file, writes `scan-index.jsonl`, and extracts findings.
18
+
19
+ ```bash
20
+ uv run <skill-root>/scripts/scan.py [file ...]
21
+ uv run <skill-root>/scripts/scan.py --sweep-dir .warden/sweeps/<run-id>
22
+ ```
23
+
24
+ Stdout JSON:
25
+
26
+ ```json
27
+ {
28
+ "runId": "abc123",
29
+ "sweepDir": ".warden/sweeps/abc123",
30
+ "filesScanned": 10,
31
+ "filesTimedOut": 0,
32
+ "filesErrored": 0,
33
+ "totalFindings": 3,
34
+ "findings": []
35
+ }
36
+ ```
37
+
38
+ Exit codes: `0` success, `1` fatal error, `2` partial scan.
39
+
40
+ ## `scripts/index_prs.py`
41
+
42
+ Fetches open Warden-labeled PRs, builds a file-to-PR dedup index, and caches diffs for overlapping PRs.
43
+
44
+ ```bash
45
+ uv run <skill-root>/scripts/index_prs.py <sweep-dir>
46
+ ```
47
+
48
+ Stdout JSON includes `fileIndex`. Side effects:
49
+
50
+ - writes `data/existing-prs.json`
51
+ - writes `data/pr-diffs/<number>.diff` for overlapping PRs
52
+
53
+ ## `scripts/create_issue.py`
54
+
55
+ Creates a GitHub tracking issue summarizing verified sweep results.
56
+
57
+ ```bash
58
+ uv run <skill-root>/scripts/create_issue.py <sweep-dir>
59
+ ```
60
+
61
+ Stdout JSON:
62
+
63
+ ```json
64
+ {
65
+ "issueUrl": "https://github.com/owner/repo/issues/123",
66
+ "issueNumber": 123
67
+ }
68
+ ```
69
+
70
+ Idempotent: skips creation when `issueUrl` already exists in the manifest.
71
+
72
+ ## `scripts/organize.py`
73
+
74
+ Tags security findings, labels security PRs, updates finding reports with PR links, posts final results to the tracking issue, generates the summary report, and finalizes the manifest.
75
+
76
+ ```bash
77
+ uv run <skill-root>/scripts/organize.py <sweep-dir>
78
+ ```
79
+
80
+ Stdout JSON includes final sweep counts and report paths. Side effects:
81
+
82
+ - creates `security/index.jsonl`
83
+ - copies security finding reports to `security/`
84
+ - creates or reuses the `security` GitHub label
85
+ - labels security PRs
86
+ - appends PR links to `findings/*.md`
87
+ - writes `summary.md` and `data/report.json`
88
+ - updates `phases.organize` in `data/manifest.json`
89
+
90
+ ## `scripts/extract_findings.py`
91
+
92
+ Parses Warden JSONL log files and extracts normalized findings. Usually called by `scan.py`.
93
+
94
+ ```bash
95
+ uv run <skill-root>/scripts/extract_findings.py <log-path-or-directory> -o <output.jsonl>
96
+ ```
97
+
98
+ Writes one normalized finding per line to `<output.jsonl>`.
99
+
100
+ ## `scripts/generate_report.py`
101
+
102
+ Builds `summary.md` and `report.json` from sweep data. Usually called by `organize.py`.
103
+
104
+ ```bash
105
+ uv run <skill-root>/scripts/generate_report.py <sweep-dir>
106
+ ```
107
+
108
+ Side effects:
109
+
110
+ - writes `<sweep-dir>/summary.md`
111
+ - writes `<sweep-dir>/data/report.json`
112
+
113
+ ## `scripts/find_reviewers.py`
114
+
115
+ Finds the top two git contributors for a file from the last 12 months.
116
+
117
+ ```bash
118
+ uv run <skill-root>/scripts/find_reviewers.py <file-path>
119
+ ```
120
+
121
+ Stdout JSON:
122
+
123
+ ```json
124
+ {
125
+ "reviewers": ["user1", "user2"]
126
+ }
127
+ ```
@@ -0,0 +1,69 @@
1
+ # Verify Phase
2
+
3
+ Deep-trace every finding before patching. This phase qualifies true issues and rejects false positives.
4
+
5
+ ## Input
6
+
7
+ Read findings from:
8
+
9
+ ```text
10
+ <sweep-dir>/data/all-findings.jsonl
11
+ ```
12
+
13
+ ## Process
14
+
15
+ For each finding:
16
+
17
+ 1. If `data/verify/<finding-id>.json` exists, skip it.
18
+ 2. Launch verification work using the host agent's task/delegation mechanism when available. Process findings in parallel batches up to 8 if the host supports parallel work.
19
+ 3. Read `references/verify-prompt.md` and substitute the finding values into the `${...}` placeholders.
20
+ 4. Parse the returned JSON.
21
+ 5. Write the raw result to `data/verify/<finding-id>.json`.
22
+ 6. Append verified findings to `data/verified.jsonl`.
23
+ 7. Append rejected findings to `data/rejected.jsonl`.
24
+ 8. For verified findings, generate `findings/<finding-id>.md`.
25
+
26
+ If the host does not support delegated tasks, run the same verification prompt serially.
27
+
28
+ ## Verified Finding Report
29
+
30
+ ````markdown
31
+ # ${TITLE}
32
+
33
+ **ID**: ${FINDING_ID} | **Severity**: ${SEVERITY} | **Confidence**: ${CONFIDENCE}
34
+ **Skill**: ${SKILL} | **File**: ${FILE_PATH}:${START_LINE}
35
+
36
+ ## Description
37
+ ${DESCRIPTION}
38
+
39
+ ## Verification
40
+ **Verdict**: Verified (${VERIFICATION_CONFIDENCE})
41
+ **Reasoning**: ${REASONING}
42
+ **Code trace**: ${TRACE_NOTES}
43
+
44
+ ## Suggested Fix
45
+ ${FIX_DESCRIPTION}
46
+ ```diff
47
+ ${FIX_DIFF}
48
+ ```
49
+ ````
50
+
51
+ Update the manifest: set `phases.verify` to `"complete"`.
52
+
53
+ ## Report Template
54
+
55
+ ```markdown
56
+ ## Verification Complete
57
+
58
+ **{verified}** verified, **{rejected}** rejected.
59
+
60
+ ### Verified Findings
61
+
62
+ | # | Severity | Confidence | File | Title | Reasoning |
63
+ |---|----------|------------|------|-------|-----------|
64
+ | 1 | **HIGH** | high | `src/db/query.ts:42` | SQL injection in query builder | User input flows directly into... |
65
+
66
+ ### Rejected ({rejected_count})
67
+
68
+ - `{findingId}` {file}: {reasoning}
69
+ ```
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: security-review
3
+ description: Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
4
+ allowed-tools: Read Grep Glob
5
+ ---
6
+
7
+ You are a senior application security reviewer finding real, exploitable vulnerabilities in code changes for Warden's broad default security skill.
8
+ Keep the review simple and high-signal: trace source, boundary, sink, mitigation, and impact before reporting.
9
+
10
+ ## References
11
+
12
+ Load only matching references:
13
+
14
+ | Reference | Read When |
15
+ |-----------|-----------|
16
+ | `references/javascript-typescript.md` | Reviewing JavaScript, TypeScript, Node, React, Next.js, or browser code |
17
+ | `references/python.md` | Reviewing Python, Django, Flask, FastAPI, Celery, or Python service code |
18
+ | `references/github-workflows.md` | Reviewing GitHub Actions workflows, local actions, reusable workflows, or workflow-loaded scripts/config |
19
+
20
+ ## Finding Requirements
21
+
22
+ - Report a finding only when you can show attacker-controlled input, the vulnerable sink or missing guard, the security boundary, and concrete impact.
23
+ - Identify attacker-controlled input: request bodies, query strings, path params, cookies, headers, uploads, webhooks, OAuth callbacks, third-party callbacks, user-written database values, and caller-controlled service inputs.
24
+ - Identify the security boundary: login state, session, tenant, org, team, account, project, role, webhook signature, internal network, filesystem root, cache namespace, or paid quota.
25
+ - Follow imports, wrappers, middleware, validators, serializers, auth helpers, route definitions, shared utilities, sibling handlers, and framework conventions before reporting.
26
+ - Verify mitigations in the effective path. Parameterized queries, exact allowlists, safe URL fetchers, escaping, signature checks, handler-level auth, ownership checks, realpath containment, and quota controls can close the path.
27
+ - Treat pattern matches as leads. A dangerous API is not a vulnerability unless untrusted data can reach it without an effective mitigation.
28
+ - Prefer no finding over speculative hardening advice.
29
+
30
+ ## Investigation Process
31
+
32
+ 1. Read the changed hunk and target file enough to understand the effective execution path.
33
+ 2. Confirm the code is production-reachable. Return no findings for generated, vendored, test-only, fixture, example, migration, or build-output code unless it is actually shipped or invoked.
34
+ 3. Find security entry points: routes, server actions, RPC handlers, webhooks, service handlers, background jobs, serializers, clients, file operations, and network operations.
35
+ 4. Trace suspicious values from source to sink or missing guard.
36
+ 5. Read imported guards, validators, auth wrappers, schemas, middleware, shared utilities, and sibling handlers when they decide exploitability.
37
+ 6. Check whether mitigations block the real path, not just a nearby path.
38
+ 7. Report only when source, sink or missing guard, boundary, and impact are proven.
39
+
40
+ ## What To Report
41
+
42
+ | Category | Report When |
43
+ |----------|-------------|
44
+ | Authentication | Login, session, token, OAuth, SSO, reset, webhook, or service identity checks can be bypassed, spoofed, replayed, or confused. |
45
+ | Authorization | Tenant, org, team, account, project, role, owner, or resource checks are missing, inverted, stale, or performed on the wrong actor. |
46
+ | Injection and RCE | User input reaches SQL/NoSQL, shell, template, eval, deserialization, expression, or dynamic import sinks without parameterization or allowlisting. |
47
+ | XSS and unsafe HTML | User-controlled data reaches HTML, DOM, script, Markdown HTML, unsafe URLs, or framework escape hatches without context-correct escaping or sanitization. |
48
+ | SSRF and redirects | User-controlled URLs, hosts, redirects, callbacks, proxies, or fetchers can reach internal services, metadata endpoints, or trusted redirect flows. |
49
+ | Filesystem and uploads | User-controlled paths, archive entries, object keys, filenames, or uploads can escape an intended root, overwrite sensitive files, or become executable. |
50
+ | Secrets and data exposure | Real credentials, tokens, private keys, signed URLs, auth headers, cookies, PII, stack traces, or internal fields are exposed to untrusted users, clients, or logs. |
51
+ | Crypto and randomness | Weak hashes, predictable random values, static IVs, ECB mode, timing-unsafe compares, unsigned tokens, or custom crypto protect security-sensitive data. |
52
+ | Abuse controls | Sensitive or expensive operations such as login, MFA, invites, exports, password reset, billing, email, SMS, or paid API calls lack meaningful rate, quota, replay, or idempotency controls. |
53
+ | CI and workflows | Workflow changes let untrusted or caller-controlled code, text, artifacts, caches, or actions reach privileged execution, secrets, write tokens, releases, packages, deployments, or sensitive runners. |
54
+
55
+ ## Severity
56
+
57
+ | Level | Use For |
58
+ |-------|---------|
59
+ | high | Broad auth bypass, privilege escalation, cross-tenant sensitive data access, RCE, SQL/NoSQL injection over sensitive data, SSRF to internal services or cloud metadata, unsafe deserialization, production credential exposure, privileged CI execution, or destructive unauthorized actions. |
60
+ | medium | XSS with script execution, bounded path traversal, sensitive information disclosure, webhook side effects without verification, open redirects in auth/token flows, weak token validation, meaningful abuse of expensive or sensitive operations, or limited unauthorized data mutation. |
61
+ | low | Concrete defense-in-depth flaw with a plausible exploit path and limited impact. Do not use low for vague best-practice advice. |
62
+
63
+ - Tie-breaker: choose the lower severity when impact depends on unproven preconditions.
64
+
65
+ ## What Not To Report
66
+
67
+ - Code fully mitigated by a verified guard in the effective path.
68
+ - Sinks fed only by constants, trusted server-side values, test data, migrations, generated code, vendored code, examples, or build output.
69
+ - Generic dependency CVEs unless the changed code makes the vulnerable behavior reachable.
70
+ - Style, lint, maintainability, performance, missing comments, or generic best-practice recommendations.
71
+ - Public endpoints that intentionally expose non-sensitive data and have no sensitive side effect.
72
+ - Workflow style, actionlint issues, broad permissions, or mutable action refs without a traced path to execution, credential exposure, trusted artifacts, or privileged side effects.
73
+ - Secret-looking placeholders such as `example`, `test`, `dummy`, documented fake keys, or values confined to tests.
74
+ - Framework defaults that already escape, parameterize, validate, or authorize unless the code uses an unsafe escape hatch.
75
+
76
+ ## Finding Format
77
+
78
+ - Title: name the vulnerability and impact.
79
+ - Description: include source, sink or missing guard, boundary crossed, and attacker-visible consequence.
80
+ - `verification`: list checked files, functions, guards, or sibling paths.
81
+ - `suggestedFix`: include only when the fix is complete for the analyzed file.
@@ -0,0 +1,77 @@
1
+ # Security Review Skill Specification
2
+
3
+ ## Intent
4
+
5
+ The `security-review` skill is Warden's broad default application security scanner. It gives teams a usable first-pass security review without importing benchmark prompts or requiring language-specific setup.
6
+
7
+ It should catch common exploitable vulnerabilities in changed production code while avoiding noisy hardening advice.
8
+
9
+ ## Scope
10
+
11
+ In scope:
12
+
13
+ - Authentication, authorization, tenant isolation, identity, and service-boundary bugs.
14
+ - Injection, RCE, unsafe deserialization, XSS, SSRF, path traversal, unsafe redirects, webhook verification, secrets exposure, weak crypto, sensitive data exposure, and meaningful abuse-control gaps.
15
+ - General guidance that applies across web services and application code.
16
+ - Focused notes for JavaScript/TypeScript, Python, and GitHub Actions workflows.
17
+
18
+ Out of scope:
19
+
20
+ - Full dependency CVE triage without reachable changed code.
21
+ - Compliance checklists, infrastructure-only policy review, or exhaustive cloud IAM audits.
22
+ - Style, maintainability, performance, or non-security correctness bugs.
23
+ - Benchmark-specific prompt compatibility.
24
+ - Large language-specific catalogs in `SKILL.md`.
25
+
26
+ ## Users And Trigger Context
27
+
28
+ - Primary users: coding agents and Warden runs reviewing pull requests or local changes.
29
+ - Should trigger for: "security review", "scan for vulnerabilities", "appsec review", "OWASP check", "auth bypass", "XSS", "SQL injection", "SSRF", "path traversal", "secret exposure", or equivalent security-focused review requests.
30
+ - Should not trigger for: generic code review, prompt-writing help, Warden CLI usage, or broad architecture review with no security focus.
31
+
32
+ ## Runtime Contract
33
+
34
+ - Required first actions:
35
+ - Identify whether changed files are production code or test/generated/vendor/example code.
36
+ - Read the target file and any guards, helpers, middleware, validators, serializers, or sibling handlers needed to prove the path.
37
+ - Load only the matching language reference when it materially improves the review.
38
+ - Required finding evidence:
39
+ - attacker-controlled source
40
+ - vulnerable sink or missing guard
41
+ - crossed security boundary
42
+ - concrete attacker-visible impact
43
+ - verification details naming checked files/functions
44
+ - Required outputs:
45
+ - Warden findings only for high-confidence vulnerabilities.
46
+ - Empty findings when exploitability is not proven.
47
+ - Non-negotiable constraints:
48
+ - Do not report pattern-only suspicions.
49
+ - Do not lower the bar to create coverage.
50
+ - Do not add language-specific examples to `SKILL.md`; route them to `references/`.
51
+
52
+ ## Reference Architecture
53
+
54
+ - `SKILL.md` contains the broad review contract, category table, severity rubric, exclusions, and reference routing.
55
+ - `references/javascript-typescript.md` contains JS/TS/Node/React/Next-specific examples and false-positive controls.
56
+ - `references/python.md` contains Python/Django/Flask/FastAPI-specific examples and false-positive controls.
57
+ - `references/github-workflows.md` contains GitHub Actions workflow examples and false-positive controls.
58
+ - `scripts/`, `assets/`, and `references/evidence/` are unused until repeated evidence warrants them.
59
+
60
+ ## Evaluation
61
+
62
+ - Lightweight validation:
63
+ - Run the skill validator against `src/builtin-skills/security-review`.
64
+ - Verify every reference is directly routed from `SKILL.md`.
65
+ - Run init command tests that install bundled skills.
66
+ - Deeper evaluation:
67
+ - Add eval cases for SQL injection, XSS, SSRF, authz bypass, secrets, and safe counterexamples.
68
+ - Compare false positives against sanitized real Warden runs.
69
+ - Acceptance gates:
70
+ - `SKILL.md` stays concise enough to scan.
71
+ - Language-specific examples stay in references.
72
+ - Findings require exploitability evidence, not keyword matches.
73
+
74
+ ## Maintenance Notes
75
+
76
+ - Add a new language reference only when recurring findings need language-specific calibration.
77
+ - Keep examples minimal and transformed; do not store proprietary code.