chore: fix workflow does not contain permissions #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Potential fix for https://github.com/valian-ca/react-firebase/security/code-scanning/4
The best way to fix the problem is to explicitly set a
permissions:block in the workflow to ensure the GitHub token only has the privileges needed. Since the shown jobs (linting, type checking, testing, markdown linting) only require read access to the repository contents, they do not need write privileges. You should add apermissions:section at the workflow root (beforejobs:) to enforce least privilege for all jobs, unless any job needs broader permissions (which is not evident from the provided snippet). Set this to at leastcontents: read, which is sufficient for code checkout and reading repository files. No method or import changes are needed, only the insertion of the correct YAML block.Suggested fixes powered by Copilot Autofix. Review carefully before merging.