Skip to content

fix: remove Docker layer cache from release workflows#2718

Merged
mallendem merged 7 commits intomainfrom
fix/cache-poisoning-mitigation
Mar 10, 2026
Merged

fix: remove Docker layer cache from release workflows#2718
mallendem merged 7 commits intomainfrom
fix/cache-poisoning-mitigation

Conversation

@mallendem
Copy link
Copy Markdown
Contributor

@mallendem mallendem commented Mar 6, 2026

Summary

  • Removed cache-from: type=gha and cache-to: type=gha,mode=max from release.yml and release-main.yml
  • Mitigates cache poisoning risk where a compromised GHA cache entry could inject malicious Docker layers into published container images at docker.elastic.co/observability/apm-agent-dotnet

Impact

  • Build time: +1-2 minutes per release (Dockerfile is lightweight — 6 instructions)
  • Functional: None — identical image output, just built from scratch each time

🤖 Generated with Claude Code

…he poisoning

Remove `cache-from: type=gha` and `cache-to: type=gha,mode=max` from
both release.yml and release-main.yml to prevent potential cache
poisoning attacks where a compromised GHA cache entry could inject
malicious Docker layers into published container images.

Ref: elastic/observability-robots#3264

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mallendem mallendem marked this pull request as ready for review March 6, 2026 11:06
Copilot AI review requested due to automatic review settings March 6, 2026 11:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes GitHub Actions (GHA) Docker layer caching from the release workflows to reduce the risk of cache poisoning when building/publishing docker.elastic.co/observability/apm-agent-dotnet.

Changes:

  • Removed cache-from: type=gha from Docker build/push steps in release workflows.
  • Removed cache-to: type=gha,mode=max from Docker build/push steps in release workflows.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/release.yml Removes GHA Docker layer cache usage from the release image build/push step.
.github/workflows/release-main.yml Removes GHA Docker layer cache usage from the main-branch release image build/push step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

v1v
v1v previously approved these changes Mar 10, 2026
@mallendem mallendem enabled auto-merge (squash) March 10, 2026 08:09
Comment thread .github/workflows/release-main.yml
@v1v v1v self-requested a review March 10, 2026 08:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-main.yml Outdated
@mallendem mallendem merged commit 06ce841 into main Mar 10, 2026
20 checks passed
@mallendem mallendem deleted the fix/cache-poisoning-mitigation branch March 10, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants