Safeguard
Supply Chain•

After a poisoned build, what do you need to reset?

Reset runners, caches, signing keys, build secrets and base images, then rebuild from a clean commit. A checklist based on the SLSA build threats.

Safeguard Security Team
3 min read

After a poisoned build, reset every component the build could have influenced: runners, caches, signing keys, build secrets, base images and the pipeline definition itself. Then rebuild from a verified clean commit on fresh infrastructure. Replacing only the artifact leaves the poisoned system producing the next one.

Why a full reset

The SLSA threat model describes how a build can be compromised: a malicious build interfering with others on shared infrastructure, stolen provenance signing keys or other build platform secrets, a poisoned build cache, and a compromised build platform admin who can alter builds in progress. Each of these survives a simple re-run.

Reset checklist

ComponentActionReason
RunnersDestroy, recreate from a known imagePersistent runners may hold malware
CachesDelete allGitHub notes cache contents are not signed or verified
Signing keysRotate and re-sign if exposedStolen keys forge trust
Build secretsRotateReadable by the job
Base imagesRe-pull by digest, verifyMay be the source
Pipeline filesReview and restore from known goodAttacker may have edited
AccessReview admins and tokensAdmin compromise alters builds

Steps

  1. Freeze builds and snapshot evidence first.
  2. Identify the last known good commit and build. Be honest about how you know.
  3. Create fresh runners. Ephemeral runners that exist for one job reduce the carry over between jobs.
  4. Delete caches and rebuild dependencies from a frozen lockfile, which fails if the lockfile and manifest disagree.
  5. Rotate signing keys if there is any chance of exposure, and publish a note on which releases are affected.
  6. Rebuild affected releases, compare digests with what is deployed, and redeploy.
  7. Re-enable builds with tighter permissions.

Prevent the repeat

Pin third party actions to a full commit SHA, since tags can be moved if an action's repository is compromised. Give jobs the least access they need. Promote one built artifact through environments rather than rebuilding for each. See build once, promote the same artifact.

Verify before you re-enable

Before builds resume, run one test build on the fresh runner and check that it restores no old cache, installs from the frozen lockfile and produces a digest you can explain. Compare its dependency list with the last known good SBOM and investigate every difference. Keep builds restricted to a small set of repositories for a day, watching logs and outbound connections, then widen. Write down the exact time the pipeline was trusted again, so the timeline shows when the exposure window truly ended.

Quick check

Is rebuilding the artifact enough?

No. If the runner, cache or keys were compromised, the new artifact can be poisoned too.

Do I need to rotate signing keys every time?

Only if the keys were readable by the compromised build or you cannot show they were not.

Safeguard's gates and policies can help hold a build until checks pass. A free scan is at gold.safeguard.sh/scan.

Sources

Last reviewed: 19 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.