Skip to content

Potential fix for code scanning alert no. 556: Workflow does not contain permissions #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2025

Conversation

aegilops
Copy link
Collaborator

@aegilops aegilops commented Jun 2, 2025

Potential fix for https://github.com/advanced-security/python-lint-code-scanning-action/security/code-scanning/556

To fix the issue, add a permissions block at the root level of the workflow file. Since this is a linting workflow, it only needs read access to the repository contents. The permissions block should be set to contents: read. This change ensures that the workflow adheres to the principle of least privilege and avoids granting unnecessary permissions.


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

aegilops and others added 2 commits June 2, 2025 14:54
…ain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@aegilops aegilops marked this pull request as ready for review June 2, 2025 13:59
@aegilops aegilops merged commit 2c498c2 into main Jun 2, 2025
3 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