Skip to content

Conversation

@nstarman
Copy link
Contributor

Potential fix for https://github.com/GalacticDynamics/xmmutablemap/security/code-scanning/4

To fix this problem, explicitly set the GITHUB_TOKEN permissions for the dist job to the minimum required. In this case, since the job only checks out code and builds/inspects it, it only needs read-only access to repository contents. Add a permissions: contents: read block to the dist job in .github/workflows/cd.yml, directly after the job name and before runs-on. No changes are required to other jobs, as they already specify permissions. Importantly, this change does not interfere with existing functionality and aligns the workflow with GitHub best practices.


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 added this to the v0.2.x milestone Oct 22, 2025
@nstarman nstarman marked this pull request as ready for review October 22, 2025 01:18
@nstarman nstarman merged commit ecbe9c8 into main Oct 22, 2025
15 checks passed
@nstarman nstarman deleted the alert-autofix-4 branch October 22, 2025 01:18
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