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@d0909d78c0d3e832efb54dc9623e1c67b1bd6311 # 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 about 14 hours ago

To fix this, add an explicit top-level permissions block in .github/workflows/mit-libraries-ruby-ci.yml so all jobs in this workflow (including the reusable shared job) run with least-privilege defaults unless overridden.

Best single fix here: add

  • permissions:
    • contents: read

directly after the on: trigger block (before jobs:). This is the standard minimal permission for CI workflows that only need repository read access. It preserves functionality for typical test/lint/build jobs while eliminating implicit broader token access.

No imports, methods, or dependency changes are needed; this is a YAML configuration-only change in .github/workflows/mit-libraries-ruby-ci.yml.

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

permissions:
contents: read

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