Never promote an unverified file
The backup repository is online again, and the overnight release is already late. A packaging job downloads the application from a nearby mirror, checks that the filename is familiar, and marks the file ready for production. A few minutes later, a deployment engineer discovers that its contents differ from the file tested the afternoon before. The mirror responded correctly. The package name looks right. The release process has nevertheless lost the ability to prove what it is about to install. In this illustrative case, the safe decision is to stop promotion, even though the file arrived from a working service.
The incident takes place at a company that distributes scheduling software to hospitals. Its internal artifact repository has a temporary outage, so a well-intentioned engineer points the release workflow toward a secondary repository used for emergency recovery. That mirror was established months ago. Nobody can say when it last synchronized, who is allowed to publish into it, or whether it serves immutable copies. The build pipeline has a green result from yesterday, but the file downloaded this morning has not been connected to that successful run. A familiar repository address provides availability. It does not, by itself, establish release authority.
An artifact is the output the team intends to consume, install, or deploy. It might be a compiled application, an archive, a container image, or a package used inside another build. For promotion, the question is precise: is this the exact artifact that completed the approved process, supplied by an acceptable origin, and permitted to enter this environment? Those are separate tests. A package can be intact but come from an unauthorized publisher. An authorized publisher can produce a defective file. An artifact can be both authentic and intact while still containing vulnerable or unwanted code. A trustworthy release decision needs the distinctions rather than a single green check.
Afterward, a targeted exercise from the Bare Metal Cyber AutoOps+ Study Guide can help test your understanding of how an artifact earns trust. Imagine the backup mirror has returned a package whose name and version match the request. Decide what additional evidence would let the hospital company accept the file. Then consider what to do when the evidence is missing rather than incorrect. The aim is to distinguish a service that successfully delivered bytes from a release workflow that can justify trusting those bytes. Being able to explain that difference is more useful than remembering the name of a particular repository product.
Start with integrity. A cryptographic digest is a calculated fingerprint of the file's content. If the digest of the downloaded file differs from the trusted digest recorded for the tested artifact, the bytes are not the same. That finding is decisive for a policy requiring the exact tested output. The engineer does not need to know whether a mirror was attacked, corrupted, misconfigured, or simply stale before refusing the mismatched file. Investigation of the cause can follow. Promotion should not proceed using a candidate the release record does not identify.
A digest is powerful because it binds a reference to particular contents, but the digest alone cannot tell you whose contents they are. An attacker who replaces a package can also publish a new digest beside it on the same compromised page. Reading the package and its checksum from one untrusted location verifies only that they agree with each other. The hospital team needs a trusted expected digest from its approved build or release record, protected independently from the mirror's ability to change files. That trusted reference turns a calculation into a meaningful comparison.
Now consider signatures. A valid digital signature can establish that a private signing key associated with some recognized identity endorsed the signed material and that the signed material has not been altered since signing. The important work begins with recognizing the signer. Is this the key the company authorized for production artifacts, or a different key with a plausible name? Has the key been revoked or compromised? Does the verification procedure actually bind the signature to this file? A signature from an unknown or unauthorized signer is not a promotion permit merely because the mathematics succeeds.
Signing also has a narrower meaning than people sometimes expect. A trusted signer could approve an application with a serious logic defect. A compromised build environment could produce malware and then use a legitimately available signing identity. A key valid last year might be outside the team's current policy. Cryptographic verification helps answer questions about identity and integrity. Functional testing, security evaluation, release authorization, and control of the signing process answer additional questions. When one mechanism is asked to prove everything, the release procedure becomes less reliable despite looking more sophisticated.
The hospital team reviews the chain of custody for the package. The build record names the source revision, the builder that executed the job, and the resulting artifact fingerprint. A signed provenance statement, sometimes called an attestation, may connect those details to the output. If the workflow uses one, the consumer must verify the attestation and compare its claims with an explicit policy. A claim that a file was built by a trusted system is useful only if the file matches the stated fingerprint and the build's repository, workflow, and parameters are allowed for this release.
That last point prevents a subtle substitution. Suppose the mirror carries a genuine signed package from the hospital company's own development branch. It was built on an approved platform by a recognized workflow, but it contains an unfinished scheduling feature. All the signatures might verify. The release policy still requires a candidate produced from the approved release revision and passed through the specified test and review process. The system should reject the development package because the verified claims do not satisfy the production policy. Verification is a comparison with expectations, not a ritual performed on every file that happens to contain a signature.
The emergency mirror creates another question: what is the trust relationship between a repository and the material stored there? An artifact repository controls storage, retrieval, access permissions, retention, and often naming. It may enforce checks against unauthorized uploads and record who published a particular item. Yet a repository can contain many artifact classes with different approval status. A development snapshot, a third-party dependency, and a release-ready product can all reside in the same service. Repository location may be one useful input, but the promotion decision should be tied to a particular artifact and a defined policy rather than a broad assumption about the server.
External dependencies require similar care. A package downloaded from a public registry may have a legitimate name and still be the wrong component, a malicious look-alike, or a changed version selected by loose dependency rules. A mirror may preserve untrusted content perfectly. Teams should define approved sources, lock relevant versions or content identities, inspect changes to dependency relationships, and restrict which external artifacts can enter sensitive builds. Allowing a random fallback registry during an outage widens the set of publishers the pipeline implicitly trusts. Reliability work should not silently rewrite the supply-chain policy.
An optional practice activity in the Bare Metal Cyber AutoOps+ Flashcards book is to distinguish a checksum, a signature, a provenance record, and a repository access rule. Each one answers a different question about the hospital company's file. Which bytes did we receive? Which identity endorsed the signed content? What build process is claimed to have produced it? Who was permitted to put it where the pipeline found it? Try connecting those questions to one release decision rather than studying four isolated definitions. An absent answer is a real limitation, even when the other three answers are reassuring.
The team designs its recovery path around a useful principle: availability failures must not become authentication bypasses. If the primary repository is down, the pipeline may use an approved replica, but the replica should serve an artifact whose identity is independently anchored in the accepted build record. If the replica has the exact verified file, promotion can continue after the normal policy checks. If it has an older candidate, the team might choose that candidate through a separate rollback or release decision. If the identity cannot be established, the release waits while the service outage is resolved or an approved recovery procedure supplies stronger evidence.
A common temptation is to rebuild the package from the same source revision, then assume the previously passed tests still apply. That may or may not be justified. A new build can pull newer dependencies, use a changed compiler, or run under different environmental conditions. Reproducible-build techniques can narrow these differences, but an unexamined rebuild remains another output. The hospital team should track the new artifact under its own identity, verify it using the controls required for that build, and avoid calling it the exact old tested file merely because the source revision matches. This lesson builds on the preceding artifact-tracking discussion, but adds the consumer's decision to accept or reject what is retrieved.
Consider a separate problem involving the repository's credentials. The release job needs permission to download a production artifact. It generally does not need permission to overwrite that artifact or publish a replacement under the same name. If the job can both consume and rewrite the material it is supposed to verify, a compromised release runner may be able to change the candidate and then consume its own alteration. Separate publishing from consuming, minimize the permissions of each identity, and maintain immutable or controlled release records where the platform supports them. These controls do not eliminate compromise, but they reduce the number of ways one compromised job can redefine success.
The verification point matters as much as the checks themselves. If a candidate is verified in one job, copied to an uncontrolled working directory, and then replaced before installation, the earlier verification no longer protects the action taken. The consumer needs assurance that the bytes actually deployed are the bytes it approved. Some designs check the artifact at the deployment boundary. Others use content-addressed storage and controlled promotion mechanisms that preserve identity from build through deployment. Either design should make substitution detectable and prevent an unverified file from being promoted between the moments when it is checked and used.
There are operational costs. Signature infrastructure must be maintained. Trusted signing identities and verification policies need review. Replicas require sensible synchronization and retention plans. Policies need a path for revocation, emergency fixes, and artifact removal when a previously accepted item is later found dangerous. Requiring proof creates friction when the proof service is unavailable. Those costs should be acknowledged, because teams will otherwise invent shortcuts during the first urgent release. A recovery exercise that deliberately takes the artifact store offline can reveal whether safe fallback is possible before people face the pressure of a live incident.
It is useful to distinguish a file that fails verification from one that cannot be verified. A mismatched digest gives direct evidence that the file is different from the approved output. An expired or untrusted signing certificate can establish that the offered evidence does not meet policy, without proving malicious intent. A missing attestation leaves an unanswered origin question. Operationally, all three may lead the team to hold the release, but the investigation and remediation differ. Reporting them accurately helps engineers repair the source of the problem rather than weakening the policy to get a green result.
The final review also examines the human approval step. A manager may approve deployment of the hospital scheduling update after seeing test results and a change summary. That approval should refer to the exact artifact, or to a release record that resolves unambiguously to it. If an engineer can switch the artifact behind the approval, the authorization says little about what ultimately reached patients and staff. Linking the approved release, its verified origin, its test evidence, and the deployed content makes audit records useful during incidents rather than merely complete on paper.
Return to the mirror that provided a familiar filename with unfamiliar contents. The team freezes that candidate, confirms that the expected artifact identifier is still available from its protected build record, and investigates the mirror separately. If the correct artifact is recovered from a trusted location, it can be verified and promoted under the ordinary release policy. If it cannot be found, the team makes a deliberate recovery decision with new evidence. The incorrect file is never relabeled as safe just to finish the evening's deployment.
A dependable pipeline does more than move files quickly. It preserves the relationship among the output tested, the identity claimed for that output, the source and process allowed to produce it, and the version installed in the destination. A reachable repository cannot replace that relationship. A signature without checked expectations cannot replace it. An operator's confidence in a familiar filename cannot replace it. When the exact evidence is missing, stopping promotion is the pipeline doing useful work.