Skip to content

Conversation

@Sakth1
Copy link
Owner

@Sakth1 Sakth1 commented Dec 10, 2025

Potential fix for https://github.com/Sakth1/StaTube/security/code-scanning/1

To fix this problem, you should add a permissions block at the job (build) level or at the root workflow level, specifying only the minimal permissions needed. Since this workflow installs dependencies, runs tests, and lints code, but does not evidently push code, open issues, or otherwise write to the repository, the minimal required permission is contents: read. This can be set at the job level (immediately after the job name, before runs-on) or at the root (immediately after name: and before on:). Setting the block at the job level is also acceptable and closest to CodeQL’s recommendation.

Change needed:
Add:

permissions:
  contents: read

to the build job block, after its name and before runs-on.


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

Sakth1 and others added 5 commits December 10, 2025 14:43
…n permissions

Potential fix for code scanning alert no. 1: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Sakth1 Sakth1 marked this pull request as ready for review December 10, 2025 11:21
@Sakth1 Sakth1 merged commit 6fa142d into main Dec 10, 2025
8 checks passed
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