Skip to content

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

Merged
ZanattaMichael merged 1 commit into
mainfrom
alert-autofix-2
Aug 12, 2026
Merged

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

Conversation

@ZanattaMichael

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/ZanattaMichael/AzureDevOpsDsc/security/code-scanning/2

Add an explicit permissions block to .github/workflows/build.yml at the workflow root (top-level), so it applies to all jobs unless overridden.
For this workflow, the minimal and appropriate permission is:

  • contents: read

This preserves existing functionality (checkout/build/cache/artifact upload) while ensuring the token cannot silently inherit broader write access.

Change region: insert the block after the on: triggers and before jobs:.

No imports, methods, or additional definitions are needed.

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>
@ZanattaMichael
ZanattaMichael marked this pull request as ready for review August 12, 2026 04:23
@ZanattaMichael
ZanattaMichael merged commit fed0446 into main Aug 12, 2026
5 checks passed
@ZanattaMichael
ZanattaMichael deleted the alert-autofix-2 branch August 12, 2026 04:23
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