Skip to content

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

Merged
jerrf010 merged 1 commit into
mainfrom
alert-autofix-4
Sep 15, 2026
Merged

jerrf010 merged 1 commit into
mainfrom
alert-autofix-4

Conversation

@jerrf010

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/RGSS-CS/documentation/security/code-scanning/4

Add an explicit permissions block to the workflow so GITHUB_TOKEN is least-privileged by default.
Best fix here (without changing functionality) is to set workflow-level permissions to read-only for repository contents, since the shown steps (checkout, setup-node, npm ci, npm run build) do not require write access.

File to change: .github/workflows/test-deploy.yml
Change location: near the top-level keys, directly after the on: trigger block (before defaults: is a clean placement).
What to add:

permissions:
  contents: read

No imports, methods, or dependency changes 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>
@jerrf010
jerrf010 marked this pull request as ready for review September 15, 2026 16:19
@jerrf010
jerrf010 merged commit b3f9121 into main Sep 15, 2026
5 checks passed
@jerrf010
jerrf010 deleted the alert-autofix-4 branch September 15, 2026 16:19
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