Skip to content

Conversation

@garloff
Copy link
Member

@garloff garloff commented Nov 27, 2025

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

To address the detected issue, we should explicitly add a permissions block to the workflow or the affected job. Because the "Deploy" step requires the workflow to push built assets to the gh-pages branch, it needs contents: write. All other operations should only need read permissions. To minimize the scope while allowing required functionality, add a permissions block to the build_and_deploy job:

permissions:
  contents: write

Place it directly under the job name (build_and_deploy:), before runs-on. No new dependencies, methods, or imports are required. This change ensures the GITHUB_TOKEN provided to the job is restricted to just contents: write and nothing broader.


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 <[email protected]>
@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
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