Skip to content

Potential fix for code scanning alert no. 7: Workflow does not contain permissions#26

Merged
henri2h merged 1 commit into
rustfrom
alert-autofix-7
May 10, 2026
Merged

Potential fix for code scanning alert no. 7: Workflow does not contain permissions#26
henri2h merged 1 commit into
rustfrom
alert-autofix-7

Conversation

@henri2h
Copy link
Copy Markdown
Owner

@henri2h henri2h commented May 10, 2026

Potential fix for https://github.com/henri2h/PIAF/security/code-scanning/7

Add an explicit permissions block to .github/workflows/main.yml at the workflow root so it applies to all jobs (including build-linux) unless overridden later. The least-privilege setting for this workflow is contents: read, which is sufficient for actions/checkout and a local build step.

Best single fix (no functional change):

  • Edit .github/workflows/main.yml.
  • Insert:
    permissions:
      contents: read
    directly after the on: trigger section and before jobs: (or equivalently near the top-level keys).
  • 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>
@henri2h henri2h marked this pull request as ready for review May 10, 2026 15:55
@henri2h henri2h merged commit 38f6163 into rust May 10, 2026
2 of 3 checks passed
@henri2h henri2h deleted the alert-autofix-7 branch May 10, 2026 15:55
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