Skip to content

fix: Workflow does not contain permissions - #74

Merged
taru-garg-2000 merged 1 commit into
mainfrom
alert-autofix-1
Jun 2, 2026
Merged

taru-garg-2000 merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@taru-garg-2000

Copy link
Copy Markdown
Member

Potential fix for https://github.com/hashicorp/github-actions-core/security/code-scanning/1

Add an explicit permissions block to the workflow so GITHUB_TOKEN is constrained to least privilege.
Best fix here (without changing functionality): define workflow-level permissions with contents: read, which is sufficient for actions/checkout and running Super-Linter in this configuration.

Change file: .github/workflows/superlinter.yml
Change region: near the top-level keys (name, on, jobs) by inserting:

permissions:
  contents: read

No imports, methods, or external dependencies are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

@taru-garg-2000
taru-garg-2000 marked this pull request as ready for review June 1, 2026 08:35
@taru-garg-2000
taru-garg-2000 requested a review from a team as a code owner June 1, 2026 08:35
@taru-garg-2000 taru-garg-2000 changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions fix: Workflow does not contain permissions Jun 1, 2026
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@taru-garg-2000
taru-garg-2000 merged commit 4fc9231 into main Jun 2, 2026
6 checks passed
@taru-garg-2000
taru-garg-2000 deleted the alert-autofix-1 branch June 2, 2026 05:52
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