Skip to content

Conversation

@gregnazario
Copy link
Contributor

Potential fix for https://github.com/aptos-labs/aptos-python-sdk/security/code-scanning/5

To fix the issue, add a permissions block to the workflow file. This block should specify the least privileges required for the workflow to function. Based on the provided code, the workflow appears to only need contents: read permissions. This change will ensure that the GITHUB_TOKEN used in the workflow has restricted access, reducing the risk of unauthorized actions.

The permissions block can be added at the root level of the workflow file to apply to all jobs, or it can be added specifically to the run-localnet-examples job. In this case, adding it at the root level is sufficient and simplifies the configuration.


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>
@gregnazario gregnazario marked this pull request as ready for review May 30, 2025 02:09
@gregnazario gregnazario requested review from a team and davidiw as code owners May 30, 2025 02:09
@gregnazario gregnazario merged commit 37ffe9e into main May 30, 2025
5 of 6 checks passed
@gregnazario gregnazario deleted the alert-autofix-5 branch May 30, 2025 02:16
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