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/3

The best way to fix this issue is to explicitly set the permissions block at the job or workflow level (directly under name: at the root, or within the specific job). For this workflow, since only the contents: write permission is needed for publishing via peaceiris/actions-gh-pages@v3, we can set contents: write at the job level for build_and_staging. This ensures that the GITHUB_TOKEN has only the permissions necessary to complete the operations (i.e., pushing to the gh-pages-staging branch) and no more. The change should be made by adding the following lines just before runs-on: ubuntu-latest (line 11), indented properly as per YAML requirements.

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:57
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.

See the other PR. I'm not sure, but we can always repair later.

@garloff garloff merged commit ae27e97 into main Dec 3, 2025
5 of 6 checks passed
@garloff garloff deleted the alert-autofix-3 branch December 3, 2025 14:05
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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants