fix: disable Maven cache and enforce checksum verification#4414
Merged
SylvainJuge merged 2 commits intomainfrom Apr 24, 2026
Merged
fix: disable Maven cache and enforce checksum verification#4414SylvainJuge merged 2 commits intomainfrom
SylvainJuge merged 2 commits intomainfrom
Conversation
…e cache poisoning Remove `cache: 'maven'` from the maven-goal composite action to prevent potential cache poisoning attacks where a compromised GHA cache could inject malicious Maven dependencies into release artifacts (particularly the AWS Lambda layer published via release-step-3.yml). Also add `-Daether.checksumPolicy=fail` to maven.config as defense in depth to fail builds on checksum mismatches. Ref: elastic/observability-robots#3264 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 GitHub commentsJust comment with:
|
There was a problem hiding this comment.
Pull request overview
This PR hardens the Maven build pipeline in GitHub Actions by disabling Maven dependency caching and enforcing checksum validation during dependency resolution to reduce cache-poisoning risk for release artifacts.
Changes:
- Disabled Maven dependency caching by removing
cache: 'maven'from the shared composite action used by Maven workflows. - Enforced checksum mismatch failures by adding
-Daether.checksumPolicy=failto Maven’s global.mvn/maven.config.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.mvn/maven.config |
Adds strict checksum failure policy for Maven artifact resolution. |
.github/workflows/maven-goal/action.yml |
Removes actions/setup-java Maven caching from the shared composite action to prevent cross-workflow cache reuse. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SylvainJuge
approved these changes
Apr 24, 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.
Summary
cache: 'maven'from.github/workflows/maven-goal/action.ymlto disable Maven dependency caching across all workflows-Daether.checksumPolicy=failto.mvn/maven.configas defense in depthrelease-step-3.yml)Impact
🤖 Generated with Claude Code