Repository navigation
ci: give ci-pass no token permissions - #164
Conversation
Walkthrough
Priority: Change: Other Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
586f0b91-40e4-42a7-8045-0c669b613d0c
Files selected for processing: 2-
.github/workflows/ci.ymlchangelog/164.trivial.md
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e33e531c-6d68-419d-b0eb-653c896f0856
Files selected for processing: 1-
.github/workflows/ci.yml
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
| permissions: | ||
| contents: read | ||
| pull-requests: read |
There was a problem hiding this comment.
Remove pull-requests: read from the workflow permissions.
No job in this workflow needs pull request access. The four checkout jobs need only contents: read. The tj-actions/changed-files step in check-changelog runs after actions/checkout, so it uses the local Git path. It calls the pull request REST API only when use_rest_api is true, and this workflow does not set that input. The other jobs make no GitHub API calls.
The workflow-level grant gives every step in the four checkout jobs a token that can read pull request data. These jobs run checked-out code and dependency install scripts, and they do not use that access. ci-pass already sets permissions: {}, so this change does not affect it.
Suggested fix
-
--- "a/.github/workflows/ci.yml" +++ "b/.github/workflows/ci.yml" @@ -6,9 +6,8 @@ branches: [main] tags: ['v*'] permissions: contents: read - pull-requests: read jobs: check-changelog:
Committable suggestion
-
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.Suggested changepermissions: contents: read pull-requests: read permissions: contents: read
Gives the
ci-passjob an emptypermissionsblock, because it only reads the results of other jobs and needs no token access. This was meant for #160 but landed after it merged. CodeQL flagged the same job in climate-ref.Summary by CodeRabbit