Skip to content

Potential fix for code scanning alert no. 10: Workflow does not contain permissions#65

Merged
cawalch merged 1 commit intomainfrom
alert-autofix-10
Jul 13, 2025
Merged

Potential fix for code scanning alert no. 10: Workflow does not contain permissions#65
cawalch merged 1 commit intomainfrom
alert-autofix-10

Conversation

@cawalch
Copy link
Collaborator

@cawalch cawalch commented Jul 13, 2025

Potential fix for https://github.com/jmespath-community/typescript-jmespath/security/code-scanning/10

The fix involves adding a permissions block to explicitly limit the permissions of the GITHUB_TOKEN. This can be done either at the root of the workflow (applying to all jobs) or within each job. In this case, adding it at the root level is more efficient as both jobs do not appear to require elevated write permissions. Based on the provided workflow, the jobs only need to read repository contents and do not perform actions like creating issues or pushing code.

The permissions block will restrict access to:

  • contents: read: Allowing only read access to repository content.

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

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@cawalch cawalch marked this pull request as ready for review July 13, 2025 20:05
@cawalch cawalch merged commit 84805e6 into main Jul 13, 2025
7 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