Skip to content

Conversation

@garloff
Copy link
Member

@garloff garloff commented Dec 17, 2025

Potential fix for https://github.com/SovereignCloudStack/cluster-stacks/security/code-scanning/1

To address the problem, explicitly restrict the permissions granted to the GITHUB_TOKEN in the workflow by adding a permissions: key. The best practice is to set this at the broadest scope with the least necessary privileges, which in this workflow is at the top level (directly after name: and before "on":). For this workflow, "contents: read" is sufficient as it only needs to clone the repository and perform linting without making any changes or needing write access. No additional imports, methods, or variable definitions are necessary—just the addition of the permissions: block.

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

garloff and others added 2 commits December 17, 2025 09:27
…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>
Signed-off-by: Kurt Garloff <kurt@garloff.de>
@garloff garloff self-assigned this Dec 17, 2025
@garloff garloff added bug Something isn't working security Issues or pull requests that are security-relevant labels Dec 17, 2025
@garloff garloff marked this pull request as ready for review December 17, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working security Issues or pull requests that are security-relevant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants