Skip to content

Potential fix for code scanning alert no. 4: Workflow does not contain permissions#38

Merged
nstarman merged 1 commit into
mainfrom
alert-autofix-4
Nov 1, 2025
Merged

Potential fix for code scanning alert no. 4: Workflow does not contain permissions#38
nstarman merged 1 commit into
mainfrom
alert-autofix-4

Conversation

@nstarman
Copy link
Copy Markdown
Contributor

@nstarman nstarman commented Nov 1, 2025

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

To fix the problem, add an explicit permissions block to the "dist" job. The safest minimal permission is contents: read, which allows only fetching repository content (needed for checkout). This change should be made under jobs.dist (just below name: Distribution build), matching the positioning and structure of how your other jobs specify permissions. No changes to functionality will occur; this will only restrict the GITHUB_TOKEN to minimal required access.


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 November 1, 2025 19:32
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f8bd0ed) to head (71c75b9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #38   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           82        82           
=========================================
  Hits            82        82           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nstarman nstarman added this to the v0.4.x milestone Nov 1, 2025
@nstarman nstarman merged commit d91a995 into main Nov 1, 2025
18 checks passed
@nstarman nstarman deleted the alert-autofix-4 branch November 1, 2025 19:33
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