Skip to content

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

Draft
bonissanti wants to merge 1 commit into
masterfrom
fix/workflow-permission
Draft

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#19
bonissanti wants to merge 1 commit into
masterfrom
fix/workflow-permission

Conversation

@bonissanti

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/bonissanti/Dr.Mario-Front/security/code-scanning/1

Add an explicit permissions block in .github/workflows/build.yml to constrain GITHUB_TOKEN privileges. The best minimal, non-breaking fix is to define workflow-level permissions with contents: read, which applies to all jobs unless overridden and satisfies checkout/read operations. This preserves current functionality while enforcing least privilege.

Change region:

  • File: .github/workflows/build.yml
  • Insert permissions: between the on: block and jobs: block.

No imports, methods, or external definitions are needed (YAML config change only).

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>
@bonissanti bonissanti self-assigned this Jun 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

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