Skip to content

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

Merged
spkl merged 1 commit into
mainfrom
alert-autofix-2
Jul 4, 2026
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#66
spkl merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@spkl

@spkl spkl commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/spkl/Diffs/security/code-scanning/2

Add an explicit permissions block to .github/workflows/dotnet.yml at the workflow root (top-level), so it applies to all jobs unless overridden.
For this workflow, the least-privilege baseline is:

  • contents: read

This is sufficient for actions/checkout and build/test/format steps shown, and does not change existing functionality.

Edit region: immediately after the on: trigger block (after line 10 in the provided snippet), before jobs:.

No imports, methods, or additional definitions are needed (YAML-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>
@spkl spkl marked this pull request as ready for review July 4, 2026 11:14
@spkl spkl merged commit 276276f into main Jul 4, 2026
5 checks passed
@spkl spkl deleted the alert-autofix-2 branch July 4, 2026 11:15
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