Conversation
Call the centralized reusable workflow from reqstool/.github to validate Antora docs build cleanly on PRs and pushes to main. Signed-off-by: jimisola <jimisola@jimisola.com>
|
|
||
| jobs: | ||
| build: | ||
| uses: reqstool/.github/.github/workflows/build-docs.yml@main |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 1 day ago
In general, the fix is to explicitly declare a permissions block in the workflow, applying the principle of least privilege. Since this workflow only delegates to a reusable workflow and does not itself need to write to the repository, a minimal, safe default is permissions: contents: read at the top level, which applies to all jobs without their own permissions block.
The best way to fix this specific file without changing functionality is to add a root-level permissions section between the on: block and the jobs: block. This will set the default permissions for the build job that calls the reusable workflow. Concretely, in .github/workflows/build-docs.yml, insert:
permissions:
contents: readat line 13 (before jobs:). No imports or additional definitions are needed; this is standard GitHub Actions YAML configuration.
| @@ -10,6 +10,9 @@ | ||
| paths: | ||
| - "docs/**" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| uses: reqstool/.github/.github/workflows/build-docs.yml@main |
Summary
docs/**files changereqstool/.githubTest plan