hatch3r 1.0.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 (132) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +437 -0
  3. package/agents/hatch3r-a11y-auditor.md +126 -0
  4. package/agents/hatch3r-architect.md +160 -0
  5. package/agents/hatch3r-ci-watcher.md +123 -0
  6. package/agents/hatch3r-context-rules.md +97 -0
  7. package/agents/hatch3r-dependency-auditor.md +164 -0
  8. package/agents/hatch3r-devops.md +138 -0
  9. package/agents/hatch3r-docs-writer.md +97 -0
  10. package/agents/hatch3r-implementer.md +162 -0
  11. package/agents/hatch3r-learnings-loader.md +108 -0
  12. package/agents/hatch3r-lint-fixer.md +104 -0
  13. package/agents/hatch3r-perf-profiler.md +123 -0
  14. package/agents/hatch3r-researcher.md +642 -0
  15. package/agents/hatch3r-reviewer.md +81 -0
  16. package/agents/hatch3r-security-auditor.md +119 -0
  17. package/agents/hatch3r-test-writer.md +134 -0
  18. package/commands/hatch3r-agent-customize.md +146 -0
  19. package/commands/hatch3r-api-spec.md +49 -0
  20. package/commands/hatch3r-benchmark.md +50 -0
  21. package/commands/hatch3r-board-fill.md +504 -0
  22. package/commands/hatch3r-board-init.md +315 -0
  23. package/commands/hatch3r-board-pickup.md +672 -0
  24. package/commands/hatch3r-board-refresh.md +198 -0
  25. package/commands/hatch3r-board-shared.md +369 -0
  26. package/commands/hatch3r-bug-plan.md +410 -0
  27. package/commands/hatch3r-codebase-map.md +1182 -0
  28. package/commands/hatch3r-command-customize.md +94 -0
  29. package/commands/hatch3r-context-health.md +112 -0
  30. package/commands/hatch3r-cost-tracking.md +139 -0
  31. package/commands/hatch3r-dep-audit.md +171 -0
  32. package/commands/hatch3r-feature-plan.md +379 -0
  33. package/commands/hatch3r-healthcheck.md +307 -0
  34. package/commands/hatch3r-hooks.md +282 -0
  35. package/commands/hatch3r-learn.md +217 -0
  36. package/commands/hatch3r-migration-plan.md +51 -0
  37. package/commands/hatch3r-onboard.md +56 -0
  38. package/commands/hatch3r-project-spec.md +1153 -0
  39. package/commands/hatch3r-recipe.md +179 -0
  40. package/commands/hatch3r-refactor-plan.md +426 -0
  41. package/commands/hatch3r-release.md +328 -0
  42. package/commands/hatch3r-roadmap.md +556 -0
  43. package/commands/hatch3r-rule-customize.md +114 -0
  44. package/commands/hatch3r-security-audit.md +370 -0
  45. package/commands/hatch3r-skill-customize.md +93 -0
  46. package/commands/hatch3r-workflow.md +377 -0
  47. package/dist/cli/hooks-ZOTFDEA3.js +59 -0
  48. package/dist/cli/index.d.ts +2 -0
  49. package/dist/cli/index.js +3584 -0
  50. package/github-agents/hatch3r-docs-agent.md +46 -0
  51. package/github-agents/hatch3r-lint-agent.md +41 -0
  52. package/github-agents/hatch3r-security-agent.md +54 -0
  53. package/github-agents/hatch3r-test-agent.md +66 -0
  54. package/hooks/hatch3r-ci-failure.md +10 -0
  55. package/hooks/hatch3r-file-save.md +11 -0
  56. package/hooks/hatch3r-post-merge.md +10 -0
  57. package/hooks/hatch3r-pre-commit.md +11 -0
  58. package/hooks/hatch3r-pre-push.md +10 -0
  59. package/hooks/hatch3r-session-start.md +10 -0
  60. package/mcp/mcp.json +62 -0
  61. package/package.json +84 -0
  62. package/prompts/hatch3r-bug-triage.md +155 -0
  63. package/prompts/hatch3r-code-review.md +131 -0
  64. package/prompts/hatch3r-pr-description.md +173 -0
  65. package/rules/hatch3r-accessibility-standards.md +77 -0
  66. package/rules/hatch3r-accessibility-standards.mdc +75 -0
  67. package/rules/hatch3r-agent-orchestration.md +160 -0
  68. package/rules/hatch3r-api-design.md +176 -0
  69. package/rules/hatch3r-api-design.mdc +176 -0
  70. package/rules/hatch3r-browser-verification.md +73 -0
  71. package/rules/hatch3r-browser-verification.mdc +73 -0
  72. package/rules/hatch3r-ci-cd.md +70 -0
  73. package/rules/hatch3r-ci-cd.mdc +68 -0
  74. package/rules/hatch3r-code-standards.md +102 -0
  75. package/rules/hatch3r-code-standards.mdc +100 -0
  76. package/rules/hatch3r-component-conventions.md +102 -0
  77. package/rules/hatch3r-component-conventions.mdc +102 -0
  78. package/rules/hatch3r-data-classification.md +85 -0
  79. package/rules/hatch3r-data-classification.mdc +83 -0
  80. package/rules/hatch3r-dependency-management.md +17 -0
  81. package/rules/hatch3r-dependency-management.mdc +15 -0
  82. package/rules/hatch3r-error-handling.md +17 -0
  83. package/rules/hatch3r-error-handling.mdc +15 -0
  84. package/rules/hatch3r-feature-flags.md +112 -0
  85. package/rules/hatch3r-feature-flags.mdc +112 -0
  86. package/rules/hatch3r-git-conventions.md +47 -0
  87. package/rules/hatch3r-git-conventions.mdc +45 -0
  88. package/rules/hatch3r-i18n.md +90 -0
  89. package/rules/hatch3r-i18n.mdc +90 -0
  90. package/rules/hatch3r-learning-consult.md +29 -0
  91. package/rules/hatch3r-learning-consult.mdc +27 -0
  92. package/rules/hatch3r-migrations.md +17 -0
  93. package/rules/hatch3r-migrations.mdc +15 -0
  94. package/rules/hatch3r-observability.md +165 -0
  95. package/rules/hatch3r-observability.mdc +165 -0
  96. package/rules/hatch3r-performance-budgets.md +109 -0
  97. package/rules/hatch3r-performance-budgets.mdc +109 -0
  98. package/rules/hatch3r-secrets-management.md +76 -0
  99. package/rules/hatch3r-secrets-management.mdc +74 -0
  100. package/rules/hatch3r-security-patterns.md +211 -0
  101. package/rules/hatch3r-security-patterns.mdc +211 -0
  102. package/rules/hatch3r-testing.md +89 -0
  103. package/rules/hatch3r-testing.mdc +87 -0
  104. package/rules/hatch3r-theming.md +51 -0
  105. package/rules/hatch3r-theming.mdc +51 -0
  106. package/rules/hatch3r-tooling-hierarchy.md +92 -0
  107. package/rules/hatch3r-tooling-hierarchy.mdc +79 -0
  108. package/skills/hatch3r-a11y-audit/SKILL.md +131 -0
  109. package/skills/hatch3r-agent-customize/SKILL.md +75 -0
  110. package/skills/hatch3r-api-spec/SKILL.md +66 -0
  111. package/skills/hatch3r-architecture-review/SKILL.md +96 -0
  112. package/skills/hatch3r-bug-fix/SKILL.md +129 -0
  113. package/skills/hatch3r-ci-pipeline/SKILL.md +76 -0
  114. package/skills/hatch3r-command-customize/SKILL.md +67 -0
  115. package/skills/hatch3r-context-health/SKILL.md +76 -0
  116. package/skills/hatch3r-cost-tracking/SKILL.md +65 -0
  117. package/skills/hatch3r-dep-audit/SKILL.md +82 -0
  118. package/skills/hatch3r-feature/SKILL.md +129 -0
  119. package/skills/hatch3r-gh-agentic-workflows/SKILL.md +150 -0
  120. package/skills/hatch3r-incident-response/SKILL.md +86 -0
  121. package/skills/hatch3r-issue-workflow/SKILL.md +139 -0
  122. package/skills/hatch3r-logical-refactor/SKILL.md +73 -0
  123. package/skills/hatch3r-migration/SKILL.md +76 -0
  124. package/skills/hatch3r-perf-audit/SKILL.md +114 -0
  125. package/skills/hatch3r-pr-creation/SKILL.md +85 -0
  126. package/skills/hatch3r-qa-validation/SKILL.md +86 -0
  127. package/skills/hatch3r-recipe/SKILL.md +67 -0
  128. package/skills/hatch3r-refactor/SKILL.md +86 -0
  129. package/skills/hatch3r-release/SKILL.md +93 -0
  130. package/skills/hatch3r-rule-customize/SKILL.md +70 -0
  131. package/skills/hatch3r-skill-customize/SKILL.md +67 -0
  132. package/skills/hatch3r-visual-refactor/SKILL.md +89 -0
@@ -0,0 +1,370 @@
1
+ ---
2
+ id: hatch3r-security-audit
3
+ type: command
4
+ description: Create a full-product security audit epic with one sub-issue per project module
5
+ ---
6
+ # Security Audit — Full Product Security Audit
7
+
8
+ Create a security audit epic on **{owner}/{repo}** with one sub-issue per logical project module, plus cross-module trust boundary and OWASP alignment audits. Each sub-issue is a deep static-analysis security audit task that, when picked up by the board workflow, produces a findings epic with actionable sub-issues for hardening application security. The command only creates the initial audit epic — it does NOT execute any audits.
9
+
10
+ ---
11
+
12
+ ## Shared Context
13
+
14
+ **Read the project's shared board context at the start of the run** (e.g., `.cursor/commands/board-shared.md` or equivalent). It contains GitHub Context, Project Reference, Projects v2 sync procedure, and Board Overview template. Cache all values for the duration of this run.
15
+
16
+ ## Token-Saving Directives
17
+
18
+ Follow any **Token-Saving Directives** in the shared context file.
19
+
20
+ ---
21
+
22
+ ## Module Discovery
23
+
24
+ The product is divided into logical modules. Discover modules from the project structure:
25
+
26
+ 1. **Scan for modules:** Inspect top-level directories (e.g., `src/`, `functions/`, `packages/`) and identify logical units.
27
+ 2. **Map to security specs:** If `docs/specs/` exists, map each module to relevant security-related spec files (threat model, permissions, data model, privacy docs). If no security-specific specs exist, note the gap.
28
+ 3. **Build taxonomy:** Produce a table of modules with their directories and security-relevant specs.
29
+
30
+ Example structure (adapt to project):
31
+
32
+ | # | Module | Directories | Security Specs |
33
+ |---|--------|-------------|----------------|
34
+ | 1 | Auth | `src/auth/` | `05_permissions.md`, `09_threat-model.md` |
35
+ | 2 | API | `functions/api/` | `04_api-design.md` |
36
+ | ... | ... | ... | ... |
37
+
38
+ Plus two cross-cutting audits:
39
+
40
+ | # | Audit | Scope |
41
+ |---|-------|-------|
42
+ | T | Cross-Module Trust Boundaries | Trust assumptions, data flow security, privilege escalation paths across modules |
43
+ | O | OWASP Top 10 & Compliance Alignment | OWASP Top 10 coverage, infrastructure security, deployment configuration |
44
+
45
+ ---
46
+
47
+ ## Workflow
48
+
49
+ Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
50
+
51
+ ### Step 1: Load Context & Pre-Flight Check
52
+
53
+ 1. Read the shared board context and cache GitHub Context, Projects v2 config, and sync procedure.
54
+ 2. If security-relevant documentation exists (threat model, permissions spec, privacy docs), read the first 30 lines of each for TOC/section headers.
55
+ 3. Scan for existing security audit epics: `search_issues` with `owner: {owner}`, `repo: {repo}`, query `label:meta:security-audit state:open`.
56
+ 4. If an open security audit epic exists:
57
+
58
+ **ASK:** "An open security audit epic already exists: #{number} — {title}. (a) Abort, (b) close the existing one and create a new security audit, (c) proceed and create a second security audit."
59
+
60
+ 5. Fetch all open issues (`list_issues`, paginate, exclude `meta:board-overview`). Cache for Board Overview regeneration in Step 7.
61
+
62
+ ---
63
+
64
+ ### Step 2: Determine Audit Modules
65
+
66
+ 1. Build the module taxonomy from directory structure (see Module Discovery above).
67
+ 2. If the user specified specific modules in their invocation, filter the taxonomy to only those modules. The two cross-cutting audits (Trust Boundaries, OWASP) are always included unless the user explicitly excludes them.
68
+ 3. Validate that the directories for each selected module exist in the workspace. Warn if any directory is missing.
69
+
70
+ Present the selected modules:
71
+
72
+ ```
73
+ Security Audit Scope:
74
+
75
+ Level 1 (parallel):
76
+ 1. {Module 1} — {path}/
77
+ 2. {Module 2} — {path}/
78
+ ...
79
+
80
+ Level 2 (after all Level 1 complete):
81
+ T. Cross-Module Trust Boundaries — trust assumptions + data flow security
82
+ O. OWASP Top 10 & Compliance Alignment — OWASP coverage + infrastructure
83
+ ```
84
+
85
+ **ASK:** "These modules will be audited for security. Confirm, add, or remove modules."
86
+
87
+ ---
88
+
89
+ ### Step 3: Create Security Audit Epic
90
+
91
+ Create the parent epic via `issue_write` with `method: create`, `owner: {owner}`, `repo: {repo}`.
92
+
93
+ **Title:** `[Security Audit]: Full Product Security Audit`
94
+
95
+ **Labels:** `type:epic`, `meta:security-audit`, `status:ready`, `executor:agent`, `priority:p0`, `area:security`
96
+
97
+ **Body:**
98
+
99
+ ```markdown
100
+ ## Overview
101
+
102
+ Full-product security audit covering {N} logical modules plus cross-module trust boundary analysis and OWASP Top 10 alignment. Each sub-issue performs a deep static security analysis of one module across 8 security domains and produces a findings epic with actionable sub-issues for hardening application security.
103
+
104
+ ## Sub-Issues
105
+
106
+ ### Level 1 — Module Security Audits (parallel)
107
+
108
+ - [ ] #{part-1} — Security Audit: {Module 1}
109
+ - [ ] #{part-2} — Security Audit: {Module 2}
110
+ ...
111
+
112
+ ### Level 2 — Cross-Cutting Security Audits (after all Level 1)
113
+
114
+ - [ ] #{trust} — Security Audit: Cross-Module Trust Boundaries
115
+ - [ ] #{owasp} — Security Audit: OWASP Top 10 & Compliance Alignment
116
+
117
+ ## Implementation Order
118
+
119
+ ### 1
120
+
121
+ - [ ] #{part-1} — Security Audit: {Module 1}
122
+ - [ ] #{part-2} — Security Audit: {Module 2}
123
+ ...all module audits...
124
+
125
+ ### 2 -- after #{part-1}, #{part-2}, ... #{part-N}
126
+
127
+ - [ ] #{trust} — Security Audit: Cross-Module Trust Boundaries
128
+ - [ ] #{owasp} — Security Audit: OWASP Top 10 & Compliance Alignment
129
+
130
+ ## Acceptance Criteria
131
+
132
+ - [ ] All sub-issue security audits completed
133
+ - [ ] One findings epic created per audited module (with `meta:security-audit-findings` label)
134
+ - [ ] All findings epics have sub-issues with acceptance criteria
135
+ - [ ] All findings epics integrated into Projects v2 board
136
+ - [ ] Cross-cutting findings epics have correct dependencies on module findings epics
137
+ - [ ] All critical/high severity findings have sub-issues (none suppressed)
138
+
139
+ ## Dependencies
140
+
141
+ None.
142
+ ```
143
+
144
+ Record the returned `number` and internal numeric `id` for the epic.
145
+
146
+ ---
147
+
148
+ ### Step 4: Create Module Security Audit Sub-Issues
149
+
150
+ For each module in the selected taxonomy, create a sub-issue via `issue_write` with `method: create`.
151
+
152
+ **Title:** `Security Audit: {Module Name}`
153
+
154
+ **Labels:** `type:security-audit`, `status:ready`, `executor:agent`, `priority:p0`
155
+
156
+ **Body:** Use the Module Security Audit Sub-Issue Template below, filling in the module-specific fields.
157
+
158
+ After creating each sub-issue, link it to the parent epic via `sub_issue_write` with `method: add`, using the parent `issue_number` and the child's internal numeric `id`.
159
+
160
+ Record all returned sub-issue numbers for use in Step 5.
161
+
162
+ #### Module Security Audit Sub-Issue Template
163
+
164
+ ```markdown
165
+ ## Security Audit: {Module Name}
166
+
167
+ > Parent: #{security-audit-epic-number} — [Security Audit]: Full Product Security Audit
168
+
169
+ ### Scope
170
+
171
+ **Directories:** {comma-separated directory paths from taxonomy}
172
+ **Security Specs:** {security-relevant spec filenames from taxonomy, or "None — flag as gap" if missing}
173
+ **Test Directories:** Search `tests/rules/`, `tests/security/`, `tests/integration/`, `tests/e2e/` for security-related test files matching this module.
174
+
175
+ ### Audit Protocol
176
+
177
+ Perform a deep static security analysis of this module. Do NOT execute tests or modify code — review source files, spec documents, configuration, and existing security test files only.
178
+
179
+ #### 1. Authentication & Authorization
180
+
181
+ - Identify all auth flows within this module (login, token refresh, session creation)
182
+ - Verify auth tokens are validated on every protected endpoint or entry point
183
+ - Check session management: expiry, rotation, invalidation on logout/password change
184
+ - Assess RBAC/permission enforcement: are role checks server-side and consistent?
185
+ - Look for privilege escalation paths: can a lower-privilege user reach higher-privilege operations?
186
+
187
+ #### 2. Input Validation & Sanitization
188
+
189
+ - Identify all external input entry points (API params, form fields, URL params, file uploads, headers)
190
+ - Check for injection vulnerabilities: XSS, SQL injection, NoSQL injection, command injection, template injection
191
+ - Verify type coercion and boundary validation at module entry points
192
+ - Assess encoding/escaping before output (HTML, JSON, SQL, shell)
193
+ - Check file upload handling: type validation, size limits, path traversal prevention
194
+
195
+ #### 3. Data Protection & Privacy
196
+
197
+ - Check encryption: data at rest (database fields, file storage) and in transit (TLS enforcement)
198
+ - Identify PII handling: what personal data flows through this module?
199
+ - Verify data exposure: are responses filtered to exclude sensitive fields?
200
+ - Check logging hygiene: no PII, tokens, passwords, or sensitive data in log output
201
+ - Assess privacy invariant adherence per project security/privacy docs
202
+ - Check data retention and deletion capabilities
203
+
204
+ #### 4. Access Control
205
+
206
+ - Audit database/storage security rules for this module's collections/tables
207
+ - Verify least privilege: does each operation use minimum required permissions?
208
+ - Check entitlement enforcement: are entitlements validated server-side only?
209
+ - Assess file/resource permission models
210
+ - Look for direct object reference vulnerabilities (IDOR)
211
+
212
+ #### 5. Secret Management
213
+
214
+ - Scan for hardcoded secrets, API keys, credentials, or tokens in source files
215
+ - Verify environment variable usage for all secrets and configuration
216
+ - Check for secret exposure in error messages, stack traces, or client-side bundles
217
+ - Assess secret rotation capabilities and documentation
218
+ - Verify `.gitignore` and build pipeline exclude sensitive files
219
+
220
+ #### 6. Error Handling & Information Leakage
221
+
222
+ - Check error responses: no stack traces, internal paths, or system info exposed to clients
223
+ - Verify debug endpoints and verbose logging are disabled in production configuration
224
+ - Assess error messages for sensitive data leakage (user IDs, internal state, query details)
225
+ - Check for catch-all error handlers that may swallow security-relevant failures silently
226
+ - Verify logging captures security events (auth failures, permission denials, anomalous input)
227
+
228
+ #### 7. API & Endpoint Security
229
+
230
+ - Verify auth is enforced on all endpoints (no unprotected routes serving sensitive data)
231
+ - Check rate limiting configuration on auth and sensitive endpoints
232
+ - Assess CORS configuration: is it restrictive and intentional?
233
+ - Verify response filtering: no over-fetching of data sent to clients
234
+ - Check webhook endpoints for signature verification
235
+ - Assess API versioning and deprecation for security implications
236
+
237
+ #### 8. AI & Agentic Security (OWASP Agentic Top 10)
238
+
239
+ - **ASI01 — Agent Goal Hijack:** Check for system prompt leakage, input sanitization before LLM processing, instruction hierarchy enforcement, indirect prompt injection via retrieved content
240
+ - **ASI02 — Tool Misuse & Exploitation:** Verify tool access controls, parameter validation on tool calls, deny-by-default tool permissions, tool call rate limiting
241
+ - **ASI03 — Identity & Privilege Abuse:** Check for unique agent identification, action attribution, non-repudiation mechanisms, agent impersonation prevention
242
+ - **ASI04 — Supply Chain Vulnerabilities:** Audit MCP server sources, version pinning, package integrity verification, auto-install risks (npx -y)
243
+ - **ASI05 — Unexpected Code Execution:** Check for sandboxed execution environments, code review before execution, restricted file system access, network isolation
244
+ - **ASI06 — Memory & Context Poisoning:** Verify context validation before reuse, memory expiry mechanisms, tamper detection for stored agent state, RAG content validation
245
+ - **ASI07 — Insecure Inter-Agent Communication:** Check agent-to-agent authentication, scoped delegation tokens, message integrity, privilege boundaries between agents
246
+ - **ASI08 — Cascading Failures:** Assess error propagation across agent chains, circuit breakers, timeout enforcement, blast radius containment
247
+ - **ASI09 — Human-Agent Trust Exploitation:** Verify confirmation checkpoints for destructive actions, cost limit enforcement, social engineering resistance, action transparency
248
+ - **ASI10 — Rogue Agents:** Check for behavioral monitoring, output validation, scope enforcement, kill switches, anomaly detection
249
+
250
+ ### Output — Findings Epic
251
+
252
+ After completing the audit, create a findings epic on GitHub.
253
+
254
+ **Create via `issue_write`:**
255
+
256
+ - **Title:** `[Security Findings]: {Module Name}`
257
+ - **Labels:** `type:epic`, `meta:security-audit-findings`, `status:ready`, `executor:agent`, `priority:p0`
258
+ - **Body:** Overview of findings count and severity, sub-issues checklist, implementation order, acceptance criteria ("done when all finding sub-issues are resolved").
259
+
260
+ **Create sub-issues** — one per actionable finding. Each must include:
261
+
262
+ - Security domain reference (1–8) for traceability
263
+ - Problem description with evidence (file paths, line references, spec section)
264
+ - Risk assessment: severity (critical/high/medium/low), exploitability, blast radius
265
+ - Suggested fix approach
266
+ - Acceptance criteria (specific and testable)
267
+ - Labels: `type:bug` for vulnerabilities, `type:security-audit` for hardening improvements, plus `area:security` and relevant `area:*` label
268
+
269
+ **Link sub-issues** to the findings epic via `sub_issue_write`.
270
+
271
+ **Board integration** — for the findings epic and every sub-issue:
272
+
273
+ Follow the **Projects v2 Sync Procedure** from `hatch3r-board-shared` (gh CLI primary). Set status to Ready using the project's status field option ID.
274
+
275
+ ### Completion
276
+
277
+ Return to the parent orchestrator with:
278
+
279
+ - Findings epic issue number
280
+ - Total findings count
281
+ - Breakdown by security domain (1. Auth, 2. Input, 3. Data, 4. Access, 5. Secrets, 6. Errors, 7. API, 8. AI/Agentic)
282
+ - Severity distribution (critical / high / medium / low)
283
+ - Any blockers encountered
284
+ ```
285
+
286
+ ---
287
+
288
+ ### Step 5: Create Cross-Cutting Security Audit Sub-Issues
289
+
290
+ Create two additional sub-issues with dependencies on all module audit sub-issues.
291
+
292
+ #### 5a. Cross-Module Trust Boundaries Audit
293
+
294
+ **Title:** `Security Audit: Cross-Module Trust Boundaries`
295
+
296
+ **Labels:** `type:security-audit`, `status:ready`, `executor:agent`, `priority:p0`, `has-dependencies`
297
+
298
+ **Body:** Scope: Analyze trust assumptions and security boundaries between all project modules. This audit runs AFTER all module audits complete — use their findings for additional context.
299
+
300
+ Audit areas:
301
+ - Trust assumptions: which modules trust input from other modules without re-validation?
302
+ - Data flow security: does sensitive data cross module boundaries unprotected?
303
+ - Privilege escalation: can chaining operations across modules bypass access controls?
304
+ - Shared state: are shared caches, sessions, or databases accessed with consistent authorization?
305
+ - Service-to-service auth: are internal API calls authenticated and authorized?
306
+
307
+ Follow the same Output — Findings Epic instructions as module audits (title prefix: `[Security Findings]`, label: `meta:security-audit-findings`). Include Dependencies section: Blocked by #{part-audit-1}, #{part-audit-2}, ... #{part-audit-N}
308
+
309
+ Link to parent epic via `sub_issue_write`.
310
+
311
+ #### 5b. OWASP Top 10 & Compliance Alignment Audit
312
+
313
+ **Title:** `Security Audit: OWASP Top 10 & Compliance Alignment`
314
+
315
+ **Labels:** `type:security-audit`, `status:ready`, `executor:agent`, `priority:p0`, `has-dependencies`
316
+
317
+ **Body:** Scope: Map all module audit findings against the OWASP Top 10 (2025) and OWASP Top 10 for Agentic Applications (2025) and assess infrastructure/deployment security posture. This audit runs AFTER all module audits complete.
318
+
319
+ Audit areas:
320
+ - Map each module finding to the relevant OWASP Top 10 category (A01–A10) and OWASP Agentic Top 10 category (ASI01–ASI10)
321
+ - Identify OWASP categories (both traditional and agentic) with no findings — assess whether coverage is complete or audits missed them
322
+ - Infrastructure security: cloud configuration, container security, network policies
323
+ - Deployment security: CI/CD pipeline security, artifact signing, environment isolation
324
+ - Dependency security posture: cross-reference with latest dep-audit results if available
325
+ - Security testing coverage: are there automated security tests (SAST, DAST, security rules tests)?
326
+
327
+ Follow the same Output — Findings Epic instructions. Include Dependencies section: Blocked by #{part-audit-1}, #{part-audit-2}, ... #{part-audit-N}
328
+
329
+ Link to parent epic via `sub_issue_write`.
330
+
331
+ ---
332
+
333
+ ### Step 6: Finalize Epic & Set Dependencies
334
+
335
+ 1. **Update the security audit epic body** with the actual sub-issue numbers in the Sub-Issues checklist and Implementation Order section. Use `issue_write` with `method: update`.
336
+
337
+ 2. **Verify dependency sections** on the trust boundaries and OWASP sub-issues contain the correct module audit sub-issue numbers.
338
+
339
+ 3. Present a summary with epic number, sub-issues, and total count.
340
+
341
+ ---
342
+
343
+ ### Step 7: Board Integration
344
+
345
+ 1. **Projects v2 Sync:** Follow the **Projects v2 Sync Procedure** from `hatch3r-board-shared` (gh CLI primary) for the security audit epic and ALL sub-issues. Set status to Ready using the project's status field option ID.
346
+
347
+ 2. **Board Overview Regeneration:** Regenerate the Board Overview using the **Board Overview Template** from the shared context. Use cached board data from Step 1, updated with the newly created security audit epic. Skip silently if no board overview issue exists.
348
+
349
+ ---
350
+
351
+ ## Error Handling
352
+
353
+ - `search_issues` failure: retry once, then warn and proceed (assume no existing security audit).
354
+ - `issue_write` failure: report the error, retry once. If still failing, present the drafted body for manual creation.
355
+ - `sub_issue_write` failure: report but do not delete the created sub-issue. Note the unlinking for manual fix.
356
+ - Projects v2 sync failure (gh CLI or MCP): warn and continue. Board sync can be fixed later via board-refresh.
357
+
358
+ ## Guardrails
359
+
360
+ - **Never skip ASK checkpoints.**
361
+ - **Use GitHub MCP tools for issue operations** (create, update, link). For Projects v2 board integration, follow the sync procedure from hatch3r-board-shared (gh CLI primary).
362
+ - **The command ONLY creates issues.** It does NOT execute any audits, run tests, or modify code.
363
+ - **Always include the `meta:security-audit` label** on the security audit epic.
364
+ - **Always include `meta:security-audit-findings`** in the output instructions for audit sub-issues.
365
+ - **Preserve dependency ordering.** Level 2 sub-issues must reference all Level 1 sub-issues in their Dependencies section.
366
+ - **Never downgrade finding severity without explicit user approval.**
367
+ - **Critical/high severity findings must always generate sub-issues.** Never suppress or skip a critical or high severity finding.
368
+ - **All findings must reference the security domain (1–8)** they belong to for traceability.
369
+ - **Board Overview is auto-maintained.** Exclude it from all analysis. One board overview issue at a time.
370
+ - **Do not expand scope.** The command creates exactly the discovered modules plus the two cross-cutting audits. No additional issue types.
@@ -0,0 +1,93 @@
1
+ ---
2
+ id: hatch3r-skill-customize
3
+ type: command
4
+ description: Configure per-skill customization including description overrides, enable/disable control, and project-specific markdown instructions
5
+ ---
6
+ # Skill Customization — Per-Skill Configuration
7
+
8
+ Customize individual skill behavior for project-specific needs via `.hatch3r/skills/` configuration files. Supports structured YAML overrides and free-form markdown instruction injection, all propagated to every adapter output on sync.
9
+
10
+ ---
11
+
12
+ ## Customization File Locations
13
+
14
+ Each skill supports two optional customization files:
15
+
16
+ ```
17
+ .hatch3r/skills/{skill-id}.customize.yaml # structured overrides
18
+ .hatch3r/skills/{skill-id}.customize.md # free-form markdown instructions
19
+ ```
20
+
21
+ Both files are optional and can be used independently or together.
22
+
23
+ ## YAML Customization Schema
24
+
25
+ ```yaml
26
+ skill: hatch3r-issue-workflow
27
+ description: "Issue workflow with mandatory security review step"
28
+ enabled: true
29
+ ```
30
+
31
+ ### Fields
32
+
33
+ | Field | Type | Default | Description |
34
+ |-------|------|---------|-------------|
35
+ | `description` | string | (from canonical) | Override the skill's description in adapter frontmatter |
36
+ | `enabled` | boolean | `true` | Set to `false` to exclude this skill from adapter output generation |
37
+
38
+ ## Markdown Customization
39
+
40
+ Create `.hatch3r/skills/{skill-id}.customize.md` with free-form markdown to inject project-specific instructions into the skill's managed block. This content is appended after the canonical skill definition under a `## Project Customizations` header.
41
+
42
+ ### Example
43
+
44
+ **File:** `.hatch3r/skills/hatch3r-issue-workflow.customize.md`
45
+
46
+ ```markdown
47
+ ## Project-Specific Workflow Steps
48
+
49
+ Before starting any issue implementation:
50
+
51
+ 1. Check the `docs/security-checklist.md` for applicable security controls
52
+ 2. Run `npm run check:deps` to verify no new vulnerability advisories
53
+ 3. If the issue touches API endpoints, update the OpenAPI spec in `docs/api/`
54
+
55
+ ### Required Labels
56
+
57
+ All PRs must include at least one of: `feature`, `bugfix`, `refactor`, `docs`, `chore`
58
+ ```
59
+
60
+ ### How It Works
61
+
62
+ 1. During `hatch3r sync`, adapters read the `.customize.md` file
63
+ 2. The markdown content is appended inside the managed block, after the canonical skill content
64
+ 3. All adapter outputs receive the customization automatically
65
+ 4. Changes propagate on every sync
66
+
67
+ ## Disabling a Skill
68
+
69
+ To exclude a skill from adapter output without deleting its canonical file:
70
+
71
+ ```yaml
72
+ # .hatch3r/skills/hatch3r-visual-refactor.customize.yaml
73
+ enabled: false
74
+ ```
75
+
76
+ ## Workflow
77
+
78
+ 1. Identify which skill to customize
79
+ 2. Create `.hatch3r/skills/{skill-id}.customize.yaml` and/or `.customize.md`
80
+ 3. Run `npx hatch3r sync` to propagate changes to all adapter outputs
81
+ 4. Verify the customization appears in the tool-specific skill files
82
+
83
+ ## Guardrails
84
+
85
+ - Customization files cannot remove the skill's core workflow steps
86
+ - Invalid YAML produces warnings but does not prevent skill execution (graceful degradation)
87
+ - Customization files should be committed to the repository
88
+
89
+ ## Related
90
+
91
+ - Agent customization: `hatch3r-agent-customize` command
92
+ - Command customization: `hatch3r-command-customize` command
93
+ - Rule customization: `hatch3r-rule-customize` command