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

Dont read from cache in sensitive workflows #31734

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

damccorm
Copy link
Contributor

@damccorm damccorm commented Jul 1, 2024

Right now, there is some potential for cache poisoning from other workflows. We shouldn't read from the cache in workflows with access to sensitive credentials to avoid this risk


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@damccorm
Copy link
Contributor Author

damccorm commented Jul 1, 2024

R: @Abacn

@github-actions github-actions bot added the build label Jul 1, 2024
Copy link
Contributor

github-actions bot commented Jul 1, 2024

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

LGTM for gradle enterprise cache.

there are two caches - gradle enterprise and github action caches. If setup-environment-action is used, the latter is always enabled:

(even disable-cache is set it only makes gradle cache read-only)

I kind of remember GHA cache is per workflow based, if so then it is fine leave it as is, good to double check.

@damccorm
Copy link
Contributor Author

damccorm commented Jul 1, 2024

Good catch, I didn't realize we use the actions cache for this - I'll disable that since we leave around actions write permissions in places (which allows writing to the cache)

@damccorm damccorm merged commit 4738477 into master Jul 1, 2024
4 checks passed
@damccorm damccorm deleted the users/damccorm/cachePoisoning branch July 1, 2024 14:29
acrites pushed a commit to acrites/beam that referenced this pull request Jul 17, 2024
* Dont read from cache in sensitive workflows

* Disable actions cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants