Skip to content

Conversation

@Schrolli91
Copy link
Member

Potential fix for https://github.com/BOSWatch/BW3-Core/security/code-scanning/2

To fix the problem, you should add a permissions block that restricts the permissions of the GitHub Actions workflow to the least privilege necessary. Since this workflow only installs dependencies, runs pytest, and uploads an artifact, it most likely only needs contents: read permissions to check out the repository content.

  • In general, you add a permissions key at the root of the workflow YAML file (applies to all jobs) or inside each job definition if you want to scope more tightly.
  • For this fix, add the block at the top (after name: and before on:) so that all jobs inherit contents: read.
  • No changes to any code outside the YAML are necessary.

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>
@Schrolli91 Schrolli91 self-assigned this Nov 17, 2025
@Schrolli91 Schrolli91 marked this pull request as ready for review November 17, 2025 09:19
@Schrolli91 Schrolli91 merged commit 524efbb into develop Nov 17, 2025
10 checks passed
@Schrolli91 Schrolli91 deleted the alert-autofix-2 branch November 17, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants