Skip to content

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#57

Merged
friedrichg merged 1 commit intomainfrom
alert-autofix-3
Apr 25, 2026
Merged

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#57
friedrichg merged 1 commit intomainfrom
alert-autofix-3

Conversation

@friedrichg
Copy link
Copy Markdown
Member

Potential fix for https://github.com/cortexproject/cortex-tools/security/code-scanning/3

Add an explicit top-level permissions block in .github/workflows/validate_pr.yml so all jobs inherit the minimum required GITHUB_TOKEN scope.
Best single fix (no behavior change): define:

  • permissions:
    • contents: read

Place this at the workflow root (after on block and before jobs), which applies to all jobs unless overridden. No imports, methods, or dependencies are needed since this is YAML configuration only.

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: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@friedrichg friedrichg marked this pull request as ready for review April 25, 2026 04:38
@friedrichg friedrichg requested a review from SungJin1212 April 25, 2026 04:38
@friedrichg friedrichg merged commit e9f20a9 into main Apr 25, 2026
7 checks passed
@friedrichg friedrichg deleted the alert-autofix-3 branch April 25, 2026 05:27
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