JPeetz/agent-skills / skills/security/supply-chain-security-scanner
supply-chain-security-scanner
FlaggedUse this skill when auditing an application's software supply chain: dependency vulnerability scanning across npm, PyPI, Maven, Go modules, Cargo, and container images; SBOM generation (SPDX, CycloneDX) with Syft and Grype; license compliance checks against organizational policy; and cryptographic provenance/SLSA verification with cosign and slsa-verifier. Runs a structured Scan → Analyze → Report → Remediate audit producing machine-readable vulnerability reports with CVSS scores, exploitability assessments, and actionable fixes aligned with OWASP Agentic Skills Top 10 guidance. Integrates NVD, GHSA, and OSV; works with npm audit, pip-audit, OWASP Dependency-Check, and trivy.
| File | Kind | Size |
|---|---|---|
| CHANGELOG.md | markdown | 2.4 KB |
| LICENSE | other | 1.0 KB |
| SKILL.md | skill md | 28.7 KB |
| evals/evals.json | config | 5.8 KB |
| references/ecosystem-vuln-databases.md | markdown | 11.4 KB |
| references/owasp-ast10-summary.md | markdown | 6.0 KB |
| references/sbom-formats.md | markdown | 6.5 KB |
| scripts/generate-sbom.shexecutable | script | 13.9 KB |
| scripts/scan-dependencies.shexecutable | script | 21.9 KB |
| scripts/verify-provenance.shexecutable | script | 20.0 KB |
references/sbom-formats.md
View on GitHub# SBOM Formats: SPDX vs CycloneDX
## Overview
Two dominant SBOM standards exist: **SPDX** (Software Package Data Exchange)
from the Linux Foundation and **CycloneDX** from OWASP. Both satisfy U.S.
Executive Order 14028 requirements and the NTIA minimum elements. They serve
different primary use cases but overlap significantly.
## Quick Comparison
| Aspect | SPDX 2.3 | CycloneDX 1.5 |
|--------|----------|---------------|
| **Originating body** | Linux Foundation | OWASP |
| **First release** | 2011 | 2017 |
| **Primary use case** | License compliance | Security/vulnerability |
| **Secondary use** | Security (via external refs) | License compliance, inventory |
| **ISO standard** | ISO/IEC 5962:2021 | (In progress) |
| **Mandatory fields** | 12 (SPDX 2.3) | 5 (CycloneDX 1.5) |
| **JSON schema** | ✅ | ✅ |
| **XML schema** | ✅ (RDF/XML) | ✅ |
| **Tag-value format** | ✅ (unique to SPDX) | ❌ |
| **PURL support** | ✅ (SPDX 2.3+) | ✅ (native) |
| **CPE support** | ✅ | ✅ |
| **SWID support** | ✅ | ✅ |
| **VEX integration** | Via external document ref | ✅ Native VEX |
| **Native vulnerability** | ❌ | ✅ |
| **Pedigree/supply chain** | ✅ | ✅ |
| **Cryptographic hashes** | ✅ (SHA1, SHA256, SHA512, MD5) | ✅ (SHA1, SHA256, SHA384, SHA512, MD5) |
| **NTIA compliant** | ✅ | ✅ |
| **Package URL (PURL)** | ✅ 2.3+ | ✅ Native |
| **File-level detail** | ✅ | Limited |
| **Snippet-level detail** | ✅ | ❌ |
## NTIA Minimum Elements
Per the U.S. National Telecommunications and Information Administration (NTIA),
every SBOM must include these minimum elements. Both SPDX and CycloneDX satisfy
all requirements.
| Element | SPDX Field | CycloneDX Field |
|---------|-----------|-----------------|
| **Supplier name** | `PackageSupplier` | `component.supplier.name` |
| **Component name** | `PackageName` | `component.name` |
| **Version** | `PackageVersion` | `component.version` |
| **Unique identifier** | `SPDXID`, `PackageChecksum` | `bom-ref`, PURL, CPE |
| **Dependency relationships** | `Relationship` (DEPENDS_ON) | `dependencies` array |
| **Author** | `Creator` | `metadata.authors` |
| **Timestamp** | `Created` | `metadata.timestamp` |
## When to Use Which
### Use CycloneDX When:
- **Primary goal is vulnerability management**
- Integrating with Grype, Trivy, or OWASP Dependency-Track
- You need VEX (Vulnerability Exploitability eXchange) data inline
- You're in a DevSecOps pipeline focused on CVEs
- Simpler schema is preferred (fewer required fields)
- Your ecosystem tools default to CycloneDX (Syft, Trivy, Grype)
### Use SPDX When:
- **Primary goal is license compliance**
- Enterprise legal review is required (SPDX is an ISO standard)
- You need file-level or snippet-level detail
- Integrating with FOSSology, ORT, or SW360
- You're in a heavily regulated industry requiring ISO compliance
- You need the tag-value human-readable format
### Generate Both When:
- You have both security and compliance requirements
- You're in an enterprise with separate security and legal teams
- You're publishing open-source releases (SPDX for community, CycloneDX for consumers)
- Regulations require both perspectives
## Structural Differences
### CycloneDX (Simplified Example)
```json
{
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"metadata": {
"timestamp": "2026-06-09T02:07:00Z",
"component": {
"name": "my-app",
"version": "2.1.0",
"type": "application",
"bom-ref": "pkg:npm/my-app@2.1.0"
}
},
"components": [
{
"type": "library",
"name": "lodash",
"version": "4.17.21",
"purl": "pkg:npm/lodash@4.17.21",
"licenses": [{"license": {"id": "MIT"}}]
}
],
"dependencies": [
{"ref": "pkg:npm/my-app@2.1.0", "dependsOn": ["pkg:npm/lodash@4.17.21"]}
]
}
```
### SPDX (Simplified Example)
```json
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "my-app",
"creationInfo": {
"created": "2026-06-09T02:07:00Z",
"creators": ["Tool: Syft"]
},
"packages": [
{
"SPDXID": "SPDXRef-my-app",
"name": "my-app",
"versionInfo": "2.1.0",
"downloadLocation": "NOASSERTION",
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION"
},
{
"SPDXID": "SPDXRef-lodash",
"name": "lodash",
"versionInfo": "4.17.21",
"licenseConcluded": "MIT",
"externalRefs": [
{"referenceCategory": "PACKAGE-MANAGER", "referenceType": "purl", "referenceLocator": "pkg:npm/lodash@4.17.21"}
]
}
],
"relationships": [
{"spdxElementId": "SPDXRef-my-app", "relationshipType": "DEPENDS_ON", "relatedSpdxElementId": "SPDXRef-lodash"}
]
}
```
## VEX (Vulnerability Exploitability eXchange)
VEX is a companion format that tells consumers whether a product is affected by
a specific vulnerability. It's critical for reducing false-positive fatigue.
### CycloneDX VEX
CycloneDX 1.4+ supports VEX natively through the `vulnerabilities` array:
```json
{
"vulnerabilities": [
{
"id": "CVE-2024-12345",
"affects": [{"ref": "pkg:npm/protobufjs@7.2.4"}],
"analysis": {
"state": "not_affected",
"detail": "The vulnerable function is not called in our codebase",
"justification": "code_not_reachable"
}
}
]
}
```
### SPDX VEX
SPDX handles VEX through external document references linking to a separate
VEX document:
```
ExternalRef: SECURITY vex-location https://example.com/vex.json
```
## Tool Support Matrix
| Tool | CycloneDX Output | SPDX Output | VEX Support |
|------|:---:|:---:|:---:|
| **Syft** | ✅ | ✅ | ✅ (via Grype) |
| **Trivy** | ✅ | ✅ | Partial |
| **Grype** | Input only | Input only | N/A |
| **Dependency-Track** | ✅ | ✅ | ✅ |
| **FOSSology** | ❌ | ✅ | ❌ |
| **ORT** | ✅ | ✅ | ❌ |
| **SPDX tools** | ❌ | ✅ | ✅ |
## Generating SBOMs with the Scanner
```bash
# CycloneDX JSON (recommended for security)
bash scripts/generate-sbom.sh --format cyclonedx-json
# SPDX JSON (for license compliance)
bash scripts/generate-sbom.sh --format spdx-json
# Both formats
bash scripts/generate-sbom.sh --format cyclonedx-json
bash scripts/generate-sbom.sh --format spdx-json
```
## References
- SPDX Specification: https://spdx.dev/specifications/
- CycloneDX Specification: https://cyclonedx.org/specification/overview/
- NTIA SBOM Minimum Elements: https://www.ntia.gov/page/software-bill-materials
- Executive Order 14028: https://www.whitehouse.gov/briefing-room/presidential-actions/2021/05/12/executive-order-on-improving-the-nations-cybersecurity/
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |