Skip to content

Potential fix for code scanning alert no. 8: Workflow does not contain permissions#236

Merged
iamdevlinph merged 4 commits into
mainfrom
alert-autofix-8
May 15, 2026
Merged

Potential fix for code scanning alert no. 8: Workflow does not contain permissions#236
iamdevlinph merged 4 commits into
mainfrom
alert-autofix-8

Conversation

@iamdevlinph
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/iamdevlinph/common-utils-pkg/security/code-scanning/8

Add an explicit permissions block at the workflow root in .github/workflows/run-tests.yml, directly under on: (or before jobs:), so it applies to all jobs unless overridden.
For this workflow, the minimal safe baseline is:

  • contents: read

This satisfies CodeQL’s recommendation and preserves existing functionality since the workflow only checks out code, installs dependencies, caches, and runs tests. No new imports, methods, or definitions are needed (YAML workflow file only).

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

iamdevlinph and others added 4 commits May 15, 2026 16:51
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@iamdevlinph iamdevlinph marked this pull request as ready for review May 15, 2026 08:58
@iamdevlinph iamdevlinph merged commit c3e1451 into main May 15, 2026
9 checks passed
@iamdevlinph iamdevlinph deleted the alert-autofix-8 branch May 15, 2026 08:58
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