sbom-supply-chain
Generate, sign, and verify SBOMs and provenance attestations to secure the software supply chain. Use when implementing SLSA controls, artifact trust policies, or compliance evidence for releases.
What this skill does
# SBOM & Supply Chain Security
Improve release trust with reproducible metadata and verification gates.
## When to Use This Skill
Use this skill when:
- Producing SBOMs for container images or application builds
- Verifying dependencies before deploy
- Enforcing signed artifact and provenance policies
- Preparing for SOC2, ISO 27001, or customer security reviews
- Implementing SLSA framework requirements
- Responding to supply chain vulnerabilities (e.g., Log4Shell-style events)
## Prerequisites
- `syft` installed for SBOM generation
- `cdxgen` installed for CycloneDX SBOM generation
- `grype` for vulnerability matching against SBOMs
- `cosign` v2+ for signing and attestation
- Container registry with OCI artifact support
- CI/CD pipeline with OIDC identity for keyless signing
## SBOM Formats
### CycloneDX vs SPDX Comparison
```yaml
comparison:
cyclonedx:
standard: "OWASP CycloneDX"
focus: "Application security, vulnerability tracking"
formats: ["JSON", "XML", "Protocol Buffers"]
strengths:
- Vulnerability references (VEX support)
- Service and API dependency tracking
- Hardware BOM support
best_for: "Security-focused SBOM, vulnerability management"
spdx:
standard: "Linux Foundation SPDX (ISO/IEC 5962:2021)"
focus: "License compliance, legal review"
formats: ["JSON", "RDF/XML", "Tag-Value", "YAML"]
strengths:
- ISO standard
- License expression language
- Relationship modeling
best_for: "License compliance, regulatory requirements"
```
## Syft SBOM Generation
```bash
# Generate SBOM for a container image (CycloneDX JSON)
syft ghcr.io/acme/api:v1.2.3 -o cyclonedx-json > sbom-cyclonedx.json
# Generate SBOM in SPDX format
syft ghcr.io/acme/api:v1.2.3 -o spdx-json > sbom-spdx.json
# Generate SBOM from a local directory (source code)
syft dir:. -o cyclonedx-json > sbom-source.json
# Generate SBOM from a Dockerfile/built image
syft docker:my-local-image:latest -o cyclonedx-json > sbom-local.json
# Generate SBOM for a specific package ecosystem
syft dir:. --catalogers python -o cyclonedx-json > sbom-python.json
# Include file hashes for deeper analysis
syft ghcr.io/acme/api:v1.2.3 -o cyclonedx-json --file-metadata > sbom-with-hashes.json
# Multiple output formats simultaneously
syft ghcr.io/acme/api:v1.2.3 \
-o cyclonedx-json=sbom-cdx.json \
-o spdx-json=sbom-spdx.json \
-o table=sbom-summary.txt
```
## cdxgen SBOM Generation
```bash
# Install cdxgen
npm install -g @cyclonedx/cdxgen
# Generate CycloneDX SBOM for a project directory
cdxgen -o sbom.json .
# Specify project type
cdxgen -t python -o sbom-python.json .
cdxgen -t java -o sbom-java.json .
cdxgen -t node -o sbom-node.json .
cdxgen -t go -o sbom-go.json .
# Generate SBOM with evidence (call stacks, file occurrences)
cdxgen --evidence -o sbom-with-evidence.json .
# Generate for a container image
cdxgen -t docker -o sbom-container.json ghcr.io/acme/api:v1.2.3
# Generate with deep analysis (slower but more accurate)
cdxgen --deep -o sbom-deep.json .
# Output in different formats
cdxgen -o sbom.xml --format xml .
```
## Vulnerability Matching
```bash
# Scan SBOM for vulnerabilities with Grype
grype sbom:sbom-cyclonedx.json
# Fail on critical/high vulnerabilities
grype sbom:sbom-cyclonedx.json --fail-on high
# Output as JSON for CI processing
grype sbom:sbom-cyclonedx.json -o json > vulnerability-report.json
# Scan container image directly
grype ghcr.io/acme/api:v1.2.3
# Use Trivy with SBOM input
trivy sbom sbom-cyclonedx.json
# Trivy scan with severity filter
trivy sbom sbom-cyclonedx.json --severity CRITICAL,HIGH --exit-code 1
```
## Cosign Signing and Attestation
### Image Signing
```bash
# Keyless signing (recommended - uses OIDC identity from CI)
cosign sign ghcr.io/acme/api@sha256:abc123...
# Sign with a key pair
cosign generate-key-pair
cosign sign --key cosign.key ghcr.io/acme/api@sha256:abc123...
# Verify keyless signature
cosign verify \
--certificate-identity=https://github.com/acme/api/.github/workflows/build.yml@refs/heads/main \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
ghcr.io/acme/api@sha256:abc123...
# Verify with key
cosign verify --key cosign.pub ghcr.io/acme/api@sha256:abc123...
```
### SBOM Attestation
```bash
# Attach SBOM as an in-toto attestation to a container image
cosign attest --predicate sbom-cyclonedx.json \
--type cyclonedx \
ghcr.io/acme/api@sha256:abc123...
# Attach SPDX SBOM
cosign attest --predicate sbom-spdx.json \
--type spdx \
ghcr.io/acme/api@sha256:abc123...
# Verify SBOM attestation
cosign verify-attestation \
--type cyclonedx \
--certificate-identity=https://github.com/acme/api/.github/workflows/build.yml@refs/heads/main \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
ghcr.io/acme/api@sha256:abc123...
# Extract the SBOM from attestation
cosign verify-attestation --type cyclonedx \
--certificate-identity=... --certificate-oidc-issuer=... \
ghcr.io/acme/api@sha256:abc123... | jq -r '.payload' | base64 -d | jq '.predicate'
```
### In-toto Provenance Attestation
```bash
# Create a custom provenance attestation
cat > provenance.json << 'EOF'
{
"buildType": "https://github.com/acme/build-system@v1",
"builder": {
"id": "https://github.com/acme/api/.github/workflows/build.yml@refs/heads/main"
},
"invocation": {
"configSource": {
"uri": "git+https://github.com/acme/api@refs/heads/main",
"digest": { "sha1": "abc123def456" },
"entryPoint": ".github/workflows/build.yml"
}
},
"metadata": {
"buildStartedOn": "2025-01-15T10:00:00Z",
"buildFinishedOn": "2025-01-15T10:05:00Z",
"completeness": {
"parameters": true,
"environment": true,
"materials": true
}
},
"materials": [
{
"uri": "git+https://github.com/acme/api@refs/heads/main",
"digest": { "sha1": "abc123def456" }
},
{
"uri": "pkg:docker/[email protected]",
"digest": { "sha256": "def456..." }
}
]
}
EOF
# Attach provenance attestation
cosign attest --predicate provenance.json \
--type slsaprovenance \
ghcr.io/acme/api@sha256:abc123...
```
## CI/CD Pipeline Integration
```yaml
# .github/workflows/sbom-supply-chain.yml
name: Build with SBOM and Signing
on:
push:
tags: ['v*']
permissions:
contents: read
packages: write
id-token: write # Required for keyless signing
jobs:
build-sign-attest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
id: build
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
- name: Install tools
run: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
- name: Generate SBOM
run: |
syft ghcr.io/${{ github.repository }}@${{ steps.build.outputs.digest }} \
-o cyclonedx-json=sbom-cdx.json \
-o spdx-json=sbom-spdx.json
- name: Scan SBOM for vulnerabilities
run: |
grype sbom:sbom-cdx.json --fail-on critical -o json > vuln-report.json
- name: Install cosign
uses: sigstore/cosign-installer@v3
- name: Sign image (keyless)
run: |
cosign sign ghcr.io/${{ github.repository }}@${{ steps.build.outputs.digest }}
- name: Attach SBOM attestation
run: |
cosign attest --predicate sbom-cdx.json \
--type cRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.