Skip to content

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

Merged
ReuelAlbert-Dev merged 1 commit into
masterfrom
alert-autofix-48
May 11, 2026
Merged

Potential fix for code scanning alert no. 48: Workflow does not contain permissions#2
ReuelAlbert-Dev merged 1 commit into
masterfrom
alert-autofix-48

Conversation

@ReuelAlbert-Dev
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/ReuelAlbert-Dev/PowerShell/security/code-scanning/48

Add an explicit permissions block in .github/workflows/macos-ci.yml to enforce least privilege.
Best single fix without changing behavior is to set workflow-level minimal permissions:

  • contents: read (recommended baseline, and sufficient for checkout/read operations).

This addresses the CodeQL finding for all jobs that do not override permissions and documents intent. If any job later needs write scopes, add job-specific overrides only for that job.

Where to change:

  • File: .github/workflows/macos-ci.yml
  • Insert permissions: near the top level (after run-name and before on: is a clean location).

No imports/methods/dependencies are needed (YAML-only change).

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>
Signed-off-by: Reuel Albert  <66895085+ReuelAlbert-Dev@users.noreply.github.com>
@ReuelAlbert-Dev ReuelAlbert-Dev marked this pull request as ready for review May 11, 2026 00:11
@ReuelAlbert-Dev ReuelAlbert-Dev merged commit 2952a7a into master May 11, 2026
34 of 35 checks passed
@ReuelAlbert-Dev ReuelAlbert-Dev deleted the alert-autofix-48 branch May 11, 2026 00:12
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