Skip to content

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

Merged
aramprice merged 1 commit into
developfrom
alert-autofix-2
Aug 18, 2026
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#149
aramprice merged 1 commit into
developfrom
alert-autofix-2

Conversation

@aramprice

Copy link
Copy Markdown
Member

Potential fix for https://github.com/cloudfoundry/bosh-utils/security/code-scanning/2

Add an explicit permissions block to the workflow so GITHUB_TOKEN is not granted broader default permissions.
Best fix here: set permissions: {} at the workflow root (or job level) because this job only runs shell commands and does not need repository/API access. This is the strictest least-privilege setting and preserves existing functionality.

Edit file .github/workflows/protect-master.yml by inserting the permissions block between the trigger (on) and jobs (or at top-level anywhere valid). No imports, methods, or dependencies 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>
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 60c3918b-f37f-4142-b757-cdcb8865ae41

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aramprice
aramprice changed the base branch from master to develop August 17, 2026 19:31
@aramprice
aramprice marked this pull request as ready for review August 17, 2026 19:36
@aramprice
aramprice merged commit 19a7191 into develop Aug 18, 2026
11 of 13 checks passed
@aramprice
aramprice deleted the alert-autofix-2 branch August 18, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant