Skip to content

Conversation

@tbroadley
Copy link
Owner

Potential fix for https://github.com/tbroadley/spellchecker-cli/security/code-scanning/1

To fix the problem, we need to explicitly restrict the permissions for the GITHUB_TOKEN in the workflow. The CI job in this workflow only checks out code, sets up Node.js, installs dependencies, and runs scripts—none of these require write access to repository contents, pull requests, or other scopes. Thus, the minimal permission required is contents: read, which allows the workflow to read the repository contents. This should be set in the workflow file either at the root level (affecting all jobs by default), or on individual jobs. The best and most maintainable way is to add it to the root of the file, just after the name declaration and before on:.

No imports, definitions, or additional configuration are needed, just a single YAML block added.


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>
@tbroadley tbroadley marked this pull request as ready for review November 8, 2025 17:22
@tbroadley tbroadley merged commit 31f89c6 into master Nov 8, 2025
6 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.

2 participants