Skip to content
Open
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: 1 addition & 1 deletion .github/workflows/mit-libraries-ruby-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

jobs:
shared:
uses: mitlibraries/.github/.github/workflows/ruby-shared-ci.yml@main
uses: mitlibraries/.github/.github/workflows/ruby-shared-ci.yml@3d2816ffa487f3e99b650103252e44552d277ef6 # main

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 3 days ago

Add an explicit top-level permissions block in .github/workflows/mit-libraries-ruby-ci.yml so all jobs (including the reusable workflow job) run with least privilege unless overridden. The safest minimal baseline that preserves typical CI behavior is:

  • contents: read

This avoids changing functional behavior in most CI workflows while explicitly restricting token scope. Place this block at the workflow root, between on: and jobs: (or immediately after name: / event config), so it applies globally.

Suggested changeset 1
.github/workflows/mit-libraries-ruby-ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/mit-libraries-ruby-ci.yml b/.github/workflows/mit-libraries-ruby-ci.yml
--- a/.github/workflows/mit-libraries-ruby-ci.yml
+++ b/.github/workflows/mit-libraries-ruby-ci.yml
@@ -5,6 +5,9 @@
   pull_request:
     branches: [main]
 
+permissions:
+  contents: read
+
 jobs:
   shared:
     uses: mitlibraries/.github/.github/workflows/ruby-shared-ci.yml@3d2816ffa487f3e99b650103252e44552d277ef6 # main
EOF
@@ -5,6 +5,9 @@
pull_request:
branches: [main]

permissions:
contents: read

jobs:
shared:
uses: mitlibraries/.github/.github/workflows/ruby-shared-ci.yml@3d2816ffa487f3e99b650103252e44552d277ef6 # main
Copilot is powered by AI and may make mistakes. Always verify output.