Repository navigation
ci(#731): pin the third-party action and activate wrapper checksum verification - #736
Merged
Merged
Conversation
…sum verification Two build-integrity gaps from apache#731. The third item in that issue, removing the root <repositories> block, is deliberately not done here: see the issue for why it would break the build. Pin EnricoMi/publish-unit-test-result-action to the commit SHA that v2 currently resolves to (v2.24.0). It is a non-GitHub-authored action running with checks:write, on push and pull_request, around the shared Maven cache. A mutable tag can be force-moved without any change landing here, and Dependabot cannot see that happen. Dependabot can still bump the pinned SHA. Set distributionSha256Sum and wrapperSha256Sum. Both mvnw and the wrapper jar already implement SHA-256 verification, but the code was dormant because neither property was set. Note wrapperSha256Sum also covers the maven-wrapper.jar committed to the repository, whose bytes cannot be reviewed in a diff. Values verified before pinning: - the committed maven-wrapper.jar is byte identical to maven-wrapper-3.2.0.jar on Maven Central - apache-maven-3.9.6-bin.zip on Central matches the SHA-512 published at downloads.apache.org Both checks confirmed live by corrupting each sum in turn: the wrapper refuses with "Failed to validate Maven wrapper SHA-256", and a forced re-download refuses with "Failed to validate Maven distribution SHA-256".
jbonofre
approved these changes
Aug 25, 2026
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.
Addresses two of the three items in #731.
1. Pin the third-party action
EnricoMi/publish-unit-test-result-action@v2->@d0a4676d0e0b938bc201470d88276b7c74c712b3 # v2.24.0v2is a mutable tag on a non-GitHub-authored action. It runs withif: always()onpushandpull_requestunderchecks: write, after theshared Maven cache is restored and before its post-step saves it. A force-moved
tag changes what executes with no change landing in this repository, and
Dependabot cannot detect a tag that moves under it. Dependabot can still bump
the pinned SHA, which is the usual Apache infra arrangement.
The SHA is the commit
v2currently resolves to, which is thev2.24.0release.
2. Activate the checksum verification that already exists
mvnw:254-281and the wrapper jar both implement SHA-256 verification, butthe code was dormant because neither
wrapperSha256SumnordistributionSha256Sumwas set. Setting them turns the project's own existingmechanism on.
wrapperSha256Sumis worth having even though the jar is committed:mvnwvalidates it against the local
maven-wrapper.jar, so it covers tamperingwith the 62 KB of opaque bytes in the repository, which no diff can show.
Values were verified before pinning, not just computed:
.mvn/wrapper/maven-wrapper.jaris byte-identical tomaven-wrapper-3.2.0.jaron Maven Central(
e63a53cf…f52f066a) -- so this pins a known-good jar, not whatever happenedto be in the tree
apache-maven-3.9.6-bin.zipfetched from Central has SHA-512 matching thevalue published at
downloads.apache.org/maven/maven-3/3.9.6/binaries/exactly, so the SHA-256 recorded here (
83aaf914…c031625f) is the ASFartifact
Both were then confirmed to actually enforce, by corrupting each sum in turn:
and
./mvnw -vruns normally with the committed values, both from cache andfrom a fresh download.
3. Not done: removing the root
<repositories>block#731 also proposed dropping the Atlassian repository from the root POM on the
grounds that
components/camel-jira/pom.xmlalready declares it for the onlyartifacts that need it. That is not correct and would break the build, so it
is left out of this PR:
features/src/main/feature/camel-features.xml:1996-2002referencescom.atlassian.jira:jira-rest-java-client-{core,api},com.atlassian.sal:sal-api,com.atlassian.event:atlassian-eventandcom.atlassian.httpclient:*as feature bundles, and thefeaturesmoduleruns
karaf-maven-plugin:verify, so it has to resolve them.features/pom.xmldoes not declare the Atlassian repository -- itinherits it from the root.
404), so there is nofallback.
The narrower change that would achieve the original intent is to move the
declaration down to the two modules that actually need it (
components/camel-jira,which already has it, plus
features) rather than delete it. I have not donethat here because it wants a full reactor build to confirm nothing else in the
tree resolves an Atlassian coordinate, and that is a separate change from the
two above. Details are in #731.
Notes
No functional change to the build; CI on this PR exercises the pinned action.
Claude Code on behalf of Andrea Cosentino