Skip to content

Potential fix for code scanning alert no. 5: Workflow does not contain permissions#26

Merged
nstarman merged 1 commit intomainfrom
alert-autofix-5
Oct 27, 2025
Merged

Potential fix for code scanning alert no. 5: Workflow does not contain permissions#26
nstarman merged 1 commit intomainfrom
alert-autofix-5

Conversation

@nstarman
Copy link
Contributor

Potential fix for https://github.com/GalacticDynamics/diffraxtra/security/code-scanning/5

To fix this issue, add a permissions block to the dist job in .github/workflows/cd.yml with the minimal required permissions. Since the dist job only checks out code and runs a build step (does not need to write to the repository, create issues, approve PRs, etc.), setting contents: read is appropriate and follows the recommended default. Insert the following block under the job name and above runs-on for the dist job:

permissions:
  contents: read

Detail:
Edit .github/workflows/cd.yml between lines 24-26 by inserting the block as above. No additional methods, imports, or definitions are needed.

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>
Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
@nstarman nstarman marked this pull request as ready for review October 27, 2025 03:26
@nstarman nstarman added this to the 1.5.x milestone Oct 27, 2025
@nstarman nstarman merged commit c5f8c75 into main Oct 27, 2025
18 checks passed
@nstarman nstarman deleted the alert-autofix-5 branch October 27, 2025 03:29
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