Repository navigation
Add CWE v4.19.1 per-domain security audit taxonomies - #230
Merged
Alan Jowett (Alan-Jowett) merged 1 commit intoApr 8, 2026
Merged
Conversation
Alan Jowett (Alan-Jowett)
force-pushed
the
cwe-taxonomy-ingestion
branch
from
April 8, 2026 15:45
d4857b1 to
4758b82
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a version-pinned ingestion pipeline for the MITRE CWE v4.19.1 corpus and commits the generated, per-domain CWE taxonomy artifacts so PromptKit security-audit templates can scope audits to domain-relevant weakness classes.
Changes:
- Adds a standalone
scripts/ingest-cwe.pypipeline to parse CWE XML, map CWEs into 13 audit domains, generate taxonomy Markdown files, and emit normalized JSON artifacts. - Adds 13 new
taxonomies/cwe-*.mdfiles (one per audit domain) plus versioned data outputs underdata/cwe/4.19.1/. - Registers the new taxonomies in
manifest.yamland updates.gitignoreto avoid committing raw CWE XML downloads.
Reviewed changes
Copilot reviewed 16 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/ingest-cwe.py |
Implements CWE XML parsing, domain mapping, taxonomy generation, meta/diff output, and sanity checks. |
manifest.yaml |
Adds 13 taxonomy entries for the new CWE per-domain taxonomies. |
.gitignore |
Ignores raw CWE XML downloads to keep large upstream artifacts out of the repo. |
.github/skills/ingest-cwe-taxonomies/SKILL.md |
Adds a Copilot skill wrapper describing how to run the ingestion workflow. |
.github/prompts/ingest-cwe-taxonomies.prompt.md |
Adds a Copilot prompt file defining the end-to-end CWE ingestion workflow and validation rules. |
data/cwe/4.19.1/meta.json |
Captures version metadata, source hash, and generation timestamp for CWE v4.19.1. |
data/cwe/4.19.1/cwe-normalized.json |
Stores normalized CWE weakness records extracted from the XML corpus. |
data/cwe/4.19.1/domain-mappings.json |
Stores per-domain CWE assignments with mapping rationale. |
data/cwe/4.19.1/unmapped.json |
Stores CWEs that were not mapped to any domain (with reasons). |
taxonomies/cwe-cli-tools.md |
New CWE taxonomy scoped to CLI tools. |
taxonomies/cwe-cloud-service.md |
New CWE taxonomy scoped to cloud-hosted services/APIs. |
taxonomies/cwe-container-k8s.md |
New CWE taxonomy scoped to containers/Kubernetes. |
taxonomies/cwe-crypto-protocols.md |
New CWE taxonomy scoped to cryptographic protocols. |
taxonomies/cwe-data-processing.md |
New CWE taxonomy scoped to data pipelines/ETL/batch processing. |
taxonomies/cwe-firmware-embedded.md |
New CWE taxonomy scoped to firmware/embedded systems. |
taxonomies/cwe-iac.md |
New CWE taxonomy scoped to Infrastructure-as-Code. |
taxonomies/cwe-kernel-mode-c-cpp.md |
New CWE taxonomy scoped to kernel-mode C/C++. |
taxonomies/cwe-managed-dotnet.md |
New CWE taxonomy scoped to managed .NET. |
taxonomies/cwe-mobile-app.md |
New CWE taxonomy scoped to mobile apps. |
taxonomies/cwe-native-user-mode-c-cpp.md |
New CWE taxonomy scoped to native user-mode C/C++. |
taxonomies/cwe-web-backend.md |
New CWE taxonomy scoped to web backends. |
taxonomies/cwe-web-js-ts.md |
New CWE taxonomy scoped to web JS/TS frontends. |
Ingest the MITRE CWE v4.19.1 corpus (969 weaknesses, 944 active) and generate 13 per-domain taxonomy files for PromptKit security audits. Artifacts: - scripts/ingest-cwe.py: standalone, reusable ingestion script - data/cwe/4.19.1/: normalized data, domain mappings, metadata - taxonomies/cwe-*.md: 13 domain taxonomy files (626 mapped CWEs) Domains: kernel-mode-c-cpp (113), native-user-mode-c-cpp (172), managed-dotnet (92), web-js-ts (265), web-backend (423), cloud-service (113), iac (8), firmware-embedded (226), crypto-protocols (63), data-processing (69), cli-tools (65), mobile-app (23), container-k8s (5). Mapping uses 4-priority algorithm: CWE view membership, platform match, context/keyword analysis, and override rules. All domain exclusion and consistency checks pass. Template integration (domain parameter support) tracked in Issue microsoft#228. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Alan Jowett (Alan-Jowett)
force-pushed
the
cwe-taxonomy-ingestion
branch
from
April 8, 2026 15:51
4758b82 to
da3368e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ingests the MITRE CWE v4.19.1 corpus and generates 13 per-domain security audit taxonomy files for PromptKit. This enables domain-scoped security audits that only consider CWE classes relevant to the target software domain.
What's included
Domain coverage
Total: 626 unique CWEs mapped out of 944 active (318 unmapped — mostly abstract Pillar-level CWEs without domain-specific applicability).
Mapping algorithm
4-priority system applied per CWE:
Verification
All sanity checks pass:
Next steps
Template integration (adding \domain\ parameter to \investigate-security,
eview-code, \�xhaustive-bug-hunt) is tracked separately in #228.
Notes