Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Disable bundler cache in push_gem.yml#76

Open
connorshea wants to merge 2 commits into
sparklemotion:mastersparklemotion/http-cookie:masterfrom
connorshea:patch-1connorshea/http-cookie:patch-1Copy head branch name to clipboard
Open

Disable bundler cache in push_gem.yml#76
connorshea wants to merge 2 commits into
sparklemotion:mastersparklemotion/http-cookie:masterfrom
connorshea:patch-1connorshea/http-cookie:patch-1Copy head branch name to clipboard

Conversation

@connorshea

Copy link
Copy Markdown

For the sake of safety, to avoid potential cache poisoning attacks. It's unlikely, but the cache also saves very little time here, so I think it's worth doing.

For the sake of safety, to avoid potential cache poisoning attacks. It's unlikely, but the cache also saves very little time here, so I think it's worth doing.
@connorshea
connorshea requested a review from knu as a code owner May 26, 2026 22:46
Otherwise the patch breaks the workflow, I didn't realize the bundler-cache value was the only reason `bundle install` ran 🙃
@connorshea

Copy link
Copy Markdown
Author

Added an explicit bundle install step so release-gem will work, I didn't realize bundler-cache was the only way to get setup-ruby to run bundle install 😬

@flavorjones

flavorjones commented Jul 13, 2026

Copy link
Copy Markdown
Member

@connorshea Thanks for opening this PR. It prompted me to do a full GitHub Actions hardening pass on the repo, see #83.

I was wondering about cache-poisoning, and I'm not sure that it's an attack vector for this workflow. GitHub Actions caches are isolated by git ref. A cache created by a pull request lives in the refs/pull/<n>/merge scope and, per the caching docs, can only be restored by re-runs of that same PR. It cannot be restored by the base branch or by other PRs.

This push_gem.yml runs on a tag push, so it only ever restores from its own tag ref (normally empty) and the default branch. Nothing a fork or PR does can write into the scope the release build reads. Writing into the default branch's cache requires running a workflow on the default branch, which means merge access, and at that point the release workflow itself is editable.

So instead of turning caching off (which also needs the extra bundle install step and slows the release slightly), I think I'd rather keep bundler-cache: true and add an inline # zizmor: ignore[cache-poisoning] note that records this reasoning, as part of the hardening branch. Does that sound right? Am I missing something?

I'm asking because I'd like to really understand this attack vector a bit better -- I have an agent skill to perform workflow hardening and I want to make sure it's doing the right thing.

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.