Safeguard
Software Supply Chain•

Can Jenkins produce signed provenance for the artifacts it builds?

Jenkins can run the steps, but SLSA asks what the build platform can prove. See what each build level needs and how to move a Jenkins pipeline up.

Safeguard Security Team
4 min read

A Jenkins pipeline can generate and sign provenance, but how much that proof is worth depends on the platform. SLSA Build L2 needs signed provenance from a hosted build platform, and L3 needs a hardened platform. A shared Jenkins controller with broad admin access usually fits L1 until it is locked down.

What is provenance?

The SLSA specification defines provenance as a description of what entity built an artifact, what process they used, and what the inputs were. Its build track has levels. L1 means provenance exists. L2 means signed provenance generated by a hosted build platform, which protects against tampering after the build. L3 means a hardened build platform, which protects against tampering during the build.

The specification is blunt about L1: it can prevent mistakes but is trivial to bypass or forge. That is still useful, because it makes builds easier to debug and rebuild.

Where does Jenkins sit?

SLSA describes a producer following a consistent build process and distributing provenance, preferably by the convention of the package ecosystem. Jenkins is a general automation server, so what it can prove depends on how you run it:

  • Pipelines defined in a Jenkinsfile in the repository give you a consistent, reviewable process.
  • Provenance has to be generated by the platform, not by the build script a developer controls. If the same job that compiles also writes its own attestation, anyone who can edit the job can write any attestation.
  • Signing keys should not be readable by build steps that run untrusted code.

Jenkins stores credentials of several types, including secret text, secret files, SSH keys and certificates, and its documentation says credentials can be scoped globally, to a specific pipeline item, or to a user. Scope signing credentials as narrowly as the tool allows.

A constructed example

A team builds a Java service on a shared controller. Many people can edit jobs, and all jobs run on the same agents. They add a step that signs the jar with a key stored as a Jenkins credential. An engineer with job-edit rights can add a step that prints the key or signs a different file. The signature proves the file passed through this Jenkins, not that it was built from the reviewed commit.

The team splits the work. Release builds run only from a protected branch on dedicated ephemeral agents. A separate small job, editable by few people, takes the built artifact's digest, records the commit and builder identity, and signs that record. Now the signature covers a statement the build step cannot rewrite.

How to check or apply this

  1. State which SLSA build level you want and for which artifacts. Not everything needs L3.
  2. Build releases from a protected branch only, using a pipeline defined in source control.
  3. Run release builds on fresh, single-use agents without access to long-lived secrets.
  4. Generate provenance outside the build step, recording the artifact digest, source commit and builder.
  5. Keep signing keys in a credential or external key service reachable only by the signing step.
  6. Publish the provenance next to the artifact and verify it in the deploy pipeline, so a missing or mismatched statement stops the release.
  7. Limit who can configure jobs and credentials on the controller, and review that list.

Verification is the half people skip. Safeguard's policy gates can enforce checks in a pipeline, and its dependency inventory shows what your artifacts contain.

Quick check

Does signing a jar in Jenkins give me SLSA L2?

Not by itself. L2 needs signed provenance generated by a hosted build platform. A signature from a step that job editors can change does not show how the artifact was built.

What is the benefit of L1 if it can be forged?

SLSA says it helps prevent mistakes and aids debugging and rebuilding, but it gives no protection from tampering.

Sources

Last reviewed: 18 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.