Skip to content

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

Merged
derektamsen merged 1 commit into
mainfrom
alert-autofix-7
Aug 11, 2026
Merged

Potential fix for code scanning alert no. 7: Workflow does not contain permissions#213
derektamsen merged 1 commit into
mainfrom
alert-autofix-7

Conversation

@derektamsen

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/square/luks2crypt/security/code-scanning/7

Add an explicit permissions block to .github/workflows/test.yaml at the workflow root (top-level), so it applies to all jobs unless overridden. For this workflow, contents: read is the minimal and appropriate permission based on current steps (checkout, setup, lint, test). This preserves functionality while enforcing least privilege and satisfying CodeQL.

Edit region: immediately after the on: trigger block and before jobs:.

No new imports, methods, or 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>
@derektamsen
derektamsen marked this pull request as ready for review August 11, 2026 07:47
@derektamsen
derektamsen requested a review from weswhet as a code owner August 11, 2026 07:47
@derektamsen
derektamsen merged commit 0d4dd28 into main Aug 11, 2026
5 checks passed
@derektamsen
derektamsen deleted the alert-autofix-7 branch August 11, 2026 07:49
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