Skip to content

Commit 49fa487

Browse files
committed
Disable bundler cache in fork-facing lint job
CodeQL flags cache poisoning risk when pull_request_target checks out untrusted code with bundler-cache enabled. A malicious fork could poison the cache via a crafted Gemfile.lock. Disable caching for the lint job (which runs fork code) and use a plain bundle install instead. The autocorrect job (same-repo only) retains bundler-cache.
1 parent 41bdbef commit 49fa487

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ jobs:
1919
- name: Setup Ruby
2020
uses: ruby/setup-ruby@v1.299.0
2121
with:
22-
bundler-cache: true
22+
bundler-cache: false
23+
24+
- name: Install dependencies
25+
run: bundle install
2326

2427
- name: Run RuboCop
2528
run: |

0 commit comments

Comments
 (0)