Skip to content

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#262

Draft
boyan-velinov wants to merge 1 commit into
masterfrom
alert-autofix-3
Draft

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#262
boyan-velinov wants to merge 1 commit into
masterfrom
alert-autofix-3

Conversation

@boyan-velinov
Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/cloudfoundry/multiapps-cli-plugin/security/code-scanning/3

Add an explicit permissions block at the workflow root in .github/workflows/pull-request-build.yml so all jobs inherit least-privilege token access unless overridden.
For this workflow (checkout + Go build/test on PRs), the minimal required permission is:

  • contents: read

Best single fix without changing behavior: insert

permissions:
  contents: read

directly after the on: trigger block (or near the top 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>
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