Repository navigation
feat(ci): fetched chart dependencies must match pinned checksums - #463
Merged
Merged
Conversation
Four charts vendor a chart fetched from outside this repository: seaweedfs 3.68.0 (kafka-cluster), litmus-core 3.28.1 (kates-chaos), kube-prometheus-stack 82.4.3 (monitoring) and strimzi-kafka-operator 1.2.0 (strimzi-operator, from quay.io). No Chart.lock is committed and nothing checked the bytes, so `helm dependency build` packed whatever those repositories served under the pinned version, and the publish job would sign it. charts/dependencies.sha256 now pins each archive, and the helm-deps action checks every chart it builds: - an archive that differs from its pin fails; - a pinned archive that is missing fails, so a dependency cannot move without its pin; - an archive with no pin fails, so a new dependency cannot arrive unpinned. Subcharts packed from charts/ (file://) are rebuilt on every run and are not pinned. The four hashes match the digests upstream publishes today: the seaweedfs, litmuschaos and prometheus-community index.yaml entries, and the chart layer of quay.io's strimzi-kafka-operator:1.2.0 manifest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Four charts vendor a chart fetched from outside this repository:
No
Chart.lockis committed, and nothing checked the bytes.helm dependency buildpacked whatever those repositories served under the pinned version, and once #461 lands, the publish job signs it. A compromised or re-published upstream archive would ship under our signature. This is PR C of the chart publishing plan.What changes
charts/dependencies.sha256pins the four archives, insha256sumformat.helm-depsaction checks every chart it builds. The same action is used byci.ymland the publish job:charts/(file://) are rebuilt on every run and aren't pinned.Where the hashes come from: each one matches the digest upstream publishes today. For the three HTTP charts that is the
digestin the repository'sindex.yaml. For Strimzi it is the chart-content layer of quay.io'sstrimzi-kafka-operator:1.2.0manifest.For future bumps: bumping one of these dependencies, including the Strimzi operator chart, now needs its line in
charts/dependencies.sha256updated too. Dependabot doesn't manage Helm dependencies here, so no bot PR will hit this unawares.Tests
FAILED, then the mismatch errorshellcheckon the action's script,actionlint,yamllint,scripts/check-versions.sh,gen-chart-table.sh --check.sha256sum -c -works with both GNU coreutils (CI) and macOS.Independent of #461 and #462.