Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.1
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}
Comment on lines 16 to +18
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Checking out the PR head branch under pull_request_target while the workflow has contents: write and runs Bundler/RuboCop means untrusted PR code can execute with a write-capable GITHUB_TOKEN (repo-compromise risk). It will also fail for fork PRs because head.ref refers to a branch in the fork, but actions/checkout defaults to the base repo unless repository: is set.

Consider gating this job/step to same-repo PRs only (e.g., if: github.event.pull_request.head.repo.full_name == github.repository) and using a separate read-only lint workflow for forks; or otherwise avoid pull_request_target + write permissions when running PR code.

Copilot uses AI. Check for mistakes.

- name: Setup Ruby
uses: ruby/setup-ruby@v1.284.0
Expand Down
Loading