Most of the code running on your servers was written by someone else. Open-source libraries, base images, build tools and CI plugins all end up in production, and an attacker doesn’t need to break your application if they can compromise something you trust to build it. Software supply chain security is the discipline of knowing what’s inside your software, where it came from, and whether it was tampered with before it reached your server.
This guide focuses on three things: dependencies (what’s in your artifacts), provenance (how and where they were built), and verification (proving integrity before deployment). It deliberately doesn’t repeat general container hardening, which is covered by our list of top tools for enhancing server security. Here the question isn’t “is this container configured safely” but “should we trust this artifact at all.”
Why Supply Chain Attacks Keep Working
Real incidents show different parts of the chain failing:
- Compromised build systems. The 2020 SolarWinds attack inserted malicious code during the build process, so signed, legitimate-looking updates carried the payload.
- Vulnerable dependencies. Log4Shell (late 2021) showed how one widely embedded library can expose thousands of organizations, many of whom didn’t know they were using it.
- Trusted maintainers and social engineering. The 2024 xz Utils backdoor (CVE-2024-3094) came from a long campaign to gain maintainer trust in a project nearly everyone depends on indirectly.
- Malicious or confusable packages. Typosquatting and dependency confusion trick build systems into installing attacker-controlled packages.
No single control stops all of these, which is why the approach is layered.
Three Questions Every Deployment Should Answer
- What’s in it? A complete inventory of components and versions (the SBOM), checked against known vulnerabilities.
- Where did it come from? Verifiable provenance: which source, which commit, which build system.
- Is it the thing we approved? A signature and policy check at deploy time proving the artifact is unmodified and meets your rules.
SBOMs: Knowing What You Ship
A software bill of materials is a machine-readable list of the components in an artifact. The two dominant formats are SPDX and CycloneDX. For SBOM security to be useful in practice:
- Generate it at build time, per artifact. Tools such as Syft and Trivy can produce SBOMs for container images and file systems, and modern image builders can attach them as attestations.
- Include transitive dependencies and OS packages, not just your top-level manifest. Most surprises are several layers down.
- Store it with the artifact. An SBOM kept in a wiki goes stale. Attach it to the image in the registry so it travels with what it describes.
- Use it. When the next Log4Shell-style advisory lands, an SBOM database lets you answer “where are we exposed” in minutes instead of days.
- Pair it with VEX where possible. VEX (Vulnerability Exploitability eXchange) statements record whether a listed vulnerability actually affects your product, which cuts through scanner noise.
Remember that an SBOM is an inventory, not a verdict. It tells you what’s present, and scanning tells you what’s risky.
Dependency Vulnerability Scanning
- Scan in CI and continuously. New vulnerabilities are disclosed after you ship, so rescanning stored SBOMs and deployed images on a schedule catches issues build-time scans can’t.
- Use multiple sources. Scanners differ in data and matching. Tools such as Grype, Trivy and OSV-Scanner are common choices.
- Set a policy, not just a report. Decide what blocks a release (for example, critical vulnerabilities with a known fix and a reachable path) and what creates a ticket with a deadline.
- Pin and lock. Commit lockfiles, use hash-checking installs where your ecosystem supports it, and pin base images by digest rather than a movable tag.
- Defend against confusion attacks. Route installs through a private proxy or mirror, scope internal package names to your registry, and review new dependencies before adding them.
- Assess the project, not just the CVE count. Maintenance activity, review practices and ownership matter. The OpenSSF Scorecard automates several of these checks.
Provenance and the SLSA Framework
SLSA (Supply-chain Levels for Software Artifacts, pronounced “salsa”) is a framework from the OpenSSF for improving the integrity of how software is built. The SLSA framework‘s build track defines progressive levels:
- Level 1: the build process produces provenance, a record of how the artifact was made.
- Level 2: provenance is generated and signed by a hosted build service, so it’s harder to forge.
- Level 3: the build runs on a hardened platform with isolated, ephemeral builds, so one build can’t tamper with another or with the provenance.
A provenance attestation typically records the source repository and commit, the builder’s identity, the build parameters and the output digest. Verifying it at deploy time answers “was this built from our code, by our pipeline?” A realistic path is to reach Level 1 quickly, then raise the bar for your most critical artifacts.
Container Image Signing with Cosign
Sigstore is an open-source project providing tools for signing and verifying software, and Cosign image signing is its tool for container images and other OCI artifacts. It supports two modes:
- Keyless signing. The signer proves identity through an OIDC provider (for example, your CI system), receives a short-lived certificate, and the signing event is recorded in a public transparency log. There’s no long-lived private key to steal or rotate.
- Key-based signing. You manage a key pair, possibly in a KMS or hardware module. This suits air-gapped or tightly controlled environments but makes key custody your responsibility.
Basic usage looks like this (always reference the image by digest, not by tag):
# Sign an image (keyless in CI)
cosign sign registry.example.com/app@sha256:<digest>
# Attach an SBOM as a signed attestation
cosign attest --predicate sbom.spdx.json --type spdxjson \
registry.example.com/app@sha256:<digest>
# Verify: check WHO signed it, not just that a signature exists
cosign verify registry.example.com/app@sha256:<digest> \
--certificate-identity "https://github.com/your-org/your-repo/.github/workflows/build.yml@refs/heads/main" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com"
The last command is the important one. “This image is signed” is nearly meaningless, because anyone can sign anything. “This image was signed by our release workflow on the main branch” is a real guarantee. Alternatives such as the CNCF’s Notary Project (Notation) follow similar principles.
Enforcing Verification at Deploy Time
Signing without verification is theater. The enforcement point depends on your platform:
- Kubernetes. Admission controllers such as Kyverno, OPA Gatekeeper or Sigstore’s policy-controller can reject any image whose signature, identity or attestations don’t match policy.
- Plain servers, Compose or systemd. Put the check in your deployment script: run
cosign verify(and verify provenance and SBOM attestations) before pulling and starting anything, and fail the deployment on any mismatch. Reference images by digest in your Compose files and unit files. - Registry rules. Restrict which registries and base images are allowed, and block deployments of anything not built by your pipeline.
- Policy as code. Encode rules such as “must have an SBOM, must have SLSA provenance from our builder, no critical vulnerabilities with a fix” so they’re enforced consistently and reviewed like code.
The same verification idea applies beyond containers, to Wasm modules distributed as OCI artifacts (see our guide to WebAssembly on servers), and to the tools and plugins that AI agents connect to, discussed in our guide to AI agent security.
Securing the Pipeline That Produces the Artifacts
Signatures only prove the artifact came from your pipeline, so the pipeline has to be trustworthy:
- Prefer short-lived, federated credentials (OIDC) over long-lived secrets stored in CI, and handle any remaining secrets as described in our guide to secrets management for production servers.
- Use ephemeral, isolated build runners so one job can’t poison another. Our guide to dedicated servers for CI/CD pipelines covers self-hosted runner infrastructure.
- Pin third-party CI actions and plugins to a full commit SHA, not a mutable tag.
- Require code review and protect branches so a single compromised account can’t push to the release branch.
- Separate duties. The identity that builds shouldn’t be the one that approves production deployment.
- Protect signing identities. Restrict which workflows and branches may sign release artifacts.
A Practical Maturity Roadmap
- Visibility. Generate SBOMs for every build and scan for vulnerabilities in CI.
- Hygiene. Lock and pin dependencies, pin base images by digest, and lock down registries.
- Signing. Sign images and attach SBOM and provenance attestations in CI.
- Enforcement. Verify signatures, identity and policy at deploy time, starting in audit mode before switching to blocking.
- Hardening. Move critical builds to isolated, ephemeral platforms and aim for higher SLSA levels.
- Continuous assurance. Rescan deployed artifacts, review dependency health and rehearse a “critical vulnerability in a core library” response.
Common Mistakes
- Signing but never verifying, or verifying only that some signature exists.
- Deploying by tag, which can silently change what you run.
- Filing SBOMs away without ever querying them.
- Scanning only at build time and missing vulnerabilities disclosed later.
- Letting any workflow sign anything, which removes the value of signatures.
- Ignoring the build system itself while locking down everything downstream of it.
Regulation Is Pushing This Too
Governments and industry bodies increasingly expect these practices. US Executive Order 14028 (2021) drove SBOM adoption for software sold to the federal government, and the EU’s Cyber Resilience Act introduces documentation and vulnerability-handling obligations for products with digital elements, including inventories of components. Requirements vary by sector and jurisdiction, so check what applies to you.
How BeStarHost Supports Secure Deployments
Verification at deploy time is easiest when you control the server that does the deploying:
- Dedicated servers with guaranteed, unshared resources, where you control the deployment tooling and can enforce verification in your own scripts or orchestrator.
- Dedicated, unshared bandwidth on a global low-latency network, useful for pulling and verifying large images quickly.
- 99.9% uptime on Tier 3 / Tier 4 hardware with RAID 0 / RAID 1 configurations.
- IPMI KVM-over-IP for out-of-band access, which matters if a bad release needs to be rolled back at the operating-system level.
- 14 global data center locations across Europe (France, Germany, Netherlands, United Kingdom), Asia (Singapore, Hong Kong, India, South Korea, Taiwan, Philippines, Myanmar, Cambodia) and North America (United States, Canada).
- No setup fees and 24/7/365 support.
Explore our dedicated server plans, read more on our About Us page, or contact our team to discuss your deployment environment.
Frequently Asked Questions
What is a software bill of materials (SBOM)?
An SBOM is a machine-readable inventory of the components, libraries and versions inside a piece of software. Common formats are SPDX and CycloneDX. It lets you quickly determine whether a newly disclosed vulnerability affects what you’ve deployed.
What is SLSA?
SLSA (Supply-chain Levels for Software Artifacts) is an OpenSSF framework with progressive levels for build integrity. It focuses on producing verifiable provenance showing how, where and from what source an artifact was built, and on hardening the build platform against tampering.
How does Cosign image signing work?
Cosign, part of the Sigstore project, signs container images and other OCI artifacts. In keyless mode, the signer authenticates through an OIDC identity, receives a short-lived certificate, and the event is recorded in a transparency log. Verification checks the signature and the identity that produced it.
Is signing a container image enough to be secure?
No. A signature proves who signed an image and that it hasn’t changed, not that its contents are safe. You also need to verify the signer’s identity at deploy time, scan dependencies, check provenance, and secure the build pipeline that produced the image.
Why deploy images by digest instead of tag?
A tag can be moved to point at different content, so the same tag may deploy different code over time. A digest is a cryptographic hash of the exact image, so deploying by digest guarantees you run precisely what you verified.
Tightening how software reaches your servers? Talk to BeStarHost about dedicated infrastructure →
