Skip to content

Conversation

@rocktavious
Copy link
Collaborator

Potential fix for https://github.com/OpsLevel/cli/security/code-scanning/11

To fix this problem, explicitly set the permissions for the workflow, limiting the GITHUB_TOKEN permissions granted to jobs. The best way is to add a permissions: block at the root level of the workflow (above jobs:), specifying the minimal required permissions. In this case, likely only contents: read is required—a conservative and safe default. This prevents excessive access, minimizing risk while preserving current functionality. To fix this, insert:

permissions:
  contents: read

after the workflow name, events (on:), and before jobs:.


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

rocktavious and others added 3 commits August 25, 2025 10:07
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@rocktavious rocktavious self-assigned this Aug 25, 2025
@rocktavious rocktavious marked this pull request as ready for review August 25, 2025 14:44
@rocktavious rocktavious merged commit 0f0363f into main Aug 25, 2025
5 checks passed
@rocktavious rocktavious deleted the alert-autofixes branch August 25, 2025 14:44
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