Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 7 days ago
Generally, the fix is to add an explicit
permissions:block that grants only the minimal access needed to build the docs. Because this workflow simply delegates to a reusable workflow viauses:, and we cannot see any need for write access from the snippet, the safest and least intrusive change is to set workflow-wide read-only permissions (e.g.,contents: read). This documents the intended access and prevents the token from having elevated privileges if repository or organization defaults are broad.Concretely, in
.github/workflows/build-docs.yml, add apermissions:section at the root level (between theon:block andjobs:) specifying read-only access. A minimal and common baseline is:This applies to all jobs (including the
buildjob using the reusable workflow) that do not overridepermissions:themselves. No additional imports or methods are required since this is a YAML configuration change only, and it does not alter the functional behavior of the docs build, only the scope of the GITHUB_TOKEN.