Skip to content

Potential fix for code scanning alert no. 2: Workflow does not contain permissions - #83

Merged
manusoft merged 1 commit into
masterfrom
alert-autofix-2
Jul 31, 2026
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#83
manusoft merged 1 commit into
masterfrom
alert-autofix-2

Conversation

@manusoft

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/manusoft/Ytdlp.NET/security/code-scanning/2

Add an explicit permissions block to the workflow so the GITHUB_TOKEN has only the minimum required scope.
Best fix here: add permissions: contents: read at the workflow root (after on: and before jobs:), which applies to all jobs unless overridden. This preserves current functionality and satisfies CodeQL by explicitly constraining token privileges.

File/region to change

  • .github/workflows/ci-integration.yml
  • Insert a workflow-level permissions block between the trigger section and jobs:.

No imports, methods, or dependencies are needed (YAML config-only change).

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>
@manusoft manusoft self-assigned this Jul 31, 2026
@manusoft
manusoft marked this pull request as ready for review July 31, 2026 21:50
@manusoft
manusoft merged commit 40fea7f into master Jul 31, 2026
4 checks passed
@manusoft
manusoft deleted the alert-autofix-2 branch July 31, 2026 21:50
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.

1 participant