Abstract

A method is disclosed for making a container image record which source produced it, and for making a deployment check that record against the source it claimed to ship. At build time an emitter measures the working tree with the same classification a clean-tree gate uses earlier in the same deployment to accept or reject the build. Each dirty path is tested against a fail-closed reading of the build tool's context-exclusion rules, so a path matching no rule, or matching any negation rule, counts as affecting the image. Image-affecting paths are split into a blocking count (tracked modifications plus untracked files with no recorded owner) and an excused count (untracked files recorded with an owner in a registry of intentionally untracked paths). Commit, branch, dirtiness flag, both counts, host and time are written into a provenance record inside the image, and an unmeasured value is the literal "unknown", never zero. Before the build, a source check judges the commit against the upstream integration branch under two separately parameterised staleness limits: one for a fresh build of the working tree, a larger one for a pre-built image that can no longer be merged forward. A commit that is not an ancestor of upstream fails at any limit. After rollout the record is read back from inside the running workload, where an "unknown" dirtiness fails beyond the reach of the dirty-tree override and the recorded commit must match the expected one. One enforcement switch makes both checks blocking.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS