Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#79

Merged
hivesystems-tech merged 1 commit intomainfrom
alert-autofix-1
May 31, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#79
hivesystems-tech merged 1 commit intomainfrom
alert-autofix-1

Conversation

@coreyneskey
Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/Hive-Systems/pyfair/security/code-scanning/1

To fix the issue, we need to add a permissions block to the workflow file. Since the workflow only checks out the repository, installs dependencies, and runs tests, it does not require write permissions. The minimal permissions required are contents: read, which allows the workflow to read the repository contents. This block should be added at the root level of the workflow to apply to all jobs.


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

…n permissions

Limit workflow token to read

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@hivesystems-tech hivesystems-tech marked this pull request as ready for review May 31, 2025 20:56
@hivesystems-tech hivesystems-tech merged commit 0e52eeb into main May 31, 2025
8 checks passed
@hivesystems-tech hivesystems-tech deleted the alert-autofix-1 branch May 31, 2025 20:57
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