Skip to content

Potential fix for code scanning alert no. 5: Workflow does not contain permissions - #339

Merged
garloff merged 2 commits into
mainfrom
alert-autofix-5
Dec 3, 2025
Merged

Potential fix for code scanning alert no. 5: Workflow does not contain permissions#339
garloff merged 2 commits into
mainfrom
alert-autofix-5

Conversation

@garloff

@garloff garloff commented Dec 2, 2025

Copy link
Copy Markdown
Member

Potential fix for https://github.com/SovereignCloudStack/docs/security/code-scanning/5

To fix the problem, add a permissions: block to restrict the GITHUB_TOKEN's privileges for this workflow. The block should be placed at either the workflow root (affecting all jobs) or inside specific jobs (here, we have only one: lint-docs). Based on the shown steps, the minimal required permission is contents: read, as the workflow only needs to read Markdown files and fetch diffs via the GitHub API—no write actions are performed. Add the following block at the top, after the workflow name (line 1), or inside the job block (after line 13). Preferably, add at the top since only a single job exists.

No imports or other code changes are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Kurt Garloff <kurt@garloff.de>
@garloff garloff self-assigned this Dec 2, 2025
@garloff
garloff requested a review from maxwolfs December 2, 2025 18:57
@garloff garloff added bug Something isn't working documentation Improvements or additions to documentation labels Dec 2, 2025
@garloff
garloff marked this pull request as ready for review December 2, 2025 18:58
@garloff
garloff merged commit c5dd8c7 into main Dec 3, 2025
5 of 6 checks passed
@garloff
garloff deleted the alert-autofix-5 branch December 3, 2025 14:06
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Sovereign Cloud Stack Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants