Skip to content

Conversation

@sumithemmadi
Copy link
Owner

Potential fix for https://github.com/sumithemmadi/json-to-plain-text/security/code-scanning/1

To fix the issue, explicitly set the permissions key to limit the permission scope granted to the GITHUB_TOKEN during the workflow execution. The most reliable way to do this is to add a permissions: block with contents: read either at the top of the workflow (preferably, so all jobs inherit it), or inside the test job definition if you want to limit scope to just this job. Given the provided snippet only contains a test job and no special needs, it is best practice to add the permissions: block right under the workflow name: at the top level, ensuring that all current and future jobs inherit this restriction by default. No additional imports, methods, or definitions are required.

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>
@sumithemmadi sumithemmadi marked this pull request as ready for review August 26, 2025 09:07
@sumithemmadi sumithemmadi merged commit 4fce059 into main Aug 26, 2025
5 checks passed
@sumithemmadi sumithemmadi deleted the alert-autofix-1 branch August 26, 2025 12:35
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