Skip to content

Conversation

@garloff
Copy link
Member

@garloff garloff commented Dec 17, 2025

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

To fix this issue, explicitly declare a permissions block to restrict the default power of the GITHUB_TOKEN for this workflow. Place it at the root level (top of the YAML, below the name: and on: blocks) so it applies to all jobs unless overridden. Since no steps require write access via the GITHUB_TOKEN, setting permissions: { contents: read } ensures only read access to repository contents, following the principle of least privilege.

Change to make:

  • At the root of .github/workflows/manage-github-repositories.yml (after name: or after on:), add:
    permissions:
      contents: read
  • No other files or lines need changing, as no elevated permissions are required by the visible workflow steps.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants