One-pass CAPEC ingestion → generate per-domain attack pattern taxonomies for PromptKit security audits
还没有人认领这个 Issue。
评估
调研方向
先阅读 #228/#229 中的 CWE 摄取实现,然后检查 CAPEC 下载内容和 schema 参考。将工作分配到 .github/prompts/、.github/skills/、scripts/ingest-capec.py、data/capec/、taxonomies/ 和 manifest.yaml。完成标准是一次运行即可生成按域划分且带版本的 CAPEC 分类体系,并包含 CWE 交叉引用和验证。
由索引模型根据 Issue 内容生成。
描述
Problem / Motivation
PromptKit security audits currently scope what weakness to look for (via CWE taxonomies from #228), but do not scope how attackers exploit those weaknesses. CAPEC (Common Attack Pattern Enumeration and Classification) is the complementary MITRE database that classifies attack patterns — the adversary-side view of CWE weaknesses.
Adding CAPEC-derived taxonomies would let security audit prompts guide the LLM with domain-specific attack patterns, improving threat modeling and exploit path analysis.
CAPEC entries cross-reference CWE IDs, so the two taxonomy sets can be composed: "look for these weaknesses (CWE) using these attack patterns (CAPEC)."
Goal
Implement a pipeline (modeled on the CWE ingestion skill from #228/#229) that:
- Ingests the official CAPEC corpus (versioned XML) from MITRE: https://capec.mitre.org/data/downloads.html
- In a single run, generates per-domain CAPEC taxonomies (reusing the same 13-domain registry from #228).
- Cross-references CWE IDs in each CAPEC entry to enable CWE↔CAPEC composition at audit time.
Deliverables
/ingest-capec-taxonomiesprompt file (.github/prompts/) and matching CLI skill (.github/skills/)- Reusable Python script at
scripts/ingest-capec.py - Per-domain taxonomy files:
taxonomies/capec-<domain>.md - Normalized data:
data/capec/<version>/ - Updated
manifest.yaml
Design Notes
- Same architecture as CWE ingestion: 6-phase pipeline (Acquisition → Normalization → Domain Mapping → Taxonomy Generation → Integration → Verification)
- Same domain registry: Reuse the 13 domains from #228. Consider extracting the registry to a shared
data/domain-registry.jsonso both skills reference the same list. - CAPEC XML schema differs from CWE — separate parsing logic required. Key fields: attack pattern ID, name, abstraction, prerequisites, related weaknesses (CWE IDs), execution flow, consequences.
- Domain mapping: Use CAPEC
Related_WeaknessCWE cross-references as the primary signal (map CAPEC entries to domains via their associated CWEs). Fall back to CAPEC-specificPrerequisitesandSkills_Requiredfields. - Separate skill from CWE ingestion — different input format, different semantics (attack patterns vs weakness classes), different parsing.
External References
- CAPEC downloads: https://capec.mitre.org/data/downloads.html
- CAPEC schema: https://capec.mitre.org/documents/schema/
- CAPEC↔CWE mapping: cross-references embedded in CAPEC XML
Related_Weaknesselements
Non-Goals
- Do not merge with the CWE ingestion skill — keep as separate, composable skills.
- Do not claim exploitability of specific code from attack patterns.
- Do not fork or maintain a separate CAPEC; track upstream MITRE versions.
Relationship to Other Issues
- Depends on #228 for the domain registry and taxonomy file conventions.
- CAPEC taxonomies complement CWE taxonomies — together they scope both the "what" and "how" of security audits.
- 主要语言
- JavaScript
- 星标
- 111
- 派生
- 24
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/PromptKit 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 35/100
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 30/100
-
Investigate: structured feedback classification as a cross-cutting protocol可能重新可做 @abeltrano 于 193 天前认领,目前没有进行中的 PR。 未关闭enhancement
查看 microsoft/PromptKit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
-
[quality] Nothing keeps docs/skills/manifest.md in sync with docs/skills/*.md可能已有人在做 @hivecommons-hive 今天认领。 未关闭agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5n31 quality testing
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
agent:blocked agent:ready
难度 2/5 1-3 小时 新手友好度 74/100
turbot/guardrails-fn#46 · 2 条评论 ·
维护者通常 1 天内回复
-
needs verification
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 6 天内回复