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@ed81322385810830d3b88f73557e6e1f35ce062a # 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 5 days ago

Add an explicit top-level permissions block in .github/workflows/mit-libraries-ruby-ci.yml so the workflow token is least-privileged by default.
The safest non-breaking baseline for CI workflows is:

  • contents: read

Place this block at the workflow root (between on: and jobs: is a clear location). This applies to all jobs in the workflow, including the reusable-workflow job, unless overridden. No imports, methods, or dependencies are needed.

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@ed81322385810830d3b88f73557e6e1f35ce062a # main
EOF
@@ -5,6 +5,9 @@
pull_request:
branches: [main]

permissions:
contents: read

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