Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable caching to avoid any possibility of cache poisoning #658

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

alex
Copy link
Member

@alex alex commented Jan 5, 2025

No description provided.

@@ -90,6 +90,8 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
with:
cache-binary: false
Copy link
Member

Choose a reason for hiding this comment

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

Should we be dropping the earlier pull if we are disabling all layer caches?

Choose a reason for hiding this comment

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

That part should be okay since it's not coming from a GitHub Actions cache, but from a docker pull that you key explicitly with a matrix expansion that's 100% under your control 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's needed. The cache poisoning risk here is mostly that we have no visibility into how it bleeds from PR -> push. With the docker pull, we do know that PRs can't impact prod images.

Copy link
Member

Choose a reason for hiding this comment

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

I think my question is whether it’ll even use those layers with this option enabled, not whether they’re safe

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, so this setting controls caching of the buildx binary itself, not the docker image.

@alex
Copy link
Member Author

alex commented Jan 5, 2025 via email

@reaperhulk reaperhulk merged commit 3392797 into main Jan 6, 2025
28 checks passed
@reaperhulk reaperhulk deleted the alex-patch-1 branch January 6, 2025 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants