A comprehensive CPE (Common Platform Enumeration) toolkit for cybersecurity — parsing, matching, generation, vulnerability correlation, SBOM, and beyond. AI-native: designed for AI agents to consume directly via SKILLS, Go SDK, CLI, and MCP.
🤖 This block is structured for machine consumption. AI agents can extract project metadata, integration paths, capabilities, and entry-point functions directly. Everything below is verified against the source — no aspirational features.
| Field | Value |
|---|---|
| Project | cpe-skills |
| One-liner | CPE (Common Platform Enumeration) toolkit — parsing, matching, generation, vulnerability correlation, SBOM, VEX. |
| Language | Go (module github.com/scagogogo/cpe-skills, requires Go ≥ 1.25) |
| MCP SDK | github.com/modelcontextprotocol/go-sdk v1.6.1 |
| Coverage | ≥ 91% (CI gate at 90% on main package) |
| Test cases | 1478 |
| Exported symbols | ~2129 (1690 functions + 325 methods + 114 types) |
| Platforms | 108 prebuilt binaries per release — 9 OSes × 13 architectures |
| License | MIT |
| Website | https://scagogogo.github.io/cpe-skills/ |
| Repo | https://github.com/scagogogo/cpe-skills |
| API stability | Package-level API is stable; functions are additive and backward-compatible across minor releases. |
| Path | Best for | Install / Config | Entry point |
|---|---|---|---|
| SKILLS | AI / LLM agents | https://github.com/scagogogo/cpe-skills |
SKILLS.md |
| Go SDK | Go applications | go get github.com/scagogogo/cpe-skills |
cpeskills.Parse |
| CLI | Shell / CI / scripts | go install github.com/scagogogo/cpe-skills/cmd/cpe@latest |
cpe parse/match/search/dict |
| MCP | MCP-compatible AI clients | command: cpe, args: ["mcp", "serve"] |
cpe mcp serve (6 tools) |
parse_cpe · format_cpe · match_cpe · validate_cpe · generate_cpe · compare_versions
| Category | Entry functions |
|---|---|
| Parsing | Parse, ParseCpe22, ParseCpe23, MustParse |
| Matching (NISTIR 7696) | MatchCPE, QuickMatch, AdvancedMatchCPE, BatchMatchCPEs |
| Generation & Builder | GenerateCPE, FuzzyGenerateCPE, NewCPEBuilder, RandomCPE |
| WFN Binding & Escaping | BindToFS, BindToURI, UnbindFS, FromCPE |
| Validation & Normalization | ValidateCPE, NormalizeCPE, NormalizeVendorName, NormalizeProductName |
| Storage & Index | NewMemoryStorage, NewFileStorage, NewCPEIndex, ParseDictionary |
| Vulnerability Correlation | CreateNVDDataSource, NewOSVClient, NewEPSSClient, NewKEVClient |
| SBOM & PURL | NewSBOM, ParseCycloneDXJSON, ParseSPDXJSON, CPEToPURL, PURLToCPE |
| Risk Scoring & VEX | NewDefaultRiskScorer, ScoreComponents, NewVEXDocument, GenerateVEXFromFindings |
| Export | ExportToJSON, ExportToCSV, ExportToSARIF, ExportSBOMToCycloneDX |
| Infrastructure | NewCPESet, ParseExpression, NewParsingError, SetLogger |
| OS | Architectures |
|---|---|
| Linux | 386, amd64, arm64, arm (5/6/7), mips, mips64, mipsle, mips64le, ppc64, ppc64le, riscv64, s390x, loong64 |
| macOS | amd64, arm64 (Apple Silicon) |
| Windows | 386, amd64, arm64 |
| FreeBSD / OpenBSD / NetBSD | 386, amd64, arm64, arm |
| Illumos / Solaris | amd64 |
| AIX | ppc64 |
Add to your Claude Code skills configuration:
https://github.com/scagogogo/cpe-skills
go get github.com/scagogogo/cpe-skillspackage main
import (
"fmt"
cpeskills "github.com/scagogogo/cpe-skills"
)
func main() {
// Parse any CPE format (auto-detect 2.2 / 2.3)
c, _ := cpeskills.Parse("cpe:2.3:a:microsoft:windows:10:*:*:*:*:*:*:*")
fmt.Printf("Vendor: %s, Product: %s, Version: %s\n", c.Vendor, c.ProductName, c.Version)
// NISTIR 7696 matching
matched, _ := cpeskills.QuickMatch(
"cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*",
"cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*",
)
fmt.Println("Matched:", matched)
}# Option A: install via Go
go install github.com/scagogogo/cpe-skills/cmd/cpe@latest
# Option B: download a prebuilt binary for your platform from Releases
# → https://github.com/scagogogo/cpe-skills/releases (108 platforms)
# Option C: build from source
git clone https://github.com/scagogogo/cpe-skills.git
cd cpe-skills && go build -o cpe ./cmd/cpe
# Usage
cpe parse "cpe:2.3:a:microsoft:windows:10:*:*:*:*:*:*:*"
cpe match "cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*" \
"cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*"
cpe search --vendor apache --product log4j{
"mcpServers": {
"cpe-skills": {
"command": "cpe",
"args": ["mcp", "serve"]
}
}
}Once connected, the AI client can call these tools:
parse_cpe {cpe}— parse a CPE into componentsformat_cpe {cpe, to}— convert between 2.2/2.3/wfnmatch_cpe {criteria, target, ignore_version?}— NISTIR 7696 matchingvalidate_cpe {cpe}— validate a CPE stringgenerate_cpe {part, vendor, product, version}— build a CPEcompare_versions {a, b, min?, max?}— compare version strings
A typical AI agent workflow using cpe-skills to triage a vulnerable dependency:
flowchart LR
A[User: is log4j 2.14.1 vulnerable?] --> B[Agent calls parse_cpe]
B --> C[Generate CPE for log4j 2.14.1]
C --> D[Query NVD/OSV by CPE]
D --> E{CVE found?}
E -- yes --> F[match_cpe to confirm affected]
F --> G[Report CVE + remediation]
E -- no --> H[Report: not vulnerable]
As Claude Code skills, the agent can be invoked in natural language:
- "Parse this CPE string and tell me the vendor/product/version"
- "Check if this component's CPE matches any known vulnerable CPE"
- "Generate a CPE for Apache log4j 2.14.1"
- "Convert this CPE 2.2 string to 2.3 format"
c, _ := cpeskills.Parse("cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*")
nvd := cpeskills.CreateNVDDataSource("")
search := cpeskills.NewMultiSourceSearch([]*cpeskills.VulnDataSource{nvd})
findings, _ := search.SearchByCPE(c) // returns matching CVEscomponents, _ := cpeskills.ParseManifestFile("go.sum", content)
sbom, _ := cpeskills.BuildSBOMFromManifest("go.sum", content, "my-app")
json, _ := cpeskills.ExportSBOMToCycloneDX(sbom)scorer := cpeskills.NewDefaultRiskScorer()
scores := cpeskills.ScoreComponents(components, nvdData)
cpeskills.SortByRisk(scores)
critical := cpeskills.FilterByPriority(scores, cpeskills.RiskPriorityCritical)purl, confidence, _ := cpeskills.CPEToPURL(cpe) // CPE → PURL
cpe, confidence, _ := cpeskills.PURLToCPE(purl) // PURL → CPEmatched := cpeskills.MatchCPE(criteria, target, &cpeskills.MatchOptions{
VersionRange: true,
MinVersion: "2.0",
MaxVersion: "3.0",
})More recipes (WFN conversion, VEX, export, sets, applicability) on the website guide.
CPE (Common Platform Enumeration) is the NIST-standard naming scheme (NIST IR 7695/7696) for identifying IT systems, software, and packages — it's the backbone of CVE vulnerability matching, SBOM component tracking, and supply chain security.
Working with CPE is hard: two incompatible formats (2.2 URI vs 2.3 Formatted String), complex WFN binding rules, multi-source vulnerability data (NVD, OSV, EPSS, KEV), and SBOM ↔ PURL bridging. cpe-skills solves all of this with a single toolkit covering the full CPE lifecycle, exposed through 4 integration paths.
flowchart LR
subgraph Input
S1[CPE 2.2 URI]
S2[CPE 2.3 FS]
S3[Product Info]
S4[Lockfile / Manifest]
end
subgraph Core["CPE Core Engine"]
P[Parse & Validate]
M[NISTIR 7696 Match]
G[Generate / Build]
W[WFN Bind & Escape]
N[Normalize]
end
subgraph Correlation
V[Vulnerability]
NVD[NVD]
OSV[OSV]
EPSS[EPSS]
KEV[CISA KEV]
end
subgraph SupplyChain["Supply Chain"]
SB[SBOM CycloneDX/SPDX]
PU[CPE ↔ PURL]
DG[Dependency Graph]
end
subgraph Output
R[Risk & VEX]
E[Export JSON/CSV/SARIF]
end
S1 --> P
S2 --> P
S3 --> G
S4 --> SB
P --> M
P --> W
P --> N
M --> V
V --> NVD
V --> OSV
V --> EPSS
V --> KEV
SB --> PU
SB --> DG
V --> R
SB --> R
R --> E
mindmap
root((cpe-skills))
Parsing
CPE 2.2 URI
CPE 2.3 FS
Auto-detect
WFN binding
Matching
NISTIR 7696
Exact / Subset / Superset
Fuzzy & Regex
Batch
Generation
From product info
Templates
Fluent Builder
Fuzzy generate
Vulnerability
NVD
OSV
EPSS scoring
CISA KEV
SBOM
CycloneDX
SPDX
CPE ↔ PURL
Dependency graph
Risk & VEX
Risk scoring
Reachability
VEX statements
Remediation
Export
JSON
CSV
SARIF
SBOM formats
Infrastructure
CPE Sets
Applicability
Structured errors
Logging
Full documentation lives on the website:
- Guide — practical usage examples (parsing, matching, WFN, NVD, SBOM, …)
- API Reference — complete API documentation
- SKILLS.md — AI skills entry point
For comprehensive code examples covering every capability (CPE parsing, advanced matching, vulnerability correlation, SBOM, VEX, export, etc.), see the website guide.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License — see the LICENSE file for details.