mindforge-cc 11.8.2 → 11.9.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/.agent/mindforge/wf-orchestrate-review.md +35 -0
- package/.agent/mindforge/wf-verification-loop.md +45 -0
- package/.agent/mindforge/wf-workflow-optimizer.md +51 -0
- package/.agent/skills/article-illustrator/SKILL.md +7 -7
- package/.agent/skills/arxiv/SKILL.md +6 -6
- package/.agent/skills/code-wiki/SKILL.md +11 -11
- package/.agent/skills/concept-diagrams/SKILL.md +6 -6
- package/.agent/skills/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/.agent/skills/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/.agent/skills/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/.agent/skills/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/.agent/skills/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/.agent/skills/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/.agent/skills/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/.agent/skills/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/.agent/skills/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/.agent/skills/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/.agent/skills/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/.agent/skills/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/.agent/skills/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/.agent/skills/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/.agent/skills/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/.agent/skills/concept-diagrams/templates/template.html +174 -0
- package/.agent/skills/domain-intel/SKILL.md +7 -7
- package/.agent/skills/duckduckgo-search/SKILL.md +17 -17
- package/.agent/skills/github-auth/scripts/gh-env.sh +66 -0
- package/.agent/skills/github-code-review/SKILL.md +9 -9
- package/.agent/skills/github-pr-workflow/SKILL.md +3 -3
- package/.agent/skills/godmode/SKILL.md +8 -8
- package/.agent/skills/jupyter-live-kernel/SKILL.md +3 -3
- package/.agent/skills/kanban-orchestrator/SKILL.md +10 -10
- package/.agent/skills/kanban-worker/SKILL.md +6 -6
- package/.agent/skills/llm-wiki/SKILL.md +7 -7
- package/.agent/skills/mindforge-autonomous/SKILL.md +1 -1
- package/.agent/skills/mindforge-complete-milestone/SKILL.md +1 -1
- package/.agent/skills/mindforge-discuss-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-do/SKILL.md +1 -1
- package/.agent/skills/mindforge-execute-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-list-workspaces/SKILL.md +1 -1
- package/.agent/skills/mindforge-manager/SKILL.md +1 -1
- package/.agent/skills/mindforge-neural-orchestrator/SKILL.md +1 -1
- package/.agent/skills/mindforge-new-milestone/SKILL.md +4 -4
- package/.agent/skills/mindforge-new-project/SKILL.md +4 -4
- package/.agent/skills/mindforge-new-workspace/SKILL.md +1 -1
- package/.agent/skills/mindforge-note/SKILL.md +1 -1
- package/.agent/skills/mindforge-plan-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-profile-user/SKILL.md +1 -1
- package/.agent/skills/mindforge-remove-workspace/SKILL.md +1 -1
- package/.agent/skills/mindforge-research-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-ui-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-ui-review/SKILL.md +1 -1
- package/.agent/skills/mindforge-verify-work/SKILL.md +1 -1
- package/.agent/skills/mindforge-workspace-isolated/SKILL.md +1 -1
- package/.agent/skills/node-inspect-debugger/SKILL.md +1 -1
- package/.agent/skills/obsidian/SKILL.md +15 -15
- package/.agent/skills/osint-investigation/SKILL.md +3 -2
- package/.agent/skills/osint-investigation/references/sources/courtlistener.md +98 -0
- package/.agent/skills/osint-investigation/references/sources/gdelt.md +104 -0
- package/.agent/skills/osint-investigation/references/sources/icij-offshore.md +104 -0
- package/.agent/skills/osint-investigation/references/sources/nyc-acris.md +90 -0
- package/.agent/skills/osint-investigation/references/sources/ofac-sdn.md +92 -0
- package/.agent/skills/osint-investigation/references/sources/opencorporates.md +103 -0
- package/.agent/skills/osint-investigation/references/sources/sec-edgar.md +83 -0
- package/.agent/skills/osint-investigation/references/sources/senate-ld.md +89 -0
- package/.agent/skills/osint-investigation/references/sources/usaspending.md +97 -0
- package/.agent/skills/osint-investigation/references/sources/wayback.md +93 -0
- package/.agent/skills/osint-investigation/references/sources/wikipedia.md +107 -0
- package/.agent/skills/osint-investigation/scripts/_http.py +82 -0
- package/.agent/skills/osint-investigation/scripts/_normalize.py +67 -0
- package/.agent/skills/osint-investigation/scripts/build_findings.py +221 -0
- package/.agent/skills/osint-investigation/scripts/entity_resolution.py +228 -0
- package/.agent/skills/osint-investigation/scripts/fetch_courtlistener.py +149 -0
- package/.agent/skills/osint-investigation/scripts/fetch_gdelt.py +161 -0
- package/.agent/skills/osint-investigation/scripts/fetch_icij_offshore.py +234 -0
- package/.agent/skills/osint-investigation/scripts/fetch_nyc_acris.py +203 -0
- package/.agent/skills/osint-investigation/scripts/fetch_ofac_sdn.py +175 -0
- package/.agent/skills/osint-investigation/scripts/fetch_opencorporates.py +191 -0
- package/.agent/skills/osint-investigation/scripts/fetch_sec_edgar.py +184 -0
- package/.agent/skills/osint-investigation/scripts/fetch_senate_ld.py +146 -0
- package/.agent/skills/osint-investigation/scripts/fetch_usaspending.py +170 -0
- package/.agent/skills/osint-investigation/scripts/fetch_wayback.py +142 -0
- package/.agent/skills/osint-investigation/scripts/fetch_wikipedia.py +266 -0
- package/.agent/skills/osint-investigation/scripts/timing_analysis.py +252 -0
- package/.agent/skills/oss-forensics/SKILL.md +10 -9
- package/.agent/skills/oss-forensics/scripts/evidence-store.py +313 -0
- package/.agent/skills/parallel-cli/SKILL.md +2 -2
- package/.agent/skills/pinggy-tunnel/SKILL.md +3 -3
- package/.agent/skills/pixel-art/SKILL.md +2 -2
- package/.agent/skills/plan/SKILL.md +10 -10
- package/.agent/skills/requesting-code-review/SKILL.md +4 -6
- package/.agent/skills/research-paper-writing/SKILL.md +32 -32
- package/.agent/skills/rest-graphql-debug/SKILL.md +31 -32
- package/.agent/skills/s6-container-supervision/SKILL.md +1 -1
- package/.agent/skills/scrapling/SKILL.md +1 -1
- package/.agent/skills/sherlock/SKILL.md +1 -1
- package/.agent/skills/simplify-code/SKILL.md +5 -7
- package/.agent/skills/skill-authoring/SKILL.md +4 -4
- package/.agent/skills/spike/SKILL.md +11 -13
- package/.agent/skills/subagent-driven-development/SKILL.md +7 -11
- package/.agent/skills/systematic-debugging/SKILL.md +13 -14
- package/.agent/skills/test-driven-development/SKILL.md +6 -7
- package/.agent/skills/video-orchestrator/SKILL.md +1 -1
- package/.agent/skills/web-pentest/SKILL.md +7 -7
- package/.mindforge/config.json +3 -2
- package/.mindforge/dynamic-workflows/REGISTRY.md +4 -1
- package/.mindforge/dynamic-workflows/index.json +910 -840
- package/.mindforge/dynamic-workflows/scripts/accessibility-audit.js +88 -90
- package/.mindforge/dynamic-workflows/scripts/ai-model-eval.js +59 -61
- package/.mindforge/dynamic-workflows/scripts/api-contract-test.js +87 -85
- package/.mindforge/dynamic-workflows/scripts/api-migration.js +120 -122
- package/.mindforge/dynamic-workflows/scripts/architecture-modernization.js +84 -86
- package/.mindforge/dynamic-workflows/scripts/code-audit.js +75 -77
- package/.mindforge/dynamic-workflows/scripts/code-explainer.js +99 -101
- package/.mindforge/dynamic-workflows/scripts/competitive-analysis.js +62 -64
- package/.mindforge/dynamic-workflows/scripts/competitive-teardown.js +106 -108
- package/.mindforge/dynamic-workflows/scripts/cost-analysis.js +78 -80
- package/.mindforge/dynamic-workflows/scripts/data-pipeline-validate.js +47 -49
- package/.mindforge/dynamic-workflows/scripts/database-migration.js +85 -87
- package/.mindforge/dynamic-workflows/scripts/debug-detective.js +97 -99
- package/.mindforge/dynamic-workflows/scripts/dependency-health.js +81 -83
- package/.mindforge/dynamic-workflows/scripts/design-system-audit.js +84 -86
- package/.mindforge/dynamic-workflows/scripts/documentation-gen.js +65 -67
- package/.mindforge/dynamic-workflows/scripts/feature-planner.js +78 -80
- package/.mindforge/dynamic-workflows/scripts/incident-response.js +81 -83
- package/.mindforge/dynamic-workflows/scripts/multi-repo-sync.js +49 -51
- package/.mindforge/dynamic-workflows/scripts/mutation-testing.js +113 -115
- package/.mindforge/dynamic-workflows/scripts/onboard-codebase.js +79 -81
- package/.mindforge/dynamic-workflows/scripts/orchestrate-review.js +115 -0
- package/.mindforge/dynamic-workflows/scripts/perf-optimize.js +97 -99
- package/.mindforge/dynamic-workflows/scripts/pr-review.js +61 -63
- package/.mindforge/dynamic-workflows/scripts/refactor-plan.js +88 -90
- package/.mindforge/dynamic-workflows/scripts/release-prep.js +79 -81
- package/.mindforge/dynamic-workflows/scripts/security-hardening.js +117 -119
- package/.mindforge/dynamic-workflows/scripts/security-threat-model.js +119 -121
- package/.mindforge/dynamic-workflows/scripts/tdd-sprint.js +80 -82
- package/.mindforge/dynamic-workflows/scripts/tech-evaluation.js +50 -52
- package/.mindforge/dynamic-workflows/scripts/test-coverage-gap.js +68 -70
- package/.mindforge/dynamic-workflows/scripts/ux-heuristic-audit.js +89 -91
- package/.mindforge/dynamic-workflows/scripts/verification-loop.js +138 -0
- package/.mindforge/dynamic-workflows/scripts/workflow-optimizer.js +136 -0
- package/.mindforge/dynamic-workflows/scripts/writer-reviewer.js +63 -65
- package/.mindforge/memory/sync-manifest.json +1 -1
- package/.mindforge/personas/advisor-researcher.md +2 -2
- package/.mindforge/personas/api-load-tester.md +1 -1
- package/.mindforge/personas/authentication-architect.md +1 -1
- package/.mindforge/personas/backup-recovery-specialist.md +1 -1
- package/.mindforge/personas/build-optimizer.md +1 -1
- package/.mindforge/personas/caching-strategist.md +1 -1
- package/.mindforge/personas/chaos-engineer.md +1 -1
- package/.mindforge/personas/compliance-auditor.md +1 -1
- package/.mindforge/personas/config-management-expert.md +1 -1
- package/.mindforge/personas/coverage-specialist.md +1 -1
- package/.mindforge/personas/debug-specialist.md +2 -2
- package/.mindforge/personas/debugger.md +2 -2
- package/.mindforge/personas/dependency-auditor.md +1 -1
- package/.mindforge/personas/developer.md +1 -1
- package/.mindforge/personas/devops-engineer.md +1 -1
- package/.mindforge/personas/executor.md +1 -1
- package/.mindforge/personas/go-specialist.md +1 -1
- package/.mindforge/personas/incident-commander.md +1 -1
- package/.mindforge/personas/java-specialist.md +1 -1
- package/.mindforge/personas/kubernetes-debugger.md +1 -1
- package/.mindforge/personas/logging-architect.md +1 -1
- package/.mindforge/personas/mf-planner.md +1 -1
- package/.mindforge/personas/mf-researcher.md +1 -1
- package/.mindforge/personas/mf-reviewer.md +1 -1
- package/.mindforge/personas/nyquist-auditor.md +1 -1
- package/.mindforge/personas/observability-engineer.md +1 -1
- package/.mindforge/personas/performance-optimizer.md +1 -1
- package/.mindforge/personas/phase-researcher.md +5 -5
- package/.mindforge/personas/planner.md +1 -1
- package/.mindforge/personas/project-researcher.md +2 -2
- package/.mindforge/personas/python-specialist.md +1 -1
- package/.mindforge/personas/qa-engineer.md +1 -1
- package/.mindforge/personas/release-manager.md +1 -1
- package/.mindforge/personas/research-agent.md +4 -4
- package/.mindforge/personas/roadmapper-extend.md +1 -1
- package/.mindforge/personas/rust-specialist.md +1 -1
- package/.mindforge/personas/security-reviewer.md +1 -1
- package/.mindforge/personas/tech-writer.md +1 -1
- package/.mindforge/personas/typescript-wizard.md +1 -1
- package/.mindforge/personas/ui-researcher.md +1 -1
- package/.mindforge/skills/accessibility/SKILL.md +3 -3
- package/.mindforge/skills/agent-architecture-audit/SKILL.md +11 -0
- package/.mindforge/skills/agent-loops/SKILL.md +1 -1
- package/.mindforge/skills/arxiv/SKILL.md +6 -6
- package/.mindforge/skills/arxiv/scripts/search_arxiv.py +114 -0
- package/.mindforge/skills/code-tour/SKILL.md +2 -2
- package/.mindforge/skills/code-wiki/SKILL.md +11 -11
- package/.mindforge/skills/code-wiki/templates/README.md +31 -0
- package/.mindforge/skills/code-wiki/templates/architecture.md +30 -0
- package/.mindforge/skills/code-wiki/templates/getting-started.md +47 -0
- package/.mindforge/skills/code-wiki/templates/module.md +38 -0
- package/.mindforge/skills/concept-diagrams/SKILL.md +6 -6
- package/.mindforge/skills/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/.mindforge/skills/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/.mindforge/skills/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/.mindforge/skills/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/.mindforge/skills/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/.mindforge/skills/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/.mindforge/skills/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/.mindforge/skills/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/.mindforge/skills/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/.mindforge/skills/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/.mindforge/skills/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/.mindforge/skills/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/.mindforge/skills/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/.mindforge/skills/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/.mindforge/skills/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/.mindforge/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/.mindforge/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/.mindforge/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/.mindforge/skills/concept-diagrams/templates/template.html +174 -0
- package/.mindforge/skills/creative-ideation/references/full-prompt-library.md +110 -0
- package/.mindforge/skills/documentation/SKILL.md +1 -1
- package/.mindforge/skills/domain-intel/SKILL.md +7 -7
- package/.mindforge/skills/domain-intel/scripts/domain_intel.py +397 -0
- package/.mindforge/skills/duckduckgo-search/SKILL.md +17 -17
- package/.mindforge/skills/duckduckgo-search/scripts/duckduckgo.sh +28 -0
- package/.mindforge/skills/environment-management/SKILL.md +1 -1
- package/.mindforge/skills/github-code-review/SKILL.md +9 -9
- package/.mindforge/skills/github-code-review/references/review-output-template.md +74 -0
- package/.mindforge/skills/github-issues/templates/bug-report.md +35 -0
- package/.mindforge/skills/github-issues/templates/feature-request.md +31 -0
- package/.mindforge/skills/github-pr-workflow/SKILL.md +3 -3
- package/.mindforge/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/.mindforge/skills/github-pr-workflow/references/conventional-commits.md +71 -0
- package/.mindforge/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/.mindforge/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/.mindforge/skills/incident-response/SKILL.md +1 -1
- package/.mindforge/skills/jupyter-live-kernel/SKILL.md +3 -3
- package/.mindforge/skills/kanban-orchestrator/SKILL.md +10 -10
- package/.mindforge/skills/kanban-worker/SKILL.md +6 -6
- package/.mindforge/skills/meme-generation/SKILL.md +1 -1
- package/.mindforge/skills/meme-generation/scripts/generate_meme.py +470 -0
- package/.mindforge/skills/meme-generation/scripts/templates.json +97 -0
- package/.mindforge/skills/obsidian/SKILL.md +15 -15
- package/.mindforge/skills/orch-pipeline/SKILL.md +2 -2
- package/.mindforge/skills/osint-investigation/SKILL.md +3 -2
- package/.mindforge/skills/osint-investigation/references/sources/courtlistener.md +98 -0
- package/.mindforge/skills/osint-investigation/references/sources/gdelt.md +104 -0
- package/.mindforge/skills/osint-investigation/references/sources/icij-offshore.md +104 -0
- package/.mindforge/skills/osint-investigation/references/sources/nyc-acris.md +90 -0
- package/.mindforge/skills/osint-investigation/references/sources/ofac-sdn.md +92 -0
- package/.mindforge/skills/osint-investigation/references/sources/opencorporates.md +103 -0
- package/.mindforge/skills/osint-investigation/references/sources/sec-edgar.md +83 -0
- package/.mindforge/skills/osint-investigation/references/sources/senate-ld.md +89 -0
- package/.mindforge/skills/osint-investigation/references/sources/usaspending.md +97 -0
- package/.mindforge/skills/osint-investigation/references/sources/wayback.md +93 -0
- package/.mindforge/skills/osint-investigation/references/sources/wikipedia.md +107 -0
- package/.mindforge/skills/osint-investigation/scripts/_http.py +82 -0
- package/.mindforge/skills/osint-investigation/scripts/_normalize.py +67 -0
- package/.mindforge/skills/osint-investigation/scripts/build_findings.py +221 -0
- package/.mindforge/skills/osint-investigation/scripts/entity_resolution.py +228 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_courtlistener.py +149 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_gdelt.py +161 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_icij_offshore.py +234 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_nyc_acris.py +203 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_ofac_sdn.py +175 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_opencorporates.py +191 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_sec_edgar.py +184 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_senate_ld.py +146 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_usaspending.py +170 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_wayback.py +142 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_wikipedia.py +266 -0
- package/.mindforge/skills/osint-investigation/scripts/timing_analysis.py +252 -0
- package/.mindforge/skills/osint-investigation/templates/source-template.md +59 -0
- package/.mindforge/skills/oss-forensics/SKILL.md +6 -6
- package/.mindforge/skills/oss-forensics/references/evidence-types.md +89 -0
- package/.mindforge/skills/oss-forensics/references/github-archive-guide.md +184 -0
- package/.mindforge/skills/oss-forensics/references/investigation-templates.md +131 -0
- package/.mindforge/skills/oss-forensics/references/recovery-techniques.md +164 -0
- package/.mindforge/skills/oss-forensics/scripts/evidence-store.py +313 -0
- package/.mindforge/skills/oss-forensics/templates/forensic-report.md +151 -0
- package/.mindforge/skills/oss-forensics/templates/malicious-package-report.md +43 -0
- package/.mindforge/skills/pixel-art/SKILL.md +2 -2
- package/.mindforge/skills/pixel-art/references/palettes.md +49 -0
- package/.mindforge/skills/plan/SKILL.md +10 -10
- package/.mindforge/skills/requesting-code-review/SKILL.md +4 -6
- package/.mindforge/skills/research-paper-writing/SKILL.md +32 -32
- package/.mindforge/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
- package/.mindforge/skills/research-paper-writing/references/checklists.md +434 -0
- package/.mindforge/skills/research-paper-writing/references/citation-workflow.md +563 -0
- package/.mindforge/skills/research-paper-writing/references/experiment-patterns.md +728 -0
- package/.mindforge/skills/research-paper-writing/references/human-evaluation.md +476 -0
- package/.mindforge/skills/research-paper-writing/references/paper-types.md +481 -0
- package/.mindforge/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
- package/.mindforge/skills/research-paper-writing/references/sources.md +191 -0
- package/.mindforge/skills/research-paper-writing/references/writing-guide.md +474 -0
- package/.mindforge/skills/research-paper-writing/templates/README.md +251 -0
- package/.mindforge/skills/scrapling/SKILL.md +1 -1
- package/.mindforge/skills/security-review/SKILL.md +1 -1
- package/.mindforge/skills/sherlock/SKILL.md +1 -1
- package/.mindforge/skills/simplify-code/SKILL.md +5 -7
- package/.mindforge/skills/spike/SKILL.md +11 -13
- package/.mindforge/skills/subagent-driven-development/SKILL.md +7 -11
- package/.mindforge/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/.mindforge/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/.mindforge/skills/systematic-debugging/SKILL.md +13 -14
- package/.mindforge/skills/test-driven-development/SKILL.md +7 -8
- package/.mindforge/skills/testing-standards/SKILL.md +1 -1
- package/.mindforge/skills/web-pentest/SKILL.md +2 -2
- package/.mindforge/skills/web-pentest/references/bypass-techniques.md +133 -0
- package/.mindforge/skills/web-pentest/references/exploitation-techniques.md +204 -0
- package/.mindforge/skills/web-pentest/references/scope-enforcement.md +110 -0
- package/.mindforge/skills/web-pentest/references/vuln-taxonomy.md +81 -0
- package/.mindforge/skills/web-pentest/templates/authorization.md +69 -0
- package/.mindforge/skills/web-pentest/templates/pentest-report.md +178 -0
- package/.mindforge/skills/writing-skills/SKILL.md +4 -3
- package/CHANGELOG.md +35 -0
- package/MINDFORGE.md +3 -3
- package/README.md +9 -7
- package/RELEASENOTES.md +65 -2
- package/SECURITY.md +5 -3
- package/bin/autonomous/auto-runner.js +5 -2
- package/bin/engine/skill-loader.js +4 -0
- package/bin/governance/rbac.js +4 -0
- package/bin/memory/eis-client.js +1 -0
- package/bin/mindforge-cli.js +5 -0
- package/bin/models/bedrock-provider.js +192 -0
- package/bin/models/model-client.js +19 -0
- package/bin/spawn-agent.js +9 -2
- package/docs/commands-reference.md +68 -6
- package/docs/faq.md +38 -1
- package/docs/getting-started.md +27 -12
- package/docs/sdk-reference.md +36 -3
- package/docs/troubleshooting.md +59 -1
- package/docs/user-guide.md +7 -4
- package/package.json +3 -3
- package/.claude/commands/mindforge/skill-tdd.md +0 -53
- package/.claude/commands/mindforge/skills-index.md +0 -118
- package/.claude/commands/mindforge/systematic-debug.md +0 -60
- package/.claude/commands/mindforge/wf-accessibility-audit.md +0 -31
- package/.claude/commands/mindforge/wf-ai-model-eval.md +0 -31
- package/.claude/commands/mindforge/wf-api-migration.md +0 -31
- package/.claude/commands/mindforge/wf-architecture-modernization.md +0 -32
- package/.claude/commands/mindforge/wf-catalog.md +0 -59
- package/.claude/commands/mindforge/wf-code-audit.md +0 -31
- package/.claude/commands/mindforge/wf-code-explainer.md +0 -31
- package/.claude/commands/mindforge/wf-competitive-analysis.md +0 -31
- package/.claude/commands/mindforge/wf-competitive-teardown.md +0 -31
- package/.claude/commands/mindforge/wf-cost-analysis.md +0 -31
- package/.claude/commands/mindforge/wf-data-pipeline-validate.md +0 -31
- package/.claude/commands/mindforge/wf-database-migration.md +0 -31
- package/.claude/commands/mindforge/wf-debug-detective.md +0 -32
- package/.claude/commands/mindforge/wf-design-system-audit.md +0 -31
- package/.claude/commands/mindforge/wf-documentation-gen.md +0 -31
- package/.claude/commands/mindforge/wf-feature-planner.md +0 -31
- package/.claude/commands/mindforge/wf-incident-response.md +0 -31
- package/.claude/commands/mindforge/wf-multi-repo-sync.md +0 -31
- package/.claude/commands/mindforge/wf-mutation-testing.md +0 -31
- package/.claude/commands/mindforge/wf-onboard-codebase.md +0 -31
- package/.claude/commands/mindforge/wf-perf-optimize.md +0 -31
- package/.claude/commands/mindforge/wf-pr-review.md +0 -31
- package/.claude/commands/mindforge/wf-refactor-plan.md +0 -31
- package/.claude/commands/mindforge/wf-release-prep.md +0 -31
- package/.claude/commands/mindforge/wf-security-threat-model.md +0 -31
- package/.claude/commands/mindforge/wf-tdd-sprint.md +0 -31
- package/.claude/commands/mindforge/wf-tech-evaluation.md +0 -31
- package/.claude/commands/mindforge/wf-ux-heuristic-audit.md +0 -31
- package/.claude/commands/mindforge/wf-writer-reviewer.md +0 -30
|
@@ -11,144 +11,142 @@ export const meta = {
|
|
|
11
11
|
],
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
remediation: { type: 'string' },
|
|
31
|
-
},
|
|
32
|
-
required: ['severity', 'title', 'description', 'remediation'],
|
|
14
|
+
const FINDING_SCHEMA = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
dimension: { type: 'string' },
|
|
18
|
+
findings: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
cwe: { type: 'string' },
|
|
24
|
+
owasp: { type: 'string' },
|
|
25
|
+
severity: { type: 'string', enum: ['critical', 'high', 'medium', 'low', 'info'] },
|
|
26
|
+
title: { type: 'string' },
|
|
27
|
+
location: { type: 'string' },
|
|
28
|
+
description: { type: 'string' },
|
|
29
|
+
remediation: { type: 'string' },
|
|
33
30
|
},
|
|
31
|
+
required: ['severity', 'title', 'description', 'remediation'],
|
|
34
32
|
},
|
|
35
33
|
},
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
},
|
|
35
|
+
required: ['dimension', 'findings'],
|
|
36
|
+
};
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
const VERDICT_SCHEMA = {
|
|
39
|
+
type: 'object',
|
|
40
|
+
properties: { isReal: { type: 'boolean' }, cvssEstimate: { type: 'number' }, reason: { type: 'string' } },
|
|
41
|
+
required: ['isReal', 'reason'],
|
|
42
|
+
};
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
required: ['stride', 'threat', 'likelihood', 'impact', 'mitigation'],
|
|
44
|
+
const THREAT_SCHEMA = {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
strideThreats: {
|
|
48
|
+
type: 'array',
|
|
49
|
+
items: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
properties: {
|
|
52
|
+
stride: { type: 'string', enum: ['Spoofing', 'Tampering', 'Repudiation', 'InfoDisclosure', 'DoS', 'ElevationOfPrivilege'] },
|
|
53
|
+
threat: { type: 'string' },
|
|
54
|
+
likelihood: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
55
|
+
impact: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
56
|
+
mitigation: { type: 'string' },
|
|
60
57
|
},
|
|
58
|
+
required: ['stride', 'threat', 'likelihood', 'impact', 'mitigation'],
|
|
61
59
|
},
|
|
62
60
|
},
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
},
|
|
62
|
+
required: ['strideThreats'],
|
|
63
|
+
};
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
required: ['sprint', 'items', 'riskReduction'],
|
|
65
|
+
const ROADMAP_SCHEMA = {
|
|
66
|
+
type: 'object',
|
|
67
|
+
properties: {
|
|
68
|
+
summary: { type: 'string' },
|
|
69
|
+
overallRisk: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
|
|
70
|
+
immediateActions: { type: 'array', items: { type: 'string' } },
|
|
71
|
+
roadmap: {
|
|
72
|
+
type: 'array',
|
|
73
|
+
items: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
properties: {
|
|
76
|
+
sprint: { type: 'number' },
|
|
77
|
+
items: { type: 'array', items: { type: 'string' } },
|
|
78
|
+
riskReduction: { type: 'string' },
|
|
82
79
|
},
|
|
80
|
+
required: ['sprint', 'items', 'riskReduction'],
|
|
83
81
|
},
|
|
84
82
|
},
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
},
|
|
84
|
+
required: ['summary', 'overallRisk', 'immediateActions', 'roadmap'],
|
|
85
|
+
};
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
const target = args || 'current codebase (run from repo root)';
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
phase('Scope');
|
|
90
|
+
log(`Security hardening target: ${target}`);
|
|
92
91
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
const SCOUTS = [
|
|
93
|
+
{ label: 'injection', prompt: `Scout for injection vulnerabilities in: "${target}". Cover: SQL injection, command injection, LDAP injection, XSS (stored/reflected/DOM), SSTI, XXE, path traversal (CWE-89, CWE-78, CWE-79, CWE-611, CWE-22). For each finding provide CWE ID, OWASP category, exact file/line if possible, and remediation.` },
|
|
94
|
+
{ label: 'auth-access', prompt: `Scout for authentication and access control issues in: "${target}". Cover: broken authentication, missing auth checks, JWT flaws, session fixation, privilege escalation, IDOR, missing rate limits (OWASP A01, A07). Include CWE IDs and remediation.` },
|
|
95
|
+
{ label: 'crypto-secrets', prompt: `Scout for cryptographic failures and secret exposure in: "${target}". Cover: hardcoded secrets, weak hashing (MD5/SHA1 for passwords), insecure random, unencrypted PII in transit/at-rest, certificate validation bypass (CWE-327, CWE-798, CWE-330). Include CWE IDs and remediation.` },
|
|
96
|
+
{ label: 'config-supply', prompt: `Scout for security misconfiguration and supply chain risks in: "${target}". Cover: debug endpoints exposed, CORS misconfig, CSP missing, dependency vulns, unpinned deps, outdated packages with CVEs (OWASP A05, A06). Include CWE IDs and remediation.` },
|
|
97
|
+
{ label: 'logging-monitoring', prompt: `Scout for logging, monitoring, and error handling security gaps in: "${target}". Cover: sensitive data in logs, missing audit trails, verbose error messages leaking internals, missing security event logging, SSRF via fetch/request (OWASP A09, A10, CWE-209). Include CWE IDs and remediation.` },
|
|
98
|
+
];
|
|
100
99
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
phase('Scout');
|
|
101
|
+
const scouts = await parallel(
|
|
102
|
+
SCOUTS.map(s => () => agent(s.prompt, { schema: FINDING_SCHEMA, label: `scout:${s.label}`, phase: 'Scout' }))
|
|
103
|
+
);
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
phase('Verify');
|
|
106
|
+
const allFindings = scouts.filter(Boolean).flatMap(s => (s.findings || []).map(f => ({ ...f, dimension: s.dimension })));
|
|
107
|
+
const criticalAndHigh = allFindings.filter(f => f.severity === 'critical' || f.severity === 'high');
|
|
108
|
+
log(`${allFindings.length} total findings, ${criticalAndHigh.length} critical/high → 3-vote adversarial verify`);
|
|
110
109
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
110
|
+
const verified = await parallel(
|
|
111
|
+
criticalAndHigh.map(f => () =>
|
|
112
|
+
parallel([
|
|
113
|
+
() => agent(`Try to REFUTE this security finding — is it a false positive? Finding: [${f.severity.toUpperCase()}] ${f.title} — ${f.description}. Default refuted=false only if clearly real.`, { schema: VERDICT_SCHEMA, label: `v1:${f.title.slice(0, 25)}`, phase: 'Verify' }),
|
|
114
|
+
() => agent(`Challenge this finding from an attacker's perspective — is it actually exploitable? Finding: [${f.severity.toUpperCase()}] ${f.title} — ${f.description}. Rate exploitability.`, { schema: VERDICT_SCHEMA, label: `v2:${f.title.slice(0, 25)}`, phase: 'Verify' }),
|
|
115
|
+
() => agent(`Assess business impact of this finding being exploited. Is the severity rating accurate? Finding: [${f.severity.toUpperCase()}] ${f.title} — ${f.description}.`, { schema: VERDICT_SCHEMA, label: `v3:${f.title.slice(0, 25)}`, phase: 'Verify' }),
|
|
116
|
+
]).then(votes => {
|
|
117
|
+
if (!votes) return { ...f, confirmed: false };
|
|
118
|
+
const realVotes = votes.filter(Boolean).filter(v => v.isReal).length;
|
|
119
|
+
return { ...f, confirmed: realVotes >= 2 };
|
|
120
|
+
})
|
|
121
|
+
)
|
|
122
|
+
);
|
|
124
123
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
const confirmedHigh = verified.filter(Boolean).filter(f => f.confirmed);
|
|
125
|
+
const lowerSeverity = allFindings.filter(f => f.severity !== 'critical' && f.severity !== 'high');
|
|
126
|
+
const allConfirmed = [...confirmedHigh, ...lowerSeverity];
|
|
127
|
+
log(`${confirmedHigh.length}/${criticalAndHigh.length} critical/high confirmed after 3-vote verification`);
|
|
129
128
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
phase('ThreatModel');
|
|
130
|
+
const findingSummary = allConfirmed.slice(0, 15).map(f => `[${f.severity}] ${f.title}: ${f.description}`).join('\n');
|
|
131
|
+
const threatModel = await agent(
|
|
132
|
+
`Generate a STRIDE threat model for: "${target}"\n\nBased on these confirmed findings:\n${findingSummary}\n\nFor each STRIDE category (Spoofing, Tampering, Repudiation, InfoDisclosure, DoS, ElevationOfPrivilege) identify the top threat, likelihood, impact, and mitigation.`,
|
|
133
|
+
{ schema: THREAT_SCHEMA, label: 'threat-model', phase: 'ThreatModel' }
|
|
134
|
+
);
|
|
135
|
+
if (!threatModel) { log('Warning: agent returned null for threatModel, skipping'); return { target, error: 'agent-null' }; }
|
|
137
136
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
phase('Roadmap');
|
|
138
|
+
const threatSummary = (threatModel.strideThreats || []).map(t => `[${t.stride}] ${t.threat} (${t.likelihood} likelihood, ${t.impact} impact) → ${t.mitigation}`).join('\n');
|
|
139
|
+
const roadmap = await agent(
|
|
140
|
+
`Create a prioritized security remediation roadmap for: "${target}"\n\nConfirmed findings (${allConfirmed.length} total):\n${findingSummary}\n\nSTRIDE threats:\n${threatSummary}\n\nGroup into 3 sprints by severity+effort. Sprint 1 = immediate (critical/high, low effort). Sprint 2 = short-term (high, higher effort + medium). Sprint 3 = long-term (medium/low). Include risk reduction estimate per sprint.`,
|
|
141
|
+
{ schema: ROADMAP_SCHEMA, label: 'roadmap', phase: 'Roadmap' }
|
|
142
|
+
);
|
|
143
|
+
if (!roadmap) { return { target, threats: threatModel, error: 'roadmap-agent-null', stats: { total: allFindings.length, criticalHigh: criticalAndHigh.length, confirmed: confirmedHigh.length } }; }
|
|
145
144
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
145
|
+
return {
|
|
146
|
+
target,
|
|
147
|
+
threats: threatModel,
|
|
148
|
+
report: {
|
|
149
|
+
...roadmap,
|
|
150
|
+
stats: { total: allFindings.length, criticalHigh: criticalAndHigh.length, confirmed: confirmedHigh.length, lower: lowerSeverity.length },
|
|
151
|
+
},
|
|
152
|
+
};
|
|
@@ -10,150 +10,148 @@ export const meta = {
|
|
|
10
10
|
],
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
description: { type: 'string' },
|
|
26
|
-
},
|
|
27
|
-
required: ['name', 'type', 'sensitivity'],
|
|
13
|
+
const ASSETS_SCHEMA = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
assets: {
|
|
17
|
+
type: 'array',
|
|
18
|
+
items: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
name: { type: 'string' },
|
|
22
|
+
type: { type: 'string', enum: ['data', 'service', 'credential', 'infrastructure', 'user'] },
|
|
23
|
+
sensitivity: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
|
|
24
|
+
description: { type: 'string' },
|
|
28
25
|
},
|
|
26
|
+
required: ['name', 'type', 'sensitivity'],
|
|
29
27
|
},
|
|
30
|
-
dataFlows: { type: 'array', items: { type: 'string' } },
|
|
31
|
-
trustBoundaries: { type: 'array', items: { type: 'string' } },
|
|
32
|
-
entryPoints: { type: 'array', items: { type: 'string' } },
|
|
33
28
|
},
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
dataFlows: { type: 'array', items: { type: 'string' } },
|
|
30
|
+
trustBoundaries: { type: 'array', items: { type: 'string' } },
|
|
31
|
+
entryPoints: { type: 'array', items: { type: 'string' } },
|
|
32
|
+
},
|
|
33
|
+
required: ['assets', 'dataFlows', 'trustBoundaries', 'entryPoints'],
|
|
34
|
+
};
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
required: ['threatId', 'title', 'affectedAsset', 'likelihood', 'impact', 'description'],
|
|
36
|
+
const STRIDE_SCHEMA = {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
category: { type: 'string', enum: ['Spoofing', 'Tampering', 'Repudiation', 'InformationDisclosure', 'DenialOfService', 'ElevationOfPrivilege'] },
|
|
40
|
+
threats: {
|
|
41
|
+
type: 'array',
|
|
42
|
+
items: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
threatId: { type: 'string' },
|
|
46
|
+
title: { type: 'string' },
|
|
47
|
+
affectedAsset: { type: 'string' },
|
|
48
|
+
attackVector: { type: 'string' },
|
|
49
|
+
likelihood: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
50
|
+
impact: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
51
|
+
description: { type: 'string' },
|
|
55
52
|
},
|
|
53
|
+
required: ['threatId', 'title', 'affectedAsset', 'likelihood', 'impact', 'description'],
|
|
56
54
|
},
|
|
57
55
|
},
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
},
|
|
57
|
+
required: ['category', 'threats'],
|
|
58
|
+
};
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
required: ['control', 'type', 'implementation', 'effort'],
|
|
60
|
+
const MITIGATION_SCHEMA = {
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: {
|
|
63
|
+
threatId: { type: 'string' },
|
|
64
|
+
controls: {
|
|
65
|
+
type: 'array',
|
|
66
|
+
items: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: {
|
|
69
|
+
control: { type: 'string' },
|
|
70
|
+
type: { type: 'string', enum: ['preventive', 'detective', 'corrective'] },
|
|
71
|
+
implementation: { type: 'string' },
|
|
72
|
+
effort: { type: 'string', enum: ['low', 'medium', 'high'] },
|
|
76
73
|
},
|
|
74
|
+
required: ['control', 'type', 'implementation', 'effort'],
|
|
77
75
|
},
|
|
78
|
-
residualRisk: { type: 'string', enum: ['high', 'medium', 'low', 'accepted'] },
|
|
79
76
|
},
|
|
80
|
-
|
|
81
|
-
}
|
|
77
|
+
residualRisk: { type: 'string', enum: ['high', 'medium', 'low', 'accepted'] },
|
|
78
|
+
},
|
|
79
|
+
required: ['threatId', 'controls', 'residualRisk'],
|
|
80
|
+
};
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
required: ['threatId', 'title', 'category', 'cvssEstimate', 'priority'],
|
|
82
|
+
const SCORE_SCHEMA = {
|
|
83
|
+
type: 'object',
|
|
84
|
+
properties: {
|
|
85
|
+
summary: { type: 'string' },
|
|
86
|
+
overallRiskLevel: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
|
|
87
|
+
scoreMatrix: {
|
|
88
|
+
type: 'array',
|
|
89
|
+
items: {
|
|
90
|
+
type: 'object',
|
|
91
|
+
properties: {
|
|
92
|
+
threatId: { type: 'string' },
|
|
93
|
+
title: { type: 'string' },
|
|
94
|
+
category: { type: 'string' },
|
|
95
|
+
cvssEstimate: { type: 'number' },
|
|
96
|
+
priority: { type: 'string', enum: ['p0', 'p1', 'p2', 'p3'] },
|
|
97
|
+
mitigationStatus: { type: 'string', enum: ['mitigated', 'partial', 'unmitigated'] },
|
|
101
98
|
},
|
|
99
|
+
required: ['threatId', 'title', 'category', 'cvssEstimate', 'priority'],
|
|
102
100
|
},
|
|
103
|
-
topRisks: { type: 'array', items: { type: 'string' } },
|
|
104
101
|
},
|
|
105
|
-
|
|
106
|
-
}
|
|
102
|
+
topRisks: { type: 'array', items: { type: 'string' } },
|
|
103
|
+
},
|
|
104
|
+
required: ['summary', 'overallRiskLevel', 'scoreMatrix', 'topRisks'],
|
|
105
|
+
};
|
|
107
106
|
|
|
108
|
-
|
|
107
|
+
const target = args || 'current system (run from repo root or describe the system in args)';
|
|
109
108
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
phase('Assets');
|
|
110
|
+
log(`Threat modeling target: ${target}`);
|
|
111
|
+
const assetModel = await agent(
|
|
112
|
+
`Inventory the security-relevant assets, data flows, and trust boundaries for: "${target}". Identify: (1) assets (data stores, services, credentials, infrastructure) with sensitivity level, (2) data flows between components, (3) trust boundaries (where data crosses privilege levels), (4) entry points (public APIs, user inputs, external integrations).`,
|
|
113
|
+
{ schema: ASSETS_SCHEMA, label: 'assets' }
|
|
114
|
+
);
|
|
115
|
+
if (!assetModel) { return { target, error: 'assetModel-agent-null' }; }
|
|
116
|
+
log(`${assetModel.assets.length} assets, ${assetModel.trustBoundaries.length} trust boundaries, ${assetModel.entryPoints.length} entry points`);
|
|
118
117
|
|
|
119
|
-
|
|
118
|
+
const assetContext = `Assets: ${assetModel.assets.slice(0, 5).map(a => `${a.name}(${a.sensitivity})`).join(', ')}\nData flows: ${assetModel.dataFlows.slice(0, 3).join(', ')}\nTrust boundaries: ${assetModel.trustBoundaries.slice(0, 3).join(', ')}\nEntry points: ${assetModel.entryPoints.slice(0, 3).join(', ')}`;
|
|
120
119
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
phase('STRIDE');
|
|
121
|
+
const STRIDE_CATEGORIES = [
|
|
122
|
+
{ cat: 'Spoofing', prompt: `Identify SPOOFING threats for: "${target}". ${assetContext}. Spoofing = an attacker pretends to be someone/something they're not. Look for: weak authentication, missing identity verification, forged tokens/sessions, impersonation attacks. Assign each threat a unique ID (S-01, S-02...), affected asset, likelihood, and impact.` },
|
|
123
|
+
{ cat: 'Tampering', prompt: `Identify TAMPERING threats for: "${target}". ${assetContext}. Tampering = malicious modification of data. Look for: insufficient authorization on write operations, missing integrity checks, SQL/command injection, insecure deserialization, CSRF. Assign IDs (T-01...), affected asset, likelihood, impact.` },
|
|
124
|
+
{ cat: 'Repudiation', prompt: `Identify REPUDIATION threats for: "${target}". ${assetContext}. Repudiation = ability to deny performing an action. Look for: missing audit logs, insufficient logging of sensitive operations, lack of digital signatures, no non-repudiation controls. Assign IDs (R-01...).` },
|
|
125
|
+
{ cat: 'InformationDisclosure', prompt: `Identify INFORMATION DISCLOSURE threats for: "${target}". ${assetContext}. Info disclosure = exposure of data to unauthorized parties. Look for: verbose error messages, debug endpoints, insecure data storage, missing encryption at rest/transit, over-permissive APIs, PII exposure. Assign IDs (I-01...).` },
|
|
126
|
+
{ cat: 'DenialOfService', prompt: `Identify DENIAL OF SERVICE threats for: "${target}". ${assetContext}. DoS = making resources unavailable. Look for: missing rate limits, resource exhaustion endpoints, expensive unbounded queries, large payload acceptance without limits, connection pool exhaustion. Assign IDs (D-01...).` },
|
|
127
|
+
{ cat: 'ElevationOfPrivilege', prompt: `Identify ELEVATION OF PRIVILEGE threats for: "${target}". ${assetContext}. EoP = gaining unauthorized capabilities. Look for: broken access control, IDOR, privilege escalation paths, JWT/token manipulation, missing authorization checks on admin functions. Assign IDs (E-01...).` },
|
|
128
|
+
];
|
|
130
129
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
const strideResults = await parallel(
|
|
131
|
+
STRIDE_CATEGORIES.map(s => () => agent(s.prompt, { schema: STRIDE_SCHEMA, label: `stride:${s.cat.toLowerCase()}`, phase: 'STRIDE' }))
|
|
132
|
+
);
|
|
134
133
|
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
const allThreats = strideResults.filter(Boolean).flatMap(s => s.threats.map(t => ({ category: s.category, ...t })));
|
|
135
|
+
log(`${allThreats.length} threats identified across 6 STRIDE categories`);
|
|
137
136
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
phase('Mitigate');
|
|
138
|
+
const highPriorityThreats = allThreats.filter(t => t.likelihood === 'high' || t.impact === 'high').slice(0, 12);
|
|
139
|
+
log(`Generating mitigations for ${highPriorityThreats.length} high-priority threats`);
|
|
141
140
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
const mitigations = await parallel(
|
|
142
|
+
highPriorityThreats.map(t => () => agent(
|
|
143
|
+
`Design mitigations for this threat in: "${target}"\n\nThreat ${t.threatId} [${t.category}]: ${t.title}\nDescription: ${t.description}\nAffected asset: ${t.affectedAsset}\nLikelihood: ${t.likelihood}, Impact: ${t.impact}\n\nProvide 2-3 security controls: preventive (stop it), detective (detect it), or corrective (respond to it). Include specific implementation steps and effort estimate. Rate residual risk after controls.`,
|
|
144
|
+
{ schema: MITIGATION_SCHEMA, label: `mitigate:${t.threatId}`, phase: 'Mitigate' }
|
|
145
|
+
))
|
|
146
|
+
);
|
|
148
147
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
phase('Score');
|
|
149
|
+
const threatContext = allThreats.slice(0, 15).map(t => `${t.threatId} [${t.category}/${t.likelihood}/${t.impact}]: ${t.title}`).join('\n');
|
|
150
|
+
const mitigationContext = mitigations.filter(Boolean).map(m => `${m.threatId}: ${m.controls.length} controls, residual=${m.residualRisk}`).join('\n');
|
|
152
151
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
const scoreMatrix = await agent(
|
|
153
|
+
`Create a CVSS-style risk score matrix for: "${target}"\n\nThreats:\n${threatContext}\n\nMitigations:\n${mitigationContext}\n\nFor each threat estimate a CVSS base score (0.0-10.0) based on likelihood×impact. Assign priority (P0=CVSS≥9, P1=7-8.9, P2=4-6.9, P3=<4). Determine overall risk level and list top 5 risks to address immediately.`,
|
|
154
|
+
{ schema: SCORE_SCHEMA, label: 'score-matrix' }
|
|
155
|
+
);
|
|
157
156
|
|
|
158
|
-
|
|
159
|
-
}
|
|
157
|
+
return { target, assetModel, threats: allThreats, mitigations: mitigations.filter(Boolean), scoreMatrix };
|