Skip to content

fix: give only read permission for the github workflow - #258

Merged
pjurczynski merged 1 commit into
masterfrom
alert-autofix-4
Jan 7, 2026
Merged

pjurczynski merged 1 commit into
masterfrom
alert-autofix-4

Conversation

@pjurczynski

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/pnext/three-loader/security/code-scanning/4

Generally, to fix this type of problem you add a permissions block to the workflow (or to specific jobs) that grants only the minimal scopes required. For workflows that just check out code and run tests/lint/build, contents: read is normally sufficient.

For this specific workflow in .github/workflows/development.yml, the best fix is to add a root-level permissions block immediately after the name: line. This will apply to all jobs (lint, test, build) since none of them define their own permissions. Set it to:

permissions:
  contents: read

No other changes are required, because the steps only read repository contents via actions/checkout and then run local npm commands. No additional imports or methods are needed, as this is purely a YAML configuration change.

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@pjurczynski pjurczynski changed the title Potential fix for code scanning alert no. 4: Workflow does not contain permissions fix: give only read permission for the github workflow Jan 7, 2026
@pjurczynski
pjurczynski marked this pull request as ready for review January 7, 2026 15:37
@pjurczynski
pjurczynski merged commit 8acc922 into master Jan 7, 2026
7 checks passed
@pjurczynski
pjurczynski deleted the alert-autofix-4 branch January 7, 2026 15:37
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