Skip to content

Potential fix for code scanning alert no. 12: Workflow does not contain permissions#23

Merged
Zefek merged 1 commit into
mainfrom
alert-autofix-12
Jun 1, 2026
Merged

Potential fix for code scanning alert no. 12: Workflow does not contain permissions#23
Zefek merged 1 commit into
mainfrom
alert-autofix-12

Conversation

@Zefek
Copy link
Copy Markdown
Owner

@Zefek Zefek commented Jun 1, 2026

Potential fix for https://github.com/Zefek/OdectyMVC/security/code-scanning/12

Add an explicit permissions block to .github/workflows/build.yml at the workflow root (right after name or after on) so it applies to all jobs unless overridden.
For this workflow, the minimal safe setting is:

  • contents: read

This preserves existing behavior (checkout can read repo contents; artifact upload does not require repo write scope) while enforcing least privilege and satisfying CodeQL.

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

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Zefek Zefek marked this pull request as ready for review June 1, 2026 10:25
@Zefek Zefek merged commit 32d6eed into main Jun 1, 2026
4 checks passed
@Zefek Zefek deleted the alert-autofix-12 branch June 1, 2026 10:25
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