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 2 days ago
To fix this, explicitly define a minimal permissions: block for the workflow so that the GITHUB_TOKEN is constrained to least privilege rather than inheriting potentially broad defaults. Because this workflow is only orchestrating a reusable workflow to build docs and does not appear to need write access to repository contents, an appropriate minimal set is contents: read. Adding the permissions: block at the workflow root (top level, alongside name, on, and jobs) will apply to all jobs that don’t define their own permissions, including the build job that uses the reusable workflow.
Concretely, edit .github/workflows/build-docs.yml and insert a permissions: section after the name: (or before jobs:) with contents: read. No additional imports or dependencies are needed; this is pure GitHub Actions YAML configuration and does not change existing functionality, as read access is sufficient for checking out code and building documentation.
| @@ -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