/devsecops-skills:supply-chain-security-slsa-sbomfrom devsecops-skills
Guides generating Software Bills of Materials (SBOM) with Syft/CycloneDX, signing artifacts and generating provenance attestations with Sigstore/cosign, and mapping practices to SLSA build-integrity levels.
Ships in devsecops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Software supply-chain attacks target the build and distribution pipeline rather than application code directly — a compromised build server, a poisoned dependency, a tampered artifact substituted between CI and deployment, or a maintainer account takeover injecting malicious code upstream. Two complementary practices address this: SBOMs (Software Bill of Materials) give visibility into exactly what components — and which versions — make up a given artifact, so that when a new vulnerability is disclosed you can answer "are we affected, and where" without an audit; and SLSA (Supply-chain Levels for Software Artifacts) is a framework describing build-integrity practices (source control, isolated builds, provenance generation) that make it harder to tamper with an artifact undetected between source and consumption. Both are necessary infrastructure for a mature security program, and neither is a vulnerability scanner — an SBOM lists components, it does not tell you they're vulnerable (that's SCA's job); SLSA provenance proves how an artifact was built, not that the code it contains is safe.
syft myorg/myapp:1.4.2 -o cyclonedx-json=sbom.cdx.json
slsa.dev) — defines build-integrity levels (L1
through L3 in the current v1.0 model) describing provenance generation
and build isolation, generated by tools such as slsa-github-generator
for GitHub Actions or in-toto for a custom pipeline.Generate an SBOM at build time, not after the fact, so it reflects exactly what was built and shipped:
syft dir:. -o cyclonedx-json=sbom.cdx.json
syft myorg/myapp:1.4.2 -o spdx-json=sbom.spdx.json
Attach the SBOM to the artifact in CI so it travels with the release rather than living in a separate, easily-desynced location:
- name: Generate SBOM
run: syft ${{ env.IMAGE }} -o cyclonedx-json=sbom.cdx.json
- name: Attach SBOM to image
run: cosign attach sbom --sbom sbom.cdx.json ${{ env.IMAGE }}
Sign the artifact so consumers can verify it hasn't been substituted or tampered with after your build produced it. Keyless signing in CI (recommended over managing long-lived keys):
permissions:
id-token: write # required for Sigstore keyless OIDC signing
contents: read
steps:
- name: Sign image (keyless)
run: cosign sign --yes ${{ env.IMAGE }}@${{ steps.build.outputs.digest }}
Generate SLSA provenance describing the build (source repo/commit,
builder identity, build parameters) as a signed attestation. On GitHub
Actions, the slsa-github-generator reusable workflow produces this
without your pipeline needing to implement the attestation format
itself:
jobs:
build:
# ... build and push image, output digest ...
provenance:
needs: [build]
permissions:
id-token: write
contents: read
actions: read
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
image: ${{ needs.build.outputs.image }}
digest: ${{ needs.build.outputs.digest }}
Verify signatures and provenance before deploy, not just at publish time — verification with no enforcement point is just logging:
cosign verify --certificate-identity-regexp "^https://github.com/myorg/myapp/.github/workflows/release.yml@refs/tags/.*$" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
myorg/myapp:1.4.2
cosign verify-attestation --type slsaprovenance \
--certificate-identity-regexp "^https://github.com/myorg/myapp/.*$" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
myorg/myapp:1.4.2
In Kubernetes, enforce this at admission time with a policy engine
(see policy-as-code-guardrails)
such as Sigstore's policy-controller or Kyverno's verifyImages
rule, rather than relying on a human running cosign verify manually.
Map current practice to a SLSA level honestly, and state the gap, not just the target:
slsa-github-generator reusable workflow model this because the
provenance-signing step runs in a separate, more privileged workflow
than the untrusted build step).
Most self-hosted-runner setups without additional isolation work top
out around L1-L2 in practice — say so explicitly rather than claiming
L3 without the isolation guarantees it requires.Store and query SBOMs centrally (a registry, Dependency-Track, or similar) so that when a new CVE drops, you can search "which shipped artifacts contain component X at version Y" in seconds instead of re-scanning your entire fleet.
Symptom: The team says "we have SBOMs, so we're supply-chain secure" and treats the control as complete. Fix: Clarify that an SBOM is an inventory, not a scan — it must be paired with a vulnerability feed/SCA tool (software-composition-analysis-sca) to actually surface risk, and with signing/provenance to address tampering, which an SBOM alone says nothing about.
Symptom: Images are signed with cosign, but nothing in the deploy
path actually calls cosign verify — a compromised or unsigned image
deploys successfully anyway.
Fix: Add an enforcement point: an admission controller policy
(Kyverno verifyImages, Sigstore policy-controller) that rejects
unsigned/unverifiable images at the cluster boundary, not just a
CI step that signs and moves on.
Symptom: A long-lived cosign signing key is stored as a CI secret, and the team worries about (or eventually discovers) it leaked. Fix: Migrate to keyless signing via OIDC (Sigstore Fulcio), which eliminates the long-lived key entirely in favor of short-lived, workflow-identity-scoped certificates — nothing persists to leak.
Symptom: The org claims "SLSA Level 3" in a security questionnaire,
but the build runs on a self-hosted runner with no additional isolation
between the build step and the provenance-signing step.
Fix: Re-assess honestly against the actual L3 requirements (isolated,
ephemeral build environment where the build definition cannot influence
its own provenance) — either adopt a generator model that provides that
isolation (e.g. slsa-github-generator's separate reusable workflow) or
report the accurate current level (likely L1-L2) instead.
Symptom: SBOM generation is added to CI, but SBOMs pile up as build artifacts with no central index, so answering "are we affected by CVE-2026-XXXXX" still requires manually opening dozens of files. Fix: Push generated SBOMs into a central store with search/query capability (Dependency-Track, a registry with SBOM-search support, or even a simple indexed object-store + database) as part of the pipeline, not as a manual follow-up task.
A container-image release pipeline adds SBOM generation, keyless signing, and SLSA provenance, then a Kubernetes admission policy enforces verification before deploy.
.github/workflows/release.yml (build/sign/attest stage):
name: release
on:
push:
tags: ['v*']
permissions:
contents: read
id-token: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
outputs:
digest: ${{ steps.push.outputs.digest }}
image: ghcr.io/myorg/myapp
steps:
- uses: actions/checkout@v4
- name: Build and push
id: push
run: |
docker build -t ghcr.io/myorg/myapp:${{ github.ref_name }} .
docker push ghcr.io/myorg/myapp:${{ github.ref_name }}
echo "digest=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/myorg/myapp:${{ github.ref_name }} | cut -d@ -f2)" >> "$GITHUB_OUTPUT"
- name: Generate SBOM
run: syft ghcr.io/myorg/myapp:${{ github.ref_name }} -o cyclonedx-json=sbom.cdx.json
- name: Sign image (keyless)
run: cosign sign --yes ghcr.io/myorg/myapp@${{ steps.push.outputs.digest }}
- name: Attach SBOM
run: cosign attach sbom --sbom sbom.cdx.json ghcr.io/myorg/myapp@${{ steps.push.outputs.digest }}
provenance:
needs: [build]
permissions:
id-token: write
contents: read
actions: read
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
image: ${{ needs.build.outputs.image }}
digest: ${{ needs.build.outputs.digest }}
Kyverno admission policy enforcing signature verification cluster-side:
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-signed-images
spec:
validationFailureAction: Enforce
rules:
- name: verify-cosign-signature
match:
resources:
kinds: [Pod]
verifyImages:
- imageReferences: ["ghcr.io/myorg/*"]
attestors:
- entries:
- keyless:
subject: "https://github.com/myorg/myapp/.github/workflows/release.yml@refs/tags/*"
issuer: "https://token.actions.githubusercontent.com"
With this in place, an unsigned or tampered image fails admission with a
policy violation instead of silently running — and the accompanying SBOM
lets the team answer "do we ship libfoo 2.3.1 anywhere" via a registry
or SBOM-index query the next time a CVE is disclosed against it.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin devsecops-skills17 skills in this plugin
/checkov-and-tfsec-iac-security-scanningConfigures Checkov and tfsec to scan Terraform/CloudFormation/Kubernetes IaC source for misconfigurations — hardcoded secrets, overly permissive IAM policies, unencrypted storage, open security groups — before `terraform apply` or `aws cloudformation deploy` ever runs. Use when a user asks to "scan my Terraform for security issues," "add Checkov/tfsec to CI," "find overly permissive IAM in my IaC," "write a Checkov suppression," "compare Checkov and tfsec," or "catch misconfigured cloud resources before they're provisioned."
/complete-devsecops-pipeline-for-kubernetes-from-scratchBuilds the complete security-gate sequence for a Kubernetes-targeted DevSecOps pipeline from scratch — SAST, SCA, container image scanning, a policy-as-code (OPA/Kyverno) admission gate placed before the GitOps handoff, and a secrets model where plaintext credentials never touch the pipeline because an External Secrets Operator pulls them cluster-side instead. Use when the user asks to "build a DevSecOps pipeline for Kubernetes from scratch," "add a policy gate before our GitOps commit," "make sure secrets never touch CI for our K8s deploys," or "sequence SAST/SCA/image-scan/policy gates for a container pipeline end-to-end."
/complete-devsecops-pipeline-for-serverless-from-scratchBuilds the complete security-gate sequence for a serverless (Lambda- style) DevSecOps pipeline from scratch — SAST, SCA against a much larger bundled transitive-dependency surface, package/artifact signing, and least-privilege execution-role scoping as the primary release gate (rather than a Kubernetes-style admission policy), with runtime secrets fetched from a managed secrets service instead of baked into the deployment package. Use when the user asks to "build a DevSecOps pipeline for a Lambda function from scratch," "gate a serverless release on execution-role scope instead of admission policy," "sign a Lambda deployment package," or "make sure a Lambda function's secrets aren't baked into its zip."
/complete-devsecops-pipeline-for-vm-based-workloads-from-scratchBuilds the complete security-gate sequence for a VM-based DevSecOps pipeline from scratch — SAST, SCA, golden-image scanning and CIS benchmark hardening baked into the machine image itself, config- management-applied secrets via Ansible Vault (never plaintext), and an ongoing patch/drift-detection gate that runs independently of any single deploy, distinct from the per-deploy scanning in the Kubernetes and serverless variants. Use when the user asks to "build a DevSecOps pipeline for EC2/VM workloads from scratch," "harden a golden AMI to CIS benchmarks in the pipeline," "apply secrets with Ansible Vault instead of plaintext," or "add ongoing patch/drift detection for a VM fleet."
/container-image-hardeningGuides building minimal, non-root, hardened container images — multi-stage builds, distroless/minimal base images, non-root users, read-only root filesystems, dropped Linux capabilities, and pinned/ digest-referenced base images. Use when the user asks to "harden this Dockerfile", "reduce container image attack surface/size", "make our container run as non-root", "switch to a distroless base image", "fix a container security scan finding about running as root or having a shell", or "set Kubernetes securityContext restrictions for a pod".
/critical-vulnerability-emergency-responseGuides the accelerated, out-of-band response when a critical CVE is publicly disclosed in a widely-used dependency, library, or platform component — rapid exposure assessment across the fleet, patch or temporary mitigation, verification, and closeout. Use when the user says "a critical CVE just dropped in X", "we need to check if we're affected by CVE-YYYY-NNNNN", "log4shell-style emergency patching", "zero-day just disclosed in our dependency", or "run an emergency vulnerability response". Distinct from the steady-state finding-queue management in security-finding-backlog-triage — this is the fire-drill process for one urgent, time-critical disclosure.
Other plugins' skills for the same job