Skip to content

Conversation

@garloff
Copy link
Member

@garloff garloff commented Dec 2, 2025

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

To fix this problem, you should add a permissions block to the workflow to explicitly minimize the GITHUB_TOKEN permissions. Since the workflow only checks out the repository, installs Node and dependencies, and builds the site, the job does not appear to require any write permissions. The minimal permission required is contents: read, which allows the workflow to read repository contents (needed by actions/checkout). Add the following block above jobs: in .github/workflows/build.yml:

permissions:
  contents: read

This will ensure that GITHUB_TOKEN is restricted to a minimal, read-only scope.

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 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:56
@garloff garloff requested a review from maxwolfs December 2, 2025 18:58
Copy link
Contributor

@mbuechse mbuechse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be frank, I don't feel competent to judge this change, but I will be happy to assist in mending any problems arising from it.

@garloff garloff merged commit 326966a into main Dec 3, 2025
7 checks passed
@garloff garloff deleted the alert-autofix-2 branch December 3, 2025 14:04
@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.

3 participants