Protecting the Software Delivery Chain

A hospital's scheduling application begins making unexpected outbound connections after an approved release. The source change looks harmless, yet the package running in production does not match the artifact created by the authorized build. This episode follows software from re…

A software release can pass its automated tests, receive the expected approval, and still arrive in production containing something no reviewer intended to ship. When that happens, the first assumption is often that somebody made a bad code change. Sometimes that is true. Other times the code was altered while it was being built, the wrong package was selected for deployment, or an automation identity was used to bypass the normal release path.

Imagine a hospital's appointment scheduling service. A new release goes live overnight. The next morning, monitoring identifies repeated connections from the application to an external destination with no known business purpose. The development team checks the approved source change and finds a small scheduling fix. Nobody can see why that fix would create the network activity. We need to follow the software from the approved idea to the running application and identify which links in that chain can be trusted.

Modern teams often automate this journey. Developers store source code in a repository. A build system retrieves the relevant source and dependencies, assembles software, runs selected checks, and produces something deployable. That output might be a package, a compiled application, or a container image. A separate process can approve and release the artifact into an environment. The term continuous integration usually describes automated building and testing around source changes. Continuous delivery or deployment describes preparing and promoting those changes toward production, with the exact approval arrangement depending on how the organization operates.

Automation makes releases repeatable, but it also creates identities and machines with unusual power. A build runner may read source, download packages, reach secret stores, and write artifacts. A deployment service may modify production workloads. An account with access to these systems can affect what software an organization runs, potentially across many applications. The analyst needs to understand these privileges just as carefully as the privilege of an administrator on a server.

Before investigating the hospital's release, distinguish the intended source from the actual software. Source control records the changes developers proposed and approved. The build records how an output was produced. The artifact is the package that resulted. Deployment records describe which package was delivered. Runtime evidence tells us what the resulting program did. Each stage can be legitimate while a later stage fails. Finding the first disagreement gives the investigation a direction.

The Bare Metal Cyber study guide can support a short after-listening review of software delivery. Try explaining, without naming a vendor product, why an approved source change and an approved production artifact are separate claims. That distinction is the foundation of investigating a suspicious release.

The hospital team first identifies the exact application version running on the affected servers. A release label alone is a weak answer; two packages can carry the same name while containing different bytes. A cryptographic digest can serve as a fingerprint of the measured artifact. Comparing the production digest with the digest of the artifact produced by the approved build can reveal whether the same content reached both places. That comparison depends on measuring comparable artifacts and preserving trustworthy records of the measurements.

In this case, the production artifact has a different digest from the build artifact linked to the approved release. The difference does not by itself prove an attacker changed the software. The deployment might have included an authorized configuration step that created a different output, or the team may be comparing the wrong package. But the mismatch is a specific discrepancy the team can investigate. It directs attention to the registry, release selection, deployment process, and anyone or anything capable of substituting the artifact.

Suppose the artifact registry shows both packages. The approved one was produced by the normal build. The package running in production was uploaded later using a deployment identity. The organization now has a plausible route for substitution, but still needs to determine whether the later upload was an authorized repair or malicious use of that identity. Check the change record, how the credential was issued, where it was used, and whether the same identity touched other releases. Do not infer the person behind the activity from the service-account name.

This is an important feature of software delivery investigations. They follow trust transitions. A developer is allowed to propose code. A reviewer is allowed to approve a change. A builder is allowed to turn approved inputs into a package. A deployment identity is allowed to promote a particular package into a particular environment. If one identity can control all of those stages without independent checks, an attacker who compromises it may be able to create an apparently normal release. Separation of authority helps because it limits what a single compromised account can accomplish.

An approval is only meaningful when it is tied to the thing actually deployed. Imagine a reviewer approves a package and the release system later fetches the latest file with the same name. If another party can replace that file between approval and deployment, the approval no longer protects the deployed content. A stronger design ties the release to an immutable artifact identity and ensures the deployment process enforces that choice. The control must be effective at the point of promotion, not merely described in a policy.

Software signatures can reinforce the chain, but they have limits. A valid signature can show that a particular key signed particular content, assuming the signature is checked correctly and the trust in the key is justified. It cannot guarantee that the content is harmless. If malicious code entered the build before signing, a perfectly valid signature can accompany a malicious artifact. If a signing key or signing service was compromised, the signature's trust basis is itself in doubt. A digest answers whether two measured items match. A signature answers a different question about authorization or origin under a trust arrangement. Neither one, alone, proves that a program is safe.

Now change the hospital story. The production digest matches the approved build exactly. The suspicious behavior is still real. The team cannot treat that match as a clean bill of health. It establishes a relationship between two artifacts, but it does not tell us whether the source, its dependencies, or the build environment was trustworthy when the package was created. The inquiry moves earlier in the delivery chain.

Builds often depend on software the hospital did not write. Libraries, tools, plugins, base images, and external packages may be retrieved during construction. If the build is allowed to fetch an unexpected version or source, the resulting application can change even when the hospital's own source code has not. Dependency controls reduce this risk by identifying approved sources, using recorded versions, checking the origin and integrity of packages, and reviewing relevant security findings. But a recorded version must correspond to the actual content consumed by the build; a label alone is not enough.

Consider two builds from the same approved source. One was produced last week, and the other was produced overnight. The recent build unexpectedly included a changed third-party library. That difference may explain new behavior. Perhaps the library changed legitimately and contains a defect. Perhaps its distribution account was compromised. Perhaps the build fetched a different package with a confusingly similar name. The right investigation preserves the input details and determines what the affected build actually consumed, rather than claiming a supply-chain attack from the mere presence of an unfamiliar dependency.

The build environment deserves its own attention. A runner is a machine or temporary environment that executes the build steps. It may hold source files, temporary credentials, tools, and artifacts. If an attacker controls the runner, they may alter an output without changing the stored source. Isolation and short-lived execution environments can reduce opportunities for interference, but only when they are managed and verified properly. A fresh runner started from a compromised base image is not a trustworthy clean build.

Some of the strongest clues may disappear quickly. Temporary runners can be deleted when the job ends. Detailed build logs may be retained for less time than ordinary production logs. A registry can remove old artifacts during cleanup. During a suspected compromise, responders should preserve the relevant job records, artifact identities, runner information, secret-access history, and deployment evidence before normal maintenance erases them. This is an investigative requirement, not a reason to execute ad hoc commands against production while listening.

Secrets in pipelines are another potential route for abuse. Automation needs credentials to download private dependencies or change environments. Those credentials should be limited to the jobs and resources that need them, with short lifetimes where practical. A token copied into a build log or stored in a repository can become usable by someone who was never approved to deploy anything. Hiding a secret from a dashboard does not help if the same value was already captured in an accessible artifact or diagnostic output.

There is an optional exercise in the Bare Metal Cyber Cyber Challenge that can reinforce this reasoning after the lesson. In a deployment scenario, decide whether the observed failure began with an altered source change, an untrusted build input, a replaced artifact, or misuse of deployment authority. The important part is choosing evidence that separates those possibilities, not memorizing which automation product uses which interface.

The scope of a stolen credential depends on its permissions. A deployment token restricted to one test environment presents a different exposure from a long-lived identity that can update every production service. An analyst should determine what the identity could change, what changes it actually made, and which other environments it reached. A permission list establishes potential access. Audit records and observed state are needed to describe confirmed use. That is the same evidence discipline we apply to operating systems and APIs, now at the software-delivery layer.

An investigator also needs to distinguish malicious behavior after deployment from a compromised deployment itself. A running application may be exploited through a vulnerability after a clean release. A legitimate administrator may enable a dangerous configuration. A new library may change network behavior for a valid business reason. The timing of an alert near a release makes a useful hypothesis, not a verdict. Runtime process and network evidence, release history, and application-change records should be tested together.

In the hospital case, the team learns that the mismatched artifact was pushed by an automation identity after a service disruption. A responder may have used an emergency release process, bypassing normal promotion rules. If the emergency package was approved and its content is verified, the control problem may be weak documentation and an unsafe bypass mechanism rather than a malicious release. If the credential was used from an unrecognized environment and the artifact contains unapproved code, the suspicion becomes much stronger. The same registry record can support different conclusions as the surrounding facts change.

There is a special case when the source itself is malicious. A compromised developer account might submit a harmful change. A careless reviewer might approve it, or an attacker might abuse approval permissions. Repository history can show which account made and approved a change, but it does not establish who controlled those accounts at the time. Identity-provider events, unusual token creation, unexpected review patterns, and contemporaneous communications can provide context. Protected branches and required reviews make unauthorized change harder, but they do not make authorized accounts immune to compromise.

Infrastructure configuration belongs in the investigation too. Modern release systems can deploy network rules, workload identities, storage permissions, and other infrastructure settings alongside application code. A new version may behave dangerously because a configuration change gave it more access, even when the application artifact is identical. If a service suddenly can read an internal database, the problem might be an overly broad policy deployed through infrastructure automation rather than newly injected code. The security team should compare effective permissions and the configuration change history, not stop at application hashes.

In that situation, rolling back the application package may do nothing. A configuration change can persist after the application version is restored. Likewise, disabling a suspicious runner does not revoke credentials it already exposed, and reverting an unauthorized source commit does not remove malicious artifacts that remain available for future deployment. Containment has to interrupt the capability the attacker still holds, while preserving enough evidence to understand what else was affected.

The response to a delivery-chain incident is sometimes broader than the application showing symptoms. One runner might build several services. One third-party package might be included in dozens of releases. One deployment identity might have access to production and disaster recovery. Scope those shared dependencies deliberately. At the same time, do not assume every system connected to a shared component was compromised. Distinguish systems that were capable of receiving the malicious input from those shown to have consumed or run it.

Recovery presents a similar problem. A rollback to last week's version may reduce immediate harm, but it is not a safe recovery if the deployment identity remains stolen or the artifact registry still serves a poisoned package. Rebuilding from the same source is not reliable if the build environment is under attacker control. A trustworthy restoration requires confidence in the chosen source, the inputs and builder, the artifact, and the authority that deploys it. Then the team must confirm that the restored service behaves as expected and that the route for unauthorized changes has been closed.

There may be real business pressure to get the hospital's scheduling service operating normally. Blocking all releases during an incident could prevent an urgent clinical fix. But allowing the existing pipeline to keep delivering software without examining its trust could reintroduce the compromise. A decision maker needs a clear explanation of which release functions are suspect, which can be isolated, and what protected alternate process could support essential work. A practical containment plan reflects those constraints rather than treating the entire pipeline as one switch.

For an analyst presented with evidence from a suspicious release, a useful first move is to identify the exact production artifact and the event that placed it there. From that point, follow the chain in both directions. Backward, determine the build, inputs, approvals, identities, and configuration that produced it. Forward, determine every environment that received it and what the software did there. Note where evidence is missing, not only where it agrees. The gaps often show the organization what it must improve even if the original cause cannot be proven completely.

Think about what each investigation outcome would require. If the source was altered, strengthen repository governance and investigate who controlled the approving identities. If a dependency was substituted, establish what content was fetched and correct the dependency controls. If the builder was compromised, rebuild in a trustworthy environment and examine other outputs produced there. If an artifact was replaced after approval, protect the registry and bind deployments to approved identities. If a deployment credential was abused, remove that capability and verify the affected environments. These are different failures that demand different evidence and responses.

Our hospital scenario ends with the team comparing what reviewers approved, what the builder produced, what the release system selected, and what ran in production. That comparison reveals an unauthorized artifact substitution through a privileged deployment identity. The team restricts the identity, preserves the release trail, restores a verified package through a separate trusted process, and checks whether other applications were touched. The unexpected network connections stop, but analysts still investigate what information the altered program could access and whether it actually transferred anything. Containment success does not erase the need to understand impact.

The lasting lesson is that software delivery is a sequence of security decisions made by people and machines. Source approval, build output, package identity, deployment authority, and runtime behavior each answer a different question. A trustworthy release depends on connecting those answers and finding discrepancies before they become invisible in normal operations. When an automated release causes trouble, follow the evidence across the chain instead of assuming the last code change tells the whole story.

Protecting the Software Delivery Chain
Broadcast by