engineering
Track a package fix through a multi-stage build
Trace files copied from builder stages into the final image. Verify that rebuilding creates a runtime artifact with the corrected file or package version.
TrustIvan · · 5 min read
A runtime scan no longer reports a builder package after a Dockerfile change. The final image still contains a binary copied from a builder stage, and the owner cannot yet tie that file to the corrected build. In this fictional fixture, verify the runtime output using the path the build actually follows.
Trace the copied file to its producer
| Evidence | Before | Candidate |
|---|---|---|
| Source of executable | Builder artifact from previous input | Rebuilt from approved input |
| Runtime placement | Application executable at expected path | Same runtime path |
| Package inventory | Runtime manager lacks ownership | File and build evidence required |
Start from the final build target used for production. Follow the copied file back through its immediate stage and any prepared input bundle. The same path can be created in multiple targets. Record the selected target, relevant platform and file evidence before concluding which stage produced the deployed artifact.
Read the identity from the artifact
Compare the build output with what the runtime or release system resolved. A source commit identifies inputs, a build run identifies execution, and a digest identifies particular bytes. The link among those records is useful in both directions. Someone starting with a runtime observation should be able to find the build that produced it, and someone starting with a build should know which target currently uses it. Record the platform alongside the digest for any image that publishes an index. A report on one manifest does not establish what another platform would run.
Identify the final image and the stage that contributed the finding's file. Record the source commit, build target, copy location and evidence for the old version. Then rebuild after the fix and compare the relevant file identity or version in the new runtime artifact. Use the exact build settings agreed for production so cache behavior and stage selection match your release.
Ask a composition-analysis vendor what its evidence says about copied files and application bundles. Compare results with a test artifact where the build-stage package is removed but its output remains. The container fix by digest guide covers deployment verification.
Create a positive fixture by rebuilding the copied file from the corrected input and checking its approved version or expected hash where the build makes the comparison meaningful. Create a second fixture where only the builder inventory changes while a retained generated bundle populates the final image. Verify that the artifact review catches the retained file even if a runtime package-manager query returns no package.
Exercise the final-stage artifact paths
Keep two outputs from the production target configuration. One uses the corrected build input, while the other changes only the builder's package metadata and retains the previous copied binary. Compare the observable file or bundle identity at the expected runtime path. Trace both results back to the contributing stage through the retained build evidence. If the package collector sees the same result on both images, record what additional file or build evidence lets the release reviewer tell them apart. Repeat that comparison on the supported architecture with a distinct builder.
Give the build owner evidence on both sides of the stage boundary. When the file is stripped or embedded in a bundle, corroborate file observations with trusted build records. Keep the scanner's scope and limitations visible so the release reviewer can see why the manual check was needed.
Use one authorized rehearsal to give the release build owner a control case and one incomplete evidence record. Keep the subject stable while the observation changes. Capture when the source event occurred and when it became available to the reviewer. Verify the event recorded in the build stage and runtime artifact records has enough context to tell the two cases apart after the original operator has left the shift. A reviewer should be able to describe why the incomplete result is still pending.
Close against the published runtime subject
Give the reviewer the release target and the intact reference to the artifact record. Use the shorter labels from the example for discussion and the full identifiers for a calculation or machine comparison. Retain the platform observation with the report because a result can be valid for its manifest while the rollout uses a different one. For a release that needs more than one platform, require evidence for each platform in scope before making a claim about the whole release. Make pending rollout and pending inspection explicit so the follow-up lands with the person who can complete it.
Record the output digest tested in staging and the digest subsequently observed in production. If platforms differ, verify the copied file on the affected child manifests. A second operator should be able to recover the exact output and reproduce the packaging conclusion from the release record.
Ask a second reviewer to write down the current state from the supplied evidence. Compare their answer with the original decision, paying attention to scope and timing. Capture revisions to the review instructions where a valid observation led to two plausible interpretations.
Include the earliest and latest review times in the handoff. If the relevant evidence arrives during that interval, the active owner can use it to make the scheduled decision. If it arrives after, retain both the initial result and the review of the delayed observation.