Software Bill of Materials management including generation, formats, vulnerability tracking, and supply chain security
allowed-tools
Read, Glob, Grep, Write, Edit, Task
SBOM Management
Comprehensive guidance for Software Bill of Materials creation, maintenance, and supply chain security.
When to Use This Skill
Creating SBOMs for software releases
Responding to customer SBOM requests
Tracking software components and dependencies
Implementing supply chain security
Meeting regulatory requirements (Executive Order 14028, EU CRA)
SBOM Fundamentals
What is an SBOM?
A Software Bill of Materials is a formal, machine-readable inventory of software components and dependencies, their relationships, and associated metadata.
Your Application
├── Dependency A (v1.2.3) → Transitive Dep X
├── Dependency B (v2.0.0) → Transitive Dep Y, Z
├── Dependency C (v3.1.0)
└── Direct code components
using CycloneDX.Models;
publicclassSbomGenerator
{
public Bom GenerateSbom(Project project, IEnumerable<PackageReference> packages)
{
var bom = new Bom
{
Version = 1,
SerialNumber = $"urn:uuid:{Guid.NewGuid()}",
Metadata = new Metadata
{
Timestamp = DateTime.UtcNow,
Component = new Component
{
Type = Component.Classification.Application,
Name = project.Name,
Version = project.Version
}
},
Components = new List<Component>()
};
foreach (var pkg in packages)
{
bom.Components.Add(new Component
{
Type = Component.Classification.Library,
BomRef = $"pkg:nuget/{pkg.Id}@{pkg.Version}",
Name = pkg.Id,
Version = pkg.Version,
Purl = $"pkg:nuget/{pkg.Id}@{pkg.Version}",
Licenses = pkg.Licenses?.Select(l => new LicenseChoice
{
License = new License { Id = l }
}).ToList()
});
}
return bom;
}
}
Vulnerability Management
VEX (Vulnerability Exploitability eXchange)
VEX documents state whether vulnerabilities apply to your product:
{"bomFormat":"CycloneDX","specVersion":"1.5","vulnerabilities":[{"id":"CVE-2023-12345","source":{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-12345"},"ratings":[{"severity":"high","score":7.5,"method":"CVSSv3"}],"analysis":{"state":"not_affected","justification":"code_not_reachable","detail":"Vulnerable code path not used in our implementation"},"affects":[{"ref":"pkg:nuget/SomePackage@1.0.0"}]}]}
VEX States
State
Meaning
exploitable
Vulnerability is exploitable
in_triage
Currently investigating
not_affected
Not vulnerable
resolved
Fixed in current version
Vulnerability Tracking Service
publicclassVulnerabilityTracker
{
privatereadonly IVulnerabilityDatabase _vulnDb;
privatereadonly ISbomRepository _sbomRepo;
publicasync Task<VulnerabilityReport> ScanSbom(string sbomPath,
CancellationToken ct)
{
var sbom = await _sbomRepo.Load(sbomPath, ct);
var report = new VulnerabilityReport
{
SbomSerialNumber = sbom.SerialNumber,
ScanTimestamp = DateTimeOffset.UtcNow
};
foreach (var component in sbom.Components)
{
var vulns = await _vulnDb.GetVulnerabilities(
component.Purl,
ct);
foreach (var vuln in vulns)
{
report.Vulnerabilities.Add(new VulnerabilityFinding
{
ComponentRef = component.BomRef,
ComponentName = component.Name,
ComponentVersion = component.Version,
CveId = vuln.Id,
Severity = vuln.Severity,
CvssScore = vuln.CvssScore,
Description = vuln.Description,
FixedInVersion = vuln.FixedInVersion,
VexStatus = DetermineVexStatus(component, vuln)
});
}
}
return report;
}
private VexStatus DetermineVexStatus(Component component, Vulnerability vuln)
{
// Check if we have an existing VEX determination// Otherwise mark as in_triagereturn VexStatus.InTriage;
}
}
Supply Chain Security
SLSA (Supply-chain Levels for Software Artifacts)
Level
Requirements
SLSA 1
Build process documented, provenance generated
SLSA 2
Version control, hosted build service
SLSA 3
Hardened builds, provenance verified
SLSA 4
Two-person review, hermetic builds
Package Verification
publicclassPackageIntegrityVerifier
{
publicasync Task<VerificationResult> VerifyPackage(
PackageReference package,
CancellationToken ct)
{
var result = new VerificationResult { Package = package };
// Check package signaturevar signature = await GetPackageSignature(package, ct);
if (signature != null)
{
result.IsSigned = true;
result.SignatureValid = await VerifySignature(signature, ct);
result.SignerCertificate = signature.Certificate;
}
// Verify hash against known-good sourcesvar packageHash = await ComputePackageHash(package, ct);
var expectedHash = await GetExpectedHash(package, ct);
result.HashMatch = packageHash == expectedHash;
// Check for known vulnerabilities
result.Vulnerabilities = await ScanForVulnerabilities(package, ct);
// Check package age and maintenance status
result.LastUpdated = await GetLastUpdateDate(package, ct);
result.IsDeprecated = await CheckDeprecationStatus(package, ct);
return result;
}
}
# Include SBOM in container
LABEL org.opencontainers.image.sbom="sbom.json"
COPY sbom.json /app/sbom.json
# Or generate at build time
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
RUN dotnet tool install --global CycloneDX
RUN dotnet CycloneDX /src/MyApp.csproj -o /app/sbom.json -j
Regulatory Requirements
Executive Order 14028 (US)
Requirements for software sold to US government:
SBOM required for all software
Must include all components
Machine-readable format (SPDX, CycloneDX)
VEX for vulnerability status
Regular updates
EU Cyber Resilience Act
Upcoming requirements:
SBOM for all products with digital elements
Vulnerability handling procedures
Security updates for product lifetime
Reporting of actively exploited vulnerabilities
SBOM Checklist
Generation
All direct dependencies included
Transitive dependencies resolved
Versions accurately recorded
Licenses identified
Hashes computed
PURLs generated
Quality
NTIA minimum elements present
Machine-readable format
Valid against schema
Accurate dependency graph
Matches actual deployed software
Distribution
Included in release artifacts
Available via API (if applicable)
Signed/attested
VEX document available
Customer access method documented
Cross-References
License Compliance: license-compliance for license obligations
Security: security-frameworks for supply chain security