SBOM generation and vulnerability analysis toolkit for software supply chain security.
- SBOM Generation: Generate Software Bill of Materials in CycloneDX and SPDX formats
- Vulnerability Analysis: Analyze Trivy scan results with configurable gate thresholds
- Workflow Templates: Pre-built GitHub Actions workflows for security automation
- Go Library: Import packages directly into your Go applications
go install github.com/build-flow-labs/blueprint/cmd/blueprint@latestgo get github.com/build-flow-labs/blueprintGenerate from local directory:
blueprint sbom generate --path . --format cyclonedx-json --output sbom.jsonGenerate from GitHub repository:
export GITHUB_TOKEN=ghp_xxx
blueprint sbom generate --org myorg --repo myrepo --format spdx-jsonAnalyze Trivy scan results:
# First, run Trivy
trivy fs --format json --output trivy.json .
# Then analyze with Blueprint
blueprint vuln analyze --input trivy.json --threshold no_critical_highGate thresholds:
no_critical- Fail if any CRITICAL vulnerabilitiesno_critical_high- Fail if any CRITICAL or HIGH vulnerabilities (default)no_critical_high_medium- Fail if any CRITICAL, HIGH, or MEDIUM vulnerabilitiesno_vulnerabilities- Fail if any vulnerabilities exist
List available templates:
blueprint template listGet template content:
blueprint template get security-scanApply template to a repository:
export GITHUB_TOKEN=ghp_xxx
blueprint template apply --org myorg --repo myrepo --template security-scan- uses: build-flow-labs/blueprint@v1
with:
command: sbom
format: cyclonedx-json
path: .
output: sbom.json
- name: Upload SBOM
uses: actions/upload-artifact@v4
with:
name: sbom
path: sbom.json- name: Run Trivy
uses: aquasecurity/trivy-action@master
with:
scan-type: fs
format: json
output: trivy.json
- uses: build-flow-labs/blueprint@v1
with:
command: vuln
trivy-results: trivy.json
threshold: no_critical_highimport "github.com/build-flow-labs/blueprint/sbom"
generator := sbom.NewGenerator()
result, err := generator.Generate(&sbom.GeneratorInput{
OrgName: "myorg",
RepoName: "myrepo",
Files: map[string]string{
"go.mod": goModContent,
},
Format: sbom.FormatCycloneDXJSON,
})import "github.com/build-flow-labs/blueprint/vulnscan"
analyzer := vulnscan.NewAnalyzer(vulnscan.GateNoCriticalHigh)
analysis, err := analyzer.AnalyzeFromJSON(trivyOutput)
if !analysis.PassesGate {
log.Fatalf("Security gate failed: %s", analysis.GateMessage)
}- CycloneDX 1.4 JSON
- CycloneDX 1.4 XML
- SPDX 2.3 JSON
- Go:
go.mod,go.sum - npm:
package.json,package-lock.json,yarn.lock - Python:
requirements.txt,Pipfile,Pipfile.lock - Rust:
Cargo.toml,Cargo.lock - Java:
pom.xml,build.gradle - Ruby:
Gemfile,Gemfile.lock - PHP:
composer.json
MIT