Skip to content

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

Merged
pyrotiger merged 1 commit into
mainfrom
alert-autofix-1
May 2, 2026
Merged

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

Conversation

@pyrotiger
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/pyrotiger/secure-boot/security/code-scanning/1

Add an explicit permissions block to .github/workflows/shellcheck.yml at the workflow root so it applies to all jobs (including shellcheck).
For this workflow, the minimal required permission is:

  • contents: read

Best single fix (no functionality change): insert:

permissions:
  contents: read

immediately after the trigger section (on: block) and before jobs:.
No imports, methods, or definitions are needed (YAML workflow config 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>
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 2, 2026

@pyrotiger pyrotiger marked this pull request as ready for review May 2, 2026 07:21
Copilot AI review requested due to automatic review settings May 2, 2026 07:21
@pyrotiger pyrotiger merged commit 28687f6 into main May 2, 2026
5 checks passed
@pyrotiger pyrotiger deleted the alert-autofix-1 branch May 2, 2026 07:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds explicit GitHub Actions token permissions to address a code scanning alert about missing workflow permissions, without changing the workflow’s behavior.

Changes:

  • Add a top-level permissions block to the ShellCheck workflow.
  • Restrict the workflow token to contents: read (minimum needed for actions/checkout).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants