A trusted application can carry untrusted code into production when its dependencies, build environment or release pipeline are compromised. Software supply-chain incidents are especially difficult because a malicious change may arrive with ordinary-looking version numbers, repository metadata and deployment approvals. Defenders need to protect the route from source to release, then be able to identify which customers and systems received a suspect component.
Map the path from developer to deployment
Begin with the systems that can alter production software: source-control organisations, package registries, build runners, artifact stores, signing services, CI/CD secrets and deployment identities. Identify which teams and automation accounts can commit code, change branch protection, approve a release, add a dependency or trigger a production rollout. Treat a build platform’s administrator as a privileged production identity, even when it has no direct access to customer data.
Include externally maintained libraries and the transitive dependencies they import. A software bill of materials helps describe components, but its usefulness depends on accurate versions and a practical way to relate a particular component to a deployed release. Record runtime environments separately from development dependencies, and do not assume that the absence of a known vulnerability proves a package was not tampered with.
Detect changes that bypass normal review
Potential signals include unexpected maintainer-account activity, unsigned or unusually signed artifacts, unexpected changes to a dependency lockfile, new package-publishing tokens, altered build scripts, and releases produced by unfamiliar runners. Attackers may target the process used to create the artifact rather than its source repository, so compare provenance across source commit, reviewed build definition, builder identity, artifact digest and deployment record.
Verify the expected origin of downloaded packages and release artifacts. Prefer pinned versions and integrity checks where practical; restrict who can change dependencies or workflow definitions. Rotate short-lived credentials through a managed secrets service instead of embedding registry tokens in long-lived CI configuration. A malicious package can also misuse legitimate network permissions, so investigate unusual outbound traffic from build runners and deployments.
Contain a suspected compromised release
Establish the release identifiers and the time window during which suspect artifacts might have been built or deployed. Pause affected pipelines and package publication, preserve build logs and signing evidence, and revoke credentials believed to be exposed. Do not immediately purge logs or delete every artifact: investigators need stable digests and deployment records to establish scope.
If a production artifact is suspected, compare it with a known-good release and decide whether to roll back, isolate the affected service or rebuild in a trustworthy environment. A rollback produced by the same compromised runner may not be trustworthy. Coordinate with the product owner and customer-support function so service impact, potential data exposure and communication obligations are assessed together.
For a third-party package incident, identify whether the affected version was installed, executed or shipped to customers. The presence of a vulnerable version in a repository does not by itself establish exploitation. Conversely, the absence of a package in a developer’s local inventory does not prove that a published container or serverless deployment is unaffected.
Strengthen build trust without paralysing delivery
Use protected branches, required peer review, least-privilege CI identities, isolated ephemeral runners where possible, controlled package sources and signed artifacts with verifiable provenance. Apply the NIST Secure Software Development Framework as a set of engineering practices, not a certification badge. Have build owners review where trusted inputs and approvals are enforced, and retain enough evidence to reproduce a deployment’s software inventory.
Tabletop a compromised registry token: who can stop publication, invalidate a release, identify downstream consumers and contact customers? Repeat the exercise against an altered CI workflow. Record which controls were actually enforced by the platform and which exist only in policy. Set measurable targets for discovery and containment without inventing a universal response-time guarantee.
Verify the recovery chain
Recovery is complete only when the organisation can explain why the new release is trustworthy. Rebuild in a controlled environment, verify the source revision and dependency set, rotate affected secrets, inspect access logs and independently validate the replacement artifact. Record supplier notifications, customer impact and unresolved unknowns. In future releases, test that an unreviewed workflow change or unauthorised package publisher is rejected before an artifact reaches production.
Verify source-to-release provenance
Choose one production SaaS release and reconstruct the path from the approved source revision through the build job, dependency resolution, package publication and deployment. Capture the identity that made the change, independent review, build runner permissions, artefact digest and final release approval. Include the permissions for CI/CD tokens and third-party package registries. An apparently successful vulnerability scan does not prove that the deployed artefact came from reviewed source. Test whether an untrusted pull request could read a production secret or publish a package without the normal approval gate. Use a sandbox pipeline rather than attempting unauthorised publication to customer systems. A strong result is a traceable, reproducible relationship between the intended code and the running application.
Respond to a suspected poisoned dependency
If a package or build step is suspect, identify which software versions and customer environments received it. Suspend the relevant promotion route, secure build identities and preserve logs before cleaning runners or overwriting artefacts. Examine whether the component could execute in a privileged build context, access signing material or change customer data. Prepare a trusted rebuild using verified sources and independent approval; do not assume that reinstalling the same dependency restores integrity. Deploy first to a controlled environment and check essential user journeys, logging and permissions. Record affected releases, investigation findings and unresolved customer exposure. The goal is to restore confidence in the production chain without introducing another unreviewed emergency change.
Prove the deployed artifact belongs to the reviewed source
For a representative SaaS release, ask engineering to trace an approved source commit to its builder, dependency resolution, signed artifact and deployment digest. A dependency scanner can show known weaknesses but cannot independently prove that the bytes in production were built by the expected pipeline. In a staging exercise, submit a package with an unrecognised provenance record and verify the deployment gate refuses it without affecting customers. Include service-account scopes in the test, particularly package-publishing and build-runner administration rights.
If a release is suspected of compromise, distinguish a downloaded artifact from one actually deployed or executed. Preserve artifact hashes, environment manifest, deployment approvals and provider logs before replacing it. After restoring a trusted build, run a normal application transaction and a prohibited cross-tenant request. The product owner should approve the resulting functional state, while security documents which customers and versions can be accounted for.
Prove the build artefact is the one the supplier approved
Use a disposable build pipeline and a harmless test package to compare the source commit, dependency manifest, signing identity and produced artefact digest. A legitimate release should show a reproducible link from approved code to the package deployed in the test tenant. In a second run, replace one dependency with an unsigned or unexpected version and confirm that the release gate refuses promotion. Preserve the evidence from the build runner and repository rather than relying only on a green deployment badge.
Agree how the engineering lead will revoke a suspect build credential and identify deployments that used it. If the package was already distributed, the response team needs a customer- and version-specific notification route and a safe rollback decision. These are proposed acceptance tests for a supplier relationship, not evidence that a particular vendor or open-source package is compromised.
Scope distinction: This advisory explains the engineering response boundaries for a suspected supply-chain compromise, including dependencies and release pipelines. For a release-by-release exposure inventory tied to commits, package digests and deployed customers, use the companion checklist. Companion article: Software Supply-Chain Compromise: SaaS Release Exposure Checks.
Sources and further reading
- NIST SP 800-218 — Secure Software Development Framework
- NIST SP 800-204D — Software supply-chain security in CI/CD pipelines (February 2024)
Strengthen your security with Next Defence
Secure software delivery needs confidence in identities, build pipelines, dependencies and the provenance of deployed artifacts. Next Defence helps engineering teams assess CI/CD attack paths, integrate security controls into delivery workflows and verify that remediation withstands realistic validation. Explore our Application Security & DevSecOps.