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 problem, add an explicit permissions: block that grants only the minimal required permissions for this workflow. Because this job only delegates to a reusable workflow via uses:, the caller should still define its own permissions; the called workflow cannot gain more permissions than the caller provides. The safest general default when you don’t know the exact needs is contents: read, which matches GitHub’s recommended minimal baseline and satisfies the CodeQL rule by explicitly constraining the GITHUB_TOKEN.
The best minimal change here is to add a permissions: section at the top level of the workflow (just under name: and before on:). This will apply to all jobs (including approve, which doesn’t define its own permissions:), without changing how the job is structured or how it calls the reusable workflow. No imports or additional methods are needed—this is purely a YAML configuration change in .github/workflows/renovate-approve.yml around lines 1–4.
| @@ -1,4 +1,6 @@ | ||
| name: Renovate auto-approve | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: |
Summary
🤖 Generated with Claude Code