Conversation
Calls the centralised reusable workflow in reqstool/.github to auto-approve Renovate PRs, satisfying the required-review branch protection rule and unblocking Renovate's auto-merge. Signed-off-by: jimisola <jimisola@jimisola.com>
|
|
||
| jobs: | ||
| approve: | ||
| uses: reqstool/.github/.github/workflows/renovate-approve.yml@main |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 13 days ago
To fix the issue, add an explicit permissions block that grants the least privileges needed for this workflow. Since this workflow simply triggers a reusable workflow on pull_request events and does not itself perform any repository modifications, a safe and minimal default is to restrict GITHUB_TOKEN to read-only access to repository contents.
The best targeted fix without changing existing functionality is to add a top-level permissions: section (applies to all jobs) or a job-level permissions: under jobs.approve. Both satisfy CodeQL; using a top-level block is clearer and future-proof if additional jobs are added. We’ll add:
permissions:
contents: readbetween the on: block and the jobs: block in .github/workflows/renovate-approve.yml. This documents that the workflow only needs read access to repository contents and ensures the token is not granted unnecessary write privileges. No imports or additional definitions are required.
| @@ -6,6 +6,9 @@ | ||
| - opened | ||
| - reopened | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| approve: | ||
| uses: reqstool/.github/.github/workflows/renovate-approve.yml@main |
Summary
🤖 Generated with Claude Code