Pin mitlibraries/.github action to 935e2fa#330
Conversation
d2f863e to
c16a8ab
Compare
| jobs: | ||
| shared: | ||
| uses: mitlibraries/.github/.github/workflows/ruby-shared-ci.yml@main | ||
| uses: mitlibraries/.github/.github/workflows/ruby-shared-ci.yml@935e2fa59553dbb29b68d3c186a041f3233bfd10 # main |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 days ago
In general, the fix is to explicitly set a permissions block that limits the GITHUB_TOKEN to the minimum scopes needed. This can be set at the workflow root (applies to all jobs that don’t override it) or for the specific job. Since this workflow only has a single job delegating to a reusable workflow, and we don’t see it requiring any write permissions, a safe and typical choice is to give read‑only access to repository contents (contents: read), which is the minimal commonly useful setting for CI jobs that only need to fetch code.
The best way to fix this file without changing existing behavior is to add a permissions block at the top level, between the on: section and jobs:, specifying contents: read. This documents the intended least privilege and ensures that, even if org/repo defaults change, this workflow will keep the restricted permissions. Concretely, in .github/workflows/mit-libraries-ruby-ci.yml, after line 5–6 (the pull_request branches section) and before line 8 (jobs:), insert:
permissions:
contents: readNo imports or additional definitions are needed; this is just YAML configuration for GitHub Actions.
| @@ -4,6 +4,8 @@ | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| shared: |
This PR contains the following updates:
935e2faConfiguration
📅 Schedule: Branch creation - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday ( * 0-4,22-23 * * 1-5 ), Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.