heimdall-agent 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -26
- package/README.pt-BR.md +443 -0
- package/agents/cloud-engineer.md +77 -0
- package/agents/code-sentinel.md +71 -34
- package/agents/database-architect.md +31 -25
- package/agents/frontend-designer.md +30 -28
- package/agents/mobile-designer.md +25 -24
- package/agents/modernizer.md +68 -0
- package/agents/orchestrator.md +107 -93
- package/agents/reviewer.md +102 -71
- package/agents/security-auditor.md +27 -27
- package/agents/tester.md +97 -90
- package/commands/grill-me.md +20 -4
- package/commands/orchestrate.md +16 -0
- package/commands/orchestrator.md +16 -0
- package/commands/plan.md +17 -1
- package/config/agents.json +31 -3
- package/config/mcp.json +72 -0
- package/config/models.json +26 -16
- package/config/profiles.json +2 -4
- package/config/skills.json +762 -573
- package/docs/SKILLS.md +393 -275
- package/docs/designs/old/2026-10-31 plan-lifecycle-backlog-and-clean-code-skill.md +87 -0
- package/docs/designs/old/2026-11-02 skill-upstream-audit-and-update.md +105 -0
- package/docs/designs/old/2026-11-05 communication-doctrine-bluf-ste.md +94 -0
- package/docs/designs/old/2026-11-06-cloud-engineer-and-resilience-synthesis.md +67 -0
- package/docs/designs/old/2026-11-06-herdr-native-agent-orchestration.md +45 -0
- package/docs/runs/skill-audit/2026-11-12-compare-report.json +1028 -0
- package/docs/runs/skill-audit/2026-11-12-upstream-audit.json +275 -0
- package/docs/runs/skill-audit/add_progressive_disclosure.cjs +30 -0
- package/docs/runs/skill-audit/check_heimdall_skills.ps1 +9 -0
- package/docs/runs/skill-audit/compare_classics.ps1 +26 -0
- package/docs/runs/skill-audit/compare_taste.ps1 +12 -0
- package/docs/runs/skill-audit/customization-report.json +380 -0
- package/docs/runs/skill-audit/diff_pending_skills.cjs +94 -0
- package/docs/runs/skill-audit/fetch_and_apply_skill.cjs +58 -0
- package/docs/runs/skill-audit/fetch_and_apply_taste_v2.cjs +65 -0
- package/docs/runs/skill-audit/inspect_pending_skills.cjs +71 -0
- package/docs/runs/skill-audit/inventory.json +308 -0
- package/docs/runs/skill-audit/list_local_taste.ps1 +1 -0
- package/docs/runs/skill-audit/phase5-update-plan.json +595 -0
- package/docs/runs/skill-audit/phase5-update-plan.md +138 -0
- package/docs/runs/skill-audit/probe.ps1 +16 -0
- package/docs/runs/skill-audit/probe_classics_branches.ps1 +3 -0
- package/docs/runs/skill-audit/probe_commits.ps1 +15 -0
- package/docs/runs/skill-audit/probe_repos.ps1 +17 -0
- package/docs/runs/skill-audit/probe_sentry_sec.ps1 +3 -0
- package/docs/runs/skill-audit/probe_sentry_sweep.ps1 +5 -0
- package/docs/runs/skill-audit/probe_snyk.ps1 +3 -0
- package/docs/runs/skill-audit/probe_snyk_recipes.ps1 +5 -0
- package/docs/runs/skill-audit/probe_taste_branches.ps1 +8 -0
- package/docs/runs/skill-audit/probe_taste_v19.ps1 +3 -0
- package/docs/runs/skill-audit/probe_user_repos.ps1 +19 -0
- package/docs/runs/skill-audit/prune_taste_skills.cjs +22 -0
- package/docs/runs/skill-audit/run_phase1_2.cjs +142 -0
- package/docs/runs/skill-audit/run_phase6_verification.cjs +107 -0
- package/docs/runs/skill-audit/show_16_details.ps1 +25 -0
- package/docs/runs/skill-audit/show_20_skills.ps1 +28 -0
- package/docs/runs/skill-audit/show_classics_diff.cjs +37 -0
- package/docs/runs/skill-audit/sync_agent_markdowns.cjs +30 -0
- package/docs/runs/skill-audit/taste-skill-upstream.md +542 -0
- package/docs/runs/skill-audit/update-manifest.md +88 -0
- package/docs/runs/skill-audit/update_config_skills.cjs +52 -0
- package/docs/runs/skill-audit/update_registry_phase7.cjs +83 -0
- package/docs/runs/skill-audit/upstream-status.json +563 -0
- package/docs/runs/skill-audit/verification-results.json +252 -0
- package/doctrine/AGENTS.md +42 -77
- package/hooks/git/pre-commit +11 -0
- package/hooks/heimdall-hook.cjs +81 -2
- package/hooks/herdr-agent-state.ps1 +55 -0
- package/hooks/hooks.json +0 -11
- package/lib/catalog-sync.cjs +167 -0
- package/lib/hermes-context.cjs +57 -0
- package/lib/model-context.cjs +123 -0
- package/lib/path-discovery.cjs +94 -0
- package/package.json +7 -3
- package/playbooks/01-interactive-grilling-gate.md +23 -6
- package/playbooks/02-fast-code-deep-verification.md +3 -2
- package/playbooks/03-adversarial-code-review.md +15 -7
- package/playbooks/05-canonical-plan-template.md +35 -19
- package/playbooks/06-model-registry-matrix.md +24 -13
- package/playbooks/07-legacy-code-modernization.md +74 -0
- package/playbooks/08-backlog-and-change-request-flow.md +122 -0
- package/setup.mjs +592 -172
- package/skills/antislop/SKILL.md +76 -56
- package/skills/antislop/VERSION +1 -0
- package/skills/antislop-copywriting/SKILL.md +407 -372
- package/skills/antislop-human/LICENSE-web-quality-skills +21 -0
- package/skills/antislop-human/SKILL.md +204 -147
- package/skills/antislop-human/contrast-check.py +168 -165
- package/skills/antislop-human/contrast-mcp.py +6 -3
- package/skills/antislop-human/references/A11Y-PATTERNS.md +249 -0
- package/skills/antislop-human/references/WCAG.md +127 -0
- package/skills/antislop-ui/LICENSE-web-quality-skills +21 -0
- package/skills/antislop-ui/SKILL.md +344 -304
- package/skills/antislop-ui/references/CORE-WEB-VITALS.md +181 -0
- package/skills/antislop-ui/references/WEB-BASELINE.md +28 -0
- package/skills/brainstorming/SKILL.md +296 -265
- package/skills/brainstorming/builder-check-prompt.md +23 -0
- package/skills/brainstorming/scripts/frame-template.html +213 -213
- package/skills/brainstorming/scripts/server.cjs +723 -723
- package/skills/brandkit/SKILL.md +798 -798
- package/skills/brutalist-skill/SKILL.md +93 -92
- package/skills/caveman/README.md +68 -0
- package/skills/caveman/SKILL.md +73 -38
- package/skills/claude-collaborator/SKILL.md +24 -44
- package/skills/clean-code/SKILL.md +152 -0
- package/skills/cloudflare-security-audit/AI-AND-LLM.md +83 -83
- package/skills/cloudflare-security-audit/ATTACK-CLASSES.md +130 -130
- package/skills/cloudflare-security-audit/CLIENT-SIDE.md +83 -83
- package/skills/cloudflare-security-audit/CLOUD-AND-DEPLOYMENT.md +86 -86
- package/skills/cloudflare-security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -84
- package/skills/cloudflare-security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -89
- package/skills/cloudflare-security-audit/HUNTING.md +251 -251
- package/skills/cloudflare-security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -101
- package/skills/cloudflare-security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -81
- package/skills/cloudflare-security-audit/RECONNAISSANCE.md +156 -156
- package/skills/cloudflare-security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -78
- package/skills/cloudflare-security-audit/SKILL.md +192 -192
- package/skills/cloudflare-security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -73
- package/skills/cloudflare-security-audit/VALIDATION-AND-REPORTING.md +186 -186
- package/skills/cloudflare-security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -105
- package/skills/cloudflare-security-audit/report-schema.json +461 -461
- package/skills/cloudflare-security-audit/validate-coverage-ledger.cjs +872 -872
- package/skills/cloudflare-security-audit/validate-coverage-ledger.test.cjs +740 -740
- package/skills/cloudflare-security-audit/validate-findings.cjs +773 -773
- package/skills/cloudflare-security-audit/validate-findings.test.cjs +652 -652
- package/skills/codebase-design/DEEPENING.md +37 -0
- package/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/skills/codebase-design/SKILL.md +114 -0
- package/skills/codex-collaborator/SKILL.md +24 -45
- package/skills/communication-doctrine/SKILL.md +89 -0
- package/skills/diagnosing-superpowers/SKILL.md +1 -1
- package/skills/diagnosing-superpowers/references/github-issues.md +3 -3
- package/skills/diagnosing-superpowers/templates/issue.md +23 -4
- package/skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/skills/domain-modeling/GLOSSARY-FORMAT.md +60 -0
- package/skills/domain-modeling/SKILL.md +74 -0
- package/skills/executing-plans/SKILL.md +6 -56
- package/skills/executing-plans/scripts/task-done +52 -52
- package/skills/executing-plans/scripts/task-start +28 -28
- package/skills/gemini-collaborator/SKILL.md +24 -56
- package/skills/grill-me/SKILL.md +65 -0
- package/skills/handoff/SKILL.md +64 -0
- package/skills/herdr/SKILL.md +243 -0
- package/skills/image-to-code-skill/SKILL.md +1228 -1228
- package/skills/imagegen-frontend-mobile/SKILL.md +1465 -1465
- package/skills/imagegen-frontend-web/SKILL.md +987 -987
- package/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/skills/improve-codebase-architecture/SKILL.md +71 -0
- package/skills/karpathy-guidelines/SKILL.md +67 -67
- package/skills/mcp-engineering/SKILL.md +74 -0
- package/skills/minimalist-skill/SKILL.md +87 -85
- package/skills/output-skill/SKILL.md +49 -49
- package/skills/owasp-security/reference/config-and-supply-chain.md +346 -344
- package/skills/owasp-security/reference/languages.md +378 -372
- package/skills/owasp-security/reference/owasp-report.md +1144 -1140
- package/skills/owasp-security/reference/review-checklist.md +134 -132
- package/skills/ponytail/SKILL.md +36 -52
- package/skills/postgres-best-practices/SKILL.md +30 -52
- package/skills/postgres-best-practices/references/backup-restore.md +372 -0
- package/skills/postgres-best-practices/references/bulk-loading.md +315 -0
- package/skills/postgres-best-practices/references/connection-pooling.md +310 -0
- package/skills/postgres-best-practices/references/hot-standby.md +221 -0
- package/skills/postgres-best-practices/references/indexing.md +318 -0
- package/skills/postgres-best-practices/references/logical-replication.md +610 -0
- package/skills/postgres-best-practices/references/major-version-upgrades.md +334 -0
- package/skills/postgres-best-practices/references/performance-diagnostics.md +553 -0
- package/skills/postgres-best-practices/references/query-optimization.md +294 -0
- package/skills/postgres-best-practices/references/query-patterns.md +566 -0
- package/skills/postgres-best-practices/references/schema-design.md +362 -0
- package/skills/postgres-best-practices/references/security-roles.md +489 -0
- package/skills/postgres-best-practices/references/transaction-isolation.md +344 -0
- package/skills/progressive-disclosure/SKILL.md +68 -0
- package/skills/pstack-discipline/SKILL.md +40 -0
- package/skills/receiving-code-review/SKILL.md +2 -23
- package/skills/requesting-code-review/SKILL.md +7 -36
- package/skills/soft-skill/SKILL.md +99 -98
- package/skills/stitch-skill/DESIGN.md +121 -121
- package/skills/stitch-skill/SKILL.md +185 -184
- package/skills/strix-security/SKILL.md +54 -53
- package/skills/subagent-driven-development/SKILL.md +35 -264
- package/skills/subagent-driven-development/references/batching.md +11 -0
- package/skills/subagent-driven-development/references/cannot-verify.md +10 -0
- package/skills/subagent-driven-development/references/final-review.md +47 -0
- package/skills/subagent-driven-development/references/fix-loop.md +77 -0
- package/skills/subagent-driven-development/references/handling-reports.md +15 -0
- package/skills/subagent-driven-development/references/preflight.md +26 -0
- package/skills/subagent-driven-development/references/resuming.md +12 -0
- package/skills/subagent-driven-development/scripts/review-package +53 -53
- package/skills/subagent-driven-development/scripts/sdd-workspace +87 -82
- package/skills/subagent-driven-development/scripts/task-brief +43 -43
- package/skills/systematic-debugging/SKILL.md +283 -306
- package/skills/taste-skill/SKILL.md +542 -1206
- package/skills/taste-skill/references/app-screens.md +1199 -0
- package/skills/taste-skill/references/colour.md +141 -0
- package/skills/taste-skill/references/copy.md +177 -0
- package/skills/taste-skill/references/critique.md +182 -0
- package/skills/taste-skill/references/imagery.md +791 -0
- package/skills/taste-skill/references/layout.md +292 -0
- package/skills/taste-skill/references/motion.md +980 -0
- package/skills/taste-skill/references/research.md +356 -0
- package/skills/taste-skill/references/scenes.md +174 -0
- package/skills/taste-skill/references/tells.md +115 -0
- package/skills/taste-skill/references/type.md +170 -0
- package/skills/test-driven-development/SKILL.md +330 -337
- package/skills/thermo/SKILL.md +67 -0
- package/skills/threat-modeling/SKILL.md +55 -0
- package/skills/to-spec/SKILL.md +75 -0
- package/skills/to-tickets/SKILL.md +105 -0
- package/skills/trailofbits-audit-context/SKILL.md +72 -72
- package/skills/trailofbits-insecure-defaults/commands/audit.md +35 -0
- package/skills/trailofbits-insecure-defaults/references/debug-features.json +13 -13
- package/skills/trailofbits-insecure-defaults/references/debug-features.md +75 -75
- package/skills/trailofbits-insecure-defaults/references/default-credentials.json +12 -12
- package/skills/trailofbits-insecure-defaults/references/default-credentials.md +76 -76
- package/skills/trailofbits-insecure-defaults/references/fail-open-security.json +11 -11
- package/skills/trailofbits-insecure-defaults/references/fail-open-security.md +70 -70
- package/skills/trailofbits-insecure-defaults/references/fallback-secrets.json +11 -11
- package/skills/trailofbits-insecure-defaults/references/fallback-secrets.md +70 -70
- package/skills/trailofbits-insecure-defaults/references/permissive-access.json +13 -13
- package/skills/trailofbits-insecure-defaults/references/permissive-access.md +62 -62
- package/skills/trailofbits-insecure-defaults/references/weak-crypto.json +13 -13
- package/skills/trailofbits-insecure-defaults/references/weak-crypto.md +71 -71
- package/skills/trailofbits-triage-brocards/SKILL.md +208 -208
- package/skills/verification-before-completion/SKILL.md +0 -14
- package/skills/wayfinder/SKILL.md +128 -0
- package/skills/writing-plans/SKILL.md +11 -15
- package/skills/writing-skills/SKILL.md +21 -303
- package/skills/writing-skills/references/CLAUDE_MD_TESTING.md +189 -0
- package/skills/writing-skills/references/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/references/bulletproofing.md +80 -0
- package/skills/writing-skills/references/discovery.md +201 -0
- package/skills/writing-skills/references/flowcharts.md +37 -0
- package/skills/writing-skills/references/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/references/persuasion-principles.md +187 -0
- package/skills/writing-skills/references/testing-skills-with-subagents.md +384 -0
- package/tools/{claude-bridge.ps1 → archive/claude-bridge.ps1} +10 -7
- package/tools/{codex-bridge.ps1 → archive/codex-bridge.ps1} +1 -1
- package/tools/{gemini-bridge.ps1 → archive/gemini-bridge.ps1} +12 -19
- package/skills/gpt-tasteskill/SKILL.md +0 -74
- package/skills/taste-skill-v1/SKILL.md +0 -226
- /package/tools/{claude-bridge.cmd → archive/claude-bridge.cmd} +0 -0
- /package/tools/{claude-bridge.sh → archive/claude-bridge.sh} +0 -0
- /package/tools/{codex-bridge.cmd → archive/codex-bridge.cmd} +0 -0
- /package/tools/{codex-bridge.sh → archive/codex-bridge.sh} +0 -0
- /package/tools/{codexcli-bridge.cmd → archive/codexcli-bridge.cmd} +0 -0
- /package/tools/{codexcli-bridge.ps1 → archive/codexcli-bridge.ps1} +0 -0
- /package/tools/{gemini-bridge.cmd → archive/gemini-bridge.cmd} +0 -0
- /package/tools/{gemini-bridge.sh → archive/gemini-bridge.sh} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: thermo
|
|
3
|
+
description: >
|
|
4
|
+
Run an unusually strict architectural and maintainability review focusing on "Code Judo"
|
|
5
|
+
structural simplification, spaghetti conditional elimination, and modularity health.
|
|
6
|
+
Use when the user asks for a thermo review, thermonuclear audit, or deep maintainability critique.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Thermo Architectural & Maintainability Review
|
|
10
|
+
|
|
11
|
+
Use this skill for an uncompromising, senior-staff level audit focused on structural simplification, abstraction quality, and long-term codebase health.
|
|
12
|
+
|
|
13
|
+
Above all, this skill pushes the reviewer to be **ambitious** about code structure. Do not merely identify local cleanup opportunities. Actively search for **"Code Judo"** moves: restructurings that preserve behavior while making the implementation dramatically simpler, smaller, more direct, and more elegant.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Core Audit Directives
|
|
18
|
+
|
|
19
|
+
### 1. "Code Judo" Structural Simplification
|
|
20
|
+
* Do not settle for "this could be a bit cleaner."
|
|
21
|
+
* Look for opportunities to reframe the design so that whole branches, redundant helpers, temporary modes, condition chains, or intermediate layers disappear entirely.
|
|
22
|
+
* Prefer solutions that make the resulting code feel inevitable in hindsight.
|
|
23
|
+
|
|
24
|
+
### 2. Hunt Down Spaghetti Growth
|
|
25
|
+
* Flag branching logic that scatters special cases across files.
|
|
26
|
+
* Detect ad-hoc state mutations and flag variables that multiply execution paths.
|
|
27
|
+
* Identify thin wrappers and indirection layers that add cognitive load without providing real safety, encapsulation, or clarity.
|
|
28
|
+
|
|
29
|
+
### 3. Modularity & File Health (Flexible Guideline)
|
|
30
|
+
* Flag files where uncontrolled growth has led to mixed responsibilities or "god-object" scope.
|
|
31
|
+
* Prompt for structural decomposition when a file becomes difficult to reason about as a single unit (typically 500–1,000+ lines depending on the stack).
|
|
32
|
+
* **Explicit Exemptions**:
|
|
33
|
+
* Database migrations
|
|
34
|
+
* Test suites and integration fixtures
|
|
35
|
+
* Generated files (`openapi.ts`, schema outputs, protobuf)
|
|
36
|
+
* Standalone build/bootstrap utility scripts
|
|
37
|
+
|
|
38
|
+
### 4. Type-Boundary & Contract Integrity
|
|
39
|
+
* Scrutinize type-boundary erosion: loose casts (`as unknown as T`), non-null assertions (`!`), or weakened interfaces introduced just to appease the compiler without accurately modeling the domain.
|
|
40
|
+
* Ensure domain invariants are enforced at system boundaries, not patched with defensive guards throughout internal functions.
|
|
41
|
+
|
|
42
|
+
### 5. Passing Tests Do Not Excuse Architectural Decay
|
|
43
|
+
* Functional correctness is a baseline requirement, not an excuse for structural debt.
|
|
44
|
+
* If a PR or diff adds technical debt, bloated glue code, or brittle couplings, reject it even if the test suite passes 100%.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Preferred Remedies
|
|
49
|
+
|
|
50
|
+
When identifying code-quality flaws, recommend root structural fixes:
|
|
51
|
+
* **Delete** an entire layer of indirection rather than polishing it.
|
|
52
|
+
* **Reframe the state model** so that conditional branching vanishes instead of being centralized.
|
|
53
|
+
* **Change ownership boundaries** so the feature becomes a natural extension of an existing abstraction.
|
|
54
|
+
* **Replace condition ladders** with a typed state machine, strategy map, or explicit dispatcher.
|
|
55
|
+
* **Turn special-case branches** into a simpler default flow with fewer exceptions.
|
|
56
|
+
* **Extract pure, decoupled modules** when a single file handles distinct domain concepts.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Tone & Output Standard
|
|
61
|
+
|
|
62
|
+
* **Voice**: Direct, demanding, and objective. Zero sycophancy or performative praise.
|
|
63
|
+
* **Actionable Critiques**: Always accompany critiques with concrete, minimal architectural remedies.
|
|
64
|
+
* **Example Prompts & Verdicts**:
|
|
65
|
+
* *"This adds another special-case branch into an already busy flow. Can we reframe the state model to eliminate the branch?"*
|
|
66
|
+
* *"This wrapper file only re-exports two functions with minor type conversions. Delete the wrapper and import the primitives directly."*
|
|
67
|
+
* *"This module mixes database access with UI formatting across 800+ lines. Decompose this into domain logic and presentation before adding new routes."*
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: threat-modeling
|
|
3
|
+
description: Systematic STRIDE threat modeling, trust boundary identification, attack surface mapping, and mitigation verification for architecture, API, and cloud infrastructure changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Threat Modeling Skill (`threat-modeling`)
|
|
7
|
+
|
|
8
|
+
Use this skill when designing new system architectures, exposing new public endpoints, modifying authentication/authorization boundaries, or conducting pre-production security assessments.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Trust Boundaries & Surface Mapping
|
|
13
|
+
|
|
14
|
+
Before evaluating threats, map every trust boundary transition:
|
|
15
|
+
1. **External Client to Edge**: Browser/mobile app to CDN/reverse proxy (TLS termination, DDoS filtering, CORS policies).
|
|
16
|
+
2. **Edge to Application Gateway**: Reverse proxy to application service (header sanitization, `X-Forwarded-*` trust, rate limiting).
|
|
17
|
+
3. **Application to Internal Services**: Microservices, queue brokers, caching nodes (mutual TLS, network segmentation).
|
|
18
|
+
4. **Application to Data Tier**: Service to relational/vector databases (parameterized queries, least-privilege connection pooling).
|
|
19
|
+
5. **Application to Third-Party APIs**: Outbound webhooks and partner APIs (egress filtering, credential isolation, SSRF prevention).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. The STRIDE Threat Matrix
|
|
24
|
+
|
|
25
|
+
Evaluate every trust boundary against the six STRIDE threat categories:
|
|
26
|
+
|
|
27
|
+
| Threat Category | Core Question | Primary Attack Vector | Mandatory Defense & Verification |
|
|
28
|
+
| :--- | :--- | :--- | :--- |
|
|
29
|
+
| **Spoofing** | Can an attacker pretend to be someone else? | Forged tokens, unverified headers, weak session cookies | Cryptographically signed tokens (RS256/Ed25519), `__Host-` prefixed cookies with `Secure; HttpOnly; SameSite=Lax`. |
|
|
30
|
+
| **Tampering** | Can an attacker modify data in transit or at rest? | Parameter tampering, payload manipulation, replay attacks | Strict JSON schema validation, input sanitization, HMAC signatures for webhooks, immutable audit logs. |
|
|
31
|
+
| **Repudiation** | Can a user deny performing an action? | Missing audit logs, unauthenticated mutations | Append-only structured audit logs capturing actor ID, timestamp, IP, and immutable mutation diffs. |
|
|
32
|
+
| **Information Disclosure** | Can unauthorized parties access private data? | Detailed stack traces in responses, unredacted logs, PII leakage, IDOR | Generic error responses in production, zero secrets in client bundles, strict tenant isolation (`tenant_id` WHERE clauses). |
|
|
33
|
+
| **Denial of Service** | Can an attacker exhaust system resources? | Unbounded payload sizes, missing query pagination, regex DoS (ReDoS) | Hard request body size limits, mandatory pagination (`limit`/`offset` or cursor), algorithmic timeouts on regex matching. |
|
|
34
|
+
| **Elevation of Privilege** | Can an unprivileged user execute admin actions? | Insecure Direct Object References (IDOR), broken RBAC/ABAC | Centralized authorization guards on every endpoint, least-privilege database user permissions. |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 3. Threat Mitigation Ledger Template
|
|
39
|
+
|
|
40
|
+
For Tier 2 and Tier 3 architectural tasks, record verified mitigations in the task plan or security report:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
### STRIDE Threat Ledger
|
|
44
|
+
| ID | Boundary | STRIDE Category | Threat Description | Verified Mitigation | Status |
|
|
45
|
+
| :--- | :--- | :--- | :--- | :--- | :--- |
|
|
46
|
+
| T-01 | Client -> Edge | Spoofing | Client forges X-User-Id header | Edge strips all upstream identity headers before auth | Mitigated |
|
|
47
|
+
| T-02 | Edge -> API | Denial of Service | Unbounded JSON upload exhausts RAM | Body parser capped at 1MB with early 413 termination | Mitigated |
|
|
48
|
+
| T-03 | API -> DB | Elevation of Privilege | Tenant B IDOR on Tenant A invoices | RLS policy and repository WHERE tenant_id = auth.tenant | Mitigated |
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 4. Unmistakable Guardrails
|
|
54
|
+
- **No Unmitigated Blockers**: No architectural feature crossing a trust boundary may be approved with open high-severity STRIDE threats.
|
|
55
|
+
- **Fail Closed**: In any authorization failure, token validation error, or exception branch, system state must default to access denied.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-spec
|
|
3
|
+
description: "Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This skill takes the current conversation context and codebase understanding and produces a spec. Do NOT interview the user; just synthesize what you already know.
|
|
8
|
+
|
|
9
|
+
The issue tracker and triage label vocabulary should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
1. Explore the repo to understand the current state of the codebase, if you haven't already. Use the project's domain glossary vocabulary throughout the spec, and respect any ADRs in the area you're touching.
|
|
14
|
+
|
|
15
|
+
2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can. The fewer seams across the codebase, the better - the ideal number is one.
|
|
16
|
+
|
|
17
|
+
Check with the user that these seams match their expectations.
|
|
18
|
+
|
|
19
|
+
3. Write the spec using the template below, then publish it to the project issue tracker. Apply the `ready-for-agent` triage label - no need for additional triage.
|
|
20
|
+
|
|
21
|
+
<spec-template>
|
|
22
|
+
|
|
23
|
+
## Problem Statement
|
|
24
|
+
|
|
25
|
+
The problem that the user is facing, from the user's perspective.
|
|
26
|
+
|
|
27
|
+
## Solution
|
|
28
|
+
|
|
29
|
+
The solution to the problem, from the user's perspective.
|
|
30
|
+
|
|
31
|
+
## User Stories
|
|
32
|
+
|
|
33
|
+
A LONG, numbered list of user stories. Each user story should be in the format of:
|
|
34
|
+
|
|
35
|
+
1. As an <actor>, I want a <feature>, so that <benefit>
|
|
36
|
+
|
|
37
|
+
<user-story-example>
|
|
38
|
+
1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
|
|
39
|
+
</user-story-example>
|
|
40
|
+
|
|
41
|
+
This list of user stories should be extremely extensive and cover all aspects of the feature.
|
|
42
|
+
|
|
43
|
+
## Implementation Decisions
|
|
44
|
+
|
|
45
|
+
A list of implementation decisions that were made. This can include:
|
|
46
|
+
|
|
47
|
+
- The modules that will be built/modified
|
|
48
|
+
- The interfaces of those modules that will be modified
|
|
49
|
+
- Technical clarifications from the developer
|
|
50
|
+
- Architectural decisions
|
|
51
|
+
- Schema changes
|
|
52
|
+
- API contracts
|
|
53
|
+
- Specific interactions
|
|
54
|
+
|
|
55
|
+
Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
|
|
56
|
+
|
|
57
|
+
Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
|
|
58
|
+
|
|
59
|
+
## Testing Decisions
|
|
60
|
+
|
|
61
|
+
A list of testing decisions that were made. Include:
|
|
62
|
+
|
|
63
|
+
- A description of what makes a good test (only test external behavior, not implementation details)
|
|
64
|
+
- Which modules will be tested
|
|
65
|
+
- Prior art for the tests (i.e. similar types of tests in the codebase)
|
|
66
|
+
|
|
67
|
+
## Out of Scope
|
|
68
|
+
|
|
69
|
+
A description of the things that are out of scope for this spec.
|
|
70
|
+
|
|
71
|
+
## Further Notes
|
|
72
|
+
|
|
73
|
+
Any further notes about the feature.
|
|
74
|
+
|
|
75
|
+
</spec-template>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-tickets
|
|
3
|
+
description: Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker (edges as text in one file per ticket locally, or native blocking links on a real tracker).
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# To Tickets
|
|
8
|
+
|
|
9
|
+
Break a plan, spec, or conversation into a set of **tickets**: tracer-bullet vertical slices, each declaring the tickets that **block** it.
|
|
10
|
+
|
|
11
|
+
The issue tracker and triage label vocabulary should have been provided to you. If not, tell the user to run `/setup-matt-pocock-skills`.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
### 1. Gather context
|
|
16
|
+
|
|
17
|
+
Work from whatever is already in the conversation context. If the user passes a reference (a spec path, an issue number or URL) as an argument, fetch it and read its full body and comments.
|
|
18
|
+
|
|
19
|
+
### 2. Explore the codebase (optional)
|
|
20
|
+
|
|
21
|
+
If you have not already explored the codebase, do so to understand the current state of the code. Ticket titles and descriptions should use the project's domain glossary vocabulary, and respect ADRs in the area you're touching.
|
|
22
|
+
|
|
23
|
+
Look for opportunities to prefactor the code to make the implementation easier. "Make the change easy, then make the easy change."
|
|
24
|
+
|
|
25
|
+
### 3. Draft vertical slices
|
|
26
|
+
|
|
27
|
+
Break the work into **tracer bullet** tickets.
|
|
28
|
+
|
|
29
|
+
<vertical-slice-rules>
|
|
30
|
+
|
|
31
|
+
- Each slice cuts a narrow but COMPLETE path through every layer (schema, API, UI, tests): vertical, NOT a horizontal slice of one layer
|
|
32
|
+
- A completed slice is demoable or verifiable on its own
|
|
33
|
+
- Each slice is sized to fit in a single fresh context window
|
|
34
|
+
- Any prefactoring should be done first
|
|
35
|
+
|
|
36
|
+
</vertical-slice-rules>
|
|
37
|
+
|
|
38
|
+
Give each ticket its **blocking edges**: the other tickets that must complete before it can start. A ticket with no blockers can start immediately.
|
|
39
|
+
|
|
40
|
+
**Wide refactors are the exception to vertical slicing.** A **wide refactor** is one mechanical change (rename a column, retype a shared symbol) whose **blast radius** fans across the whole codebase, so a single edit breaks thousands of call sites at once and no vertical slice can land green. Don't force it into a tracer bullet; sequence it as **expand–contract**. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own ticket blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in a ticket blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify ticket; green is promised only there.
|
|
41
|
+
|
|
42
|
+
### 4. Quiz the user
|
|
43
|
+
|
|
44
|
+
Present the proposed breakdown as a numbered list. For each ticket, show:
|
|
45
|
+
|
|
46
|
+
- **Title**: short descriptive name
|
|
47
|
+
- **Blocked by**: which other tickets (if any) must complete first
|
|
48
|
+
- **What it delivers**: the end-to-end behaviour this ticket makes work
|
|
49
|
+
|
|
50
|
+
Ask the user:
|
|
51
|
+
|
|
52
|
+
- Does the granularity feel right? (too coarse / too fine)
|
|
53
|
+
- Are the blocking edges correct: does each ticket only depend on tickets that genuinely gate it?
|
|
54
|
+
- Should any tickets be merged or split further?
|
|
55
|
+
|
|
56
|
+
Iterate until the user approves the breakdown.
|
|
57
|
+
|
|
58
|
+
### 5. Publish the tickets to the configured tracker
|
|
59
|
+
|
|
60
|
+
Publish the approved tickets. **How** depends on the tracker `/setup-matt-pocock-skills` configured; the tickets are the same either way, only the shape of the blocking edges changes:
|
|
61
|
+
|
|
62
|
+
- **Local files** → write one file per ticket under `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01` in dependency order (blockers first). Each file's "Blocked by" lists the numbers/titles it depends on. Use the per-ticket file template below: one ticket per file, never a single combined file.
|
|
63
|
+
- **A real issue tracker (GitHub, Linear, …)** → publish one issue per ticket in dependency order (blockers first) so each ticket's blocking edges can reference real identifiers. Use the platform's native blocking relationship where it has one; otherwise set each ticket's "Blocked by" to the blocking issues. If the source was an existing issue, make each ticket its sub-issue (tracker doc's operation). Apply the `ready-for-agent` triage label unless instructed otherwise; the tickets are agent-grabbable by construction.
|
|
64
|
+
|
|
65
|
+
Work the **frontier**: any ticket whose blockers are all done. For a purely linear chain that means top to bottom.
|
|
66
|
+
|
|
67
|
+
Do NOT close or modify any parent issue.
|
|
68
|
+
|
|
69
|
+
<local-ticket-template>
|
|
70
|
+
|
|
71
|
+
# <NN>: <Ticket title>
|
|
72
|
+
|
|
73
|
+
**What to build:** the end-to-end behaviour this ticket makes work, from the user's perspective, not a layer-by-layer implementation list.
|
|
74
|
+
|
|
75
|
+
**Blocked by:** the numbers/titles of the tickets that gate this one, or "None (can start immediately)".
|
|
76
|
+
|
|
77
|
+
**Status:** ready-for-agent
|
|
78
|
+
|
|
79
|
+
- [ ] Acceptance criterion 1
|
|
80
|
+
- [ ] Acceptance criterion 2
|
|
81
|
+
|
|
82
|
+
</local-ticket-template>
|
|
83
|
+
|
|
84
|
+
<issue-template>
|
|
85
|
+
|
|
86
|
+
## Parent
|
|
87
|
+
|
|
88
|
+
A reference to the parent issue on the tracker (if the source was an existing issue, otherwise omit this section).
|
|
89
|
+
|
|
90
|
+
## What to build
|
|
91
|
+
|
|
92
|
+
The end-to-end behaviour this ticket makes work, from the user's perspective, not layer-by-layer implementation.
|
|
93
|
+
|
|
94
|
+
## Acceptance criteria
|
|
95
|
+
|
|
96
|
+
- [ ] Criterion 1
|
|
97
|
+
- [ ] Criterion 2
|
|
98
|
+
|
|
99
|
+
## Blocked by
|
|
100
|
+
|
|
101
|
+
- A reference to each blocking ticket, or "None (can start immediately)". Omit this section when blockers were set as native edges.
|
|
102
|
+
|
|
103
|
+
</issue-template>
|
|
104
|
+
|
|
105
|
+
In either form, avoid specific file paths or code snippets: they go stale fast. Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it and note briefly that it came from a prototype. Trim to the decision-rich parts, not a working demo, just the important bits.
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: audit-context-building
|
|
3
|
-
description: Understand a codebase before looking for bugs in it - what each function assumes, what it guarantees, and what it depends on elsewhere. Use when starting an audit, threat model, or architecture review on unfamiliar code, and before any vulnerability-hunting pass.
|
|
4
|
-
allowed-tools: Workflow Task Read Grep Glob
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Audit Context Building
|
|
8
|
-
|
|
9
|
-
Build understanding, not verdicts. This runs before anyone hunts for bugs, and feeds that work.
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
At the start of an audit, a threat model, or an architecture review, when the code is unfamiliar. Also when
|
|
14
|
-
an earlier pass produced findings nobody could judge, because no one had mapped out how the system fits
|
|
15
|
-
together.
|
|
16
|
-
|
|
17
|
-
## When NOT to Use
|
|
18
|
-
|
|
19
|
-
Do not name vulnerabilities, suggest fixes, write proofs-of-concept, or rate severity. Those belong to the
|
|
20
|
-
hunting phase, which runs next and with the whole picture in hand. When the code counts on something and
|
|
21
|
-
nothing checks it, record that plainly and move on — whether it matters is decided later.
|
|
22
|
-
|
|
23
|
-
Not worth the tokens on code you already understand.
|
|
24
|
-
|
|
25
|
-
## Do not analyze in this context
|
|
26
|
-
|
|
27
|
-
The analysis is long, and this context needs to survive to use it. Dispatch it:
|
|
28
|
-
|
|
29
|
-
- **A codebase, or more than one function** — run `/audit-context-building:audit-context <path>`. It orients,
|
|
30
|
-
analyzes each function in its own subagent, and writes `audit-context/DOSSIER.md` plus one file per
|
|
31
|
-
function under `audit-context/functions/`. Only compact records return here.
|
|
32
|
-
- **A single function** — dispatch the `audit-context-building:function-analyzer` agent at it. It writes its
|
|
33
|
-
prose to disk and returns a record.
|
|
34
|
-
|
|
35
|
-
Then work from what comes back: the index, the unenforced assumptions, the open questions. Read a function's
|
|
36
|
-
file when you need its detail.
|
|
37
|
-
|
|
38
|
-
The workflow is what enforces this, not this text: a subagent bound to a return schema cannot return prose.
|
|
39
|
-
Treat this section as routing, and route.
|
|
40
|
-
|
|
41
|
-
## What comes back, and how to read it
|
|
42
|
-
|
|
43
|
-
Each record lists what must always be true (with the line that shows it), what the function takes on faith
|
|
44
|
-
(with whatever establishes it), which functions it calls and what it needs from each, and anything still
|
|
45
|
-
unclear. The dossier adds the rules that span several functions, who can reach what, and where the
|
|
46
|
-
complicated parts cluster.
|
|
47
|
-
|
|
48
|
-
Two things matter more than the rest:
|
|
49
|
-
|
|
50
|
-
- **Assumptions marked `nothing found`.** The code counts on something being true and nothing anywhere makes
|
|
51
|
-
it true. This is the most useful thing to hand the hunting phase.
|
|
52
|
-
- **The open questions.** An honest list of what is still unclear beats a confident answer that turns out to
|
|
53
|
-
be wrong. Carry them forward instead of closing them out.
|
|
54
|
-
|
|
55
|
-
Where two records disagree, both are quoted rather than quietly reconciled. That is a fact about the code,
|
|
56
|
-
not a flaw in the analysis.
|
|
57
|
-
|
|
58
|
-
## The format
|
|
59
|
-
|
|
60
|
-
[ANALYSIS_FORMAT.md](resources/ANALYSIS_FORMAT.md) defines it, and
|
|
61
|
-
[FUNCTION_MICRO_ANALYSIS_EXAMPLE.md](resources/FUNCTION_MICRO_ANALYSIS_EXAMPLE.md) works through examples in
|
|
62
|
-
C and Solidity. Read them when extending this plugin or deciding whether a record can be trusted.
|
|
63
|
-
|
|
64
|
-
The format is the same whatever the target. What changes is what fills each slot, and what counts as a call
|
|
65
|
-
you cannot see inside. [DOMAIN_NOTES.md](resources/DOMAIN_NOTES.md) maps that across smart contracts, C and
|
|
66
|
-
C++, decompiled firmware, and web services — read it when the target is not plain source code.
|
|
67
|
-
|
|
68
|
-
**The rule that matters most: follow the calls.** Whether a function is correct usually depends on something
|
|
69
|
-
another function does, and you cannot see that from the caller alone. A limit looks enforced because the
|
|
70
|
-
value came back from a function whose name suggests it was checked. So read the function being called, follow
|
|
71
|
-
every path through it rather than only the one that succeeds, and say what makes each assumption true. When
|
|
72
|
-
nothing does, use those words: `nothing found`. Every claim cites a line, or becomes an open question.
|
|
1
|
+
---
|
|
2
|
+
name: audit-context-building
|
|
3
|
+
description: Understand a codebase before looking for bugs in it - what each function assumes, what it guarantees, and what it depends on elsewhere. Use when starting an audit, threat model, or architecture review on unfamiliar code, and before any vulnerability-hunting pass.
|
|
4
|
+
allowed-tools: Workflow Task Read Grep Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Audit Context Building
|
|
8
|
+
|
|
9
|
+
Build understanding, not verdicts. This runs before anyone hunts for bugs, and feeds that work.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
At the start of an audit, a threat model, or an architecture review, when the code is unfamiliar. Also when
|
|
14
|
+
an earlier pass produced findings nobody could judge, because no one had mapped out how the system fits
|
|
15
|
+
together.
|
|
16
|
+
|
|
17
|
+
## When NOT to Use
|
|
18
|
+
|
|
19
|
+
Do not name vulnerabilities, suggest fixes, write proofs-of-concept, or rate severity. Those belong to the
|
|
20
|
+
hunting phase, which runs next and with the whole picture in hand. When the code counts on something and
|
|
21
|
+
nothing checks it, record that plainly and move on — whether it matters is decided later.
|
|
22
|
+
|
|
23
|
+
Not worth the tokens on code you already understand.
|
|
24
|
+
|
|
25
|
+
## Do not analyze in this context
|
|
26
|
+
|
|
27
|
+
The analysis is long, and this context needs to survive to use it. Dispatch it:
|
|
28
|
+
|
|
29
|
+
- **A codebase, or more than one function** — run `/audit-context-building:audit-context <path>`. It orients,
|
|
30
|
+
analyzes each function in its own subagent, and writes `audit-context/DOSSIER.md` plus one file per
|
|
31
|
+
function under `audit-context/functions/`. Only compact records return here.
|
|
32
|
+
- **A single function** — dispatch the `audit-context-building:function-analyzer` agent at it. It writes its
|
|
33
|
+
prose to disk and returns a record.
|
|
34
|
+
|
|
35
|
+
Then work from what comes back: the index, the unenforced assumptions, the open questions. Read a function's
|
|
36
|
+
file when you need its detail.
|
|
37
|
+
|
|
38
|
+
The workflow is what enforces this, not this text: a subagent bound to a return schema cannot return prose.
|
|
39
|
+
Treat this section as routing, and route.
|
|
40
|
+
|
|
41
|
+
## What comes back, and how to read it
|
|
42
|
+
|
|
43
|
+
Each record lists what must always be true (with the line that shows it), what the function takes on faith
|
|
44
|
+
(with whatever establishes it), which functions it calls and what it needs from each, and anything still
|
|
45
|
+
unclear. The dossier adds the rules that span several functions, who can reach what, and where the
|
|
46
|
+
complicated parts cluster.
|
|
47
|
+
|
|
48
|
+
Two things matter more than the rest:
|
|
49
|
+
|
|
50
|
+
- **Assumptions marked `nothing found`.** The code counts on something being true and nothing anywhere makes
|
|
51
|
+
it true. This is the most useful thing to hand the hunting phase.
|
|
52
|
+
- **The open questions.** An honest list of what is still unclear beats a confident answer that turns out to
|
|
53
|
+
be wrong. Carry them forward instead of closing them out.
|
|
54
|
+
|
|
55
|
+
Where two records disagree, both are quoted rather than quietly reconciled. That is a fact about the code,
|
|
56
|
+
not a flaw in the analysis.
|
|
57
|
+
|
|
58
|
+
## The format
|
|
59
|
+
|
|
60
|
+
[ANALYSIS_FORMAT.md](resources/ANALYSIS_FORMAT.md) defines it, and
|
|
61
|
+
[FUNCTION_MICRO_ANALYSIS_EXAMPLE.md](resources/FUNCTION_MICRO_ANALYSIS_EXAMPLE.md) works through examples in
|
|
62
|
+
C and Solidity. Read them when extending this plugin or deciding whether a record can be trusted.
|
|
63
|
+
|
|
64
|
+
The format is the same whatever the target. What changes is what fills each slot, and what counts as a call
|
|
65
|
+
you cannot see inside. [DOMAIN_NOTES.md](resources/DOMAIN_NOTES.md) maps that across smart contracts, C and
|
|
66
|
+
C++, decompiled firmware, and web services — read it when the target is not plain source code.
|
|
67
|
+
|
|
68
|
+
**The rule that matters most: follow the calls.** Whether a function is correct usually depends on something
|
|
69
|
+
another function does, and you cannot see that from the caller alone. A limit looks enforced because the
|
|
70
|
+
value came back from a function whose name suggests it was checked. So read the function being called, follow
|
|
71
|
+
every path through it rather than only the one that succeeds, and say what makes each assumption true. When
|
|
72
|
+
nothing does, use those words: `nothing found`. Every claim cites a line, or becomes an open question.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open switches, weak crypto, permissive access, debug leakage. Parallel sweeps collect candidates, then a refuting verifier traces each one to the security decision it reaches before it is reported."
|
|
3
|
+
argument-hint: "[path]"
|
|
4
|
+
allowed-tools: Bash Workflow
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Insecure defaults audit
|
|
8
|
+
|
|
9
|
+
**1. Check the corpus is there.**
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
ls -1 ${CLAUDE_PLUGIN_ROOT}/references
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Must list `*.md` files. If it errors or lists none, **stop and say so**. Don't search
|
|
16
|
+
elsewhere, don't guess, don't run the audit anyway.
|
|
17
|
+
|
|
18
|
+
**2. Run it.** `Workflow` tool:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
name: "insecure-defaults:audit-pipeline"
|
|
22
|
+
args: { scope: "$1" or ".", pluginRoot: "${CLAUDE_PLUGIN_ROOT}" }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Pass the `${CLAUDE_PLUGIN_ROOT}` value as printed above; it's already the real path.
|
|
26
|
+
|
|
27
|
+
**3. Print the result**, by `status`:
|
|
28
|
+
|
|
29
|
+
- `findings`, `no-findings-confirmed`: print `report`.
|
|
30
|
+
- `no-candidates`: the sweeps ran and matched nothing, which is a real result. There is
|
|
31
|
+
no `report`; print `note`, including its point that this is not proof of absence.
|
|
32
|
+
- `report-failed`: the audit completed but the write-up died. Print `note`, then present
|
|
33
|
+
`findings`, `refuted` and `coverage` yourself.
|
|
34
|
+
- anything else: the audit **didn't complete**, so it isn't a clean result. Print `note`
|
|
35
|
+
and say the run failed.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "debug-features",
|
|
3
|
-
"title": "Debug and introspection defaults",
|
|
4
|
-
"seeds": [
|
|
5
|
-
"(DEBUG|debug|DEVELOPMENT|TRACE)[A-Za-z_]*[[:space:]]*[:=][[:space:]]*(True|true|1)",
|
|
6
|
-
"(getenv|environ\\.get|process\\.env).{0,40}(DEBUG|VERBOSE).{0,40}(or|\\|\\|)[[:space:]]*(True|true|['\"]1['\"])",
|
|
7
|
-
"(getenv|environ\\.get|getOrDefault)\\([^)]*,[[:space:]]*['\"]?(true|1|on|yes|enabled)['\"]?[[:space:]]*\\)",
|
|
8
|
-
"(introspection|playground|graphiql|swagger|actuator|pprof|expvar)[[:space:]]*[:=][[:space:]]*(True|true|1)",
|
|
9
|
-
"(traceback\\.format_exc|format_exc|printStackTrace|getStackTrace|exc_info)",
|
|
10
|
-
"['\"][^'\"]*['\"][[:space:]]*\\+[[:space:]]*[A-Za-z_][A-Za-z0-9_]*\\.getMessage\\(\\)",
|
|
11
|
-
"(show_exceptions|PROPAGATE_EXCEPTIONS|display_errors|full_stack)"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "debug-features",
|
|
3
|
+
"title": "Debug and introspection defaults",
|
|
4
|
+
"seeds": [
|
|
5
|
+
"(DEBUG|debug|DEVELOPMENT|TRACE)[A-Za-z_]*[[:space:]]*[:=][[:space:]]*(True|true|1)",
|
|
6
|
+
"(getenv|environ\\.get|process\\.env).{0,40}(DEBUG|VERBOSE).{0,40}(or|\\|\\|)[[:space:]]*(True|true|['\"]1['\"])",
|
|
7
|
+
"(getenv|environ\\.get|getOrDefault)\\([^)]*,[[:space:]]*['\"]?(true|1|on|yes|enabled)['\"]?[[:space:]]*\\)",
|
|
8
|
+
"(introspection|playground|graphiql|swagger|actuator|pprof|expvar)[[:space:]]*[:=][[:space:]]*(True|true|1)",
|
|
9
|
+
"(traceback\\.format_exc|format_exc|printStackTrace|getStackTrace|exc_info)",
|
|
10
|
+
"['\"][^'\"]*['\"][[:space:]]*\\+[[:space:]]*[A-Za-z_][A-Za-z0-9_]*\\.getMessage\\(\\)",
|
|
11
|
+
"(show_exceptions|PROPAGATE_EXCEPTIONS|display_errors|full_stack)"
|
|
12
|
+
]
|
|
13
|
+
}
|