Skip to content

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

Merged
Lawrence Lucas Large (LukeLarge) merged 1 commit into
mainfrom
alert-autofix-1
Dec 4, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#6
Lawrence Lucas Large (LukeLarge) merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@LukeLarge

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/LukeLarge/token-contract/security/code-scanning/1

To fix the problem, we should explicitly add a permissions block to restrict the GITHUB_TOKEN's scope in the workflow, adhering to the principle of least privilege. The recommended way is to add permissions: contents: read at the workflow root level (just beneath the name and above the on: block), ensuring all jobs within the workflow inherit these minimal permissions unless overridden at the job level. This change is made directly in the .github/workflows/npm-grunt.yml file.

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>
@LukeLarge
Lawrence Lucas Large (LukeLarge) marked this pull request as ready for review December 4, 2025 10:36
@LukeLarge
Lawrence Lucas Large (LukeLarge) merged commit 8504f89 into main Dec 4, 2025
3 checks passed
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