Skip to content

Comments

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

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

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

Conversation

@nstarman
Copy link
Contributor

@nstarman nstarman commented Oct 2, 2025

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

To fix the error, add a permissions key to the root of the workflow file .github/workflows/ci.yml. This ensures that all jobs use least-privilege settings for GITHUB_TOKEN. Since the shown jobs do not require more than read access (not writing to the repo or manipulating PRs), set permissions: contents: read immediately after the name property (line 1). No changes are necessary at the job level unless some jobs require additional permissions. This fix restricts the default token permissions for all jobs in this workflow.


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 2, 2025 21:37
@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #22   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            5         5           
=========================================
  Hits             5         5           

☔ 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 v1.0.x milestone Oct 2, 2025
@nstarman nstarman merged commit 71429a9 into main Oct 2, 2025
17 checks passed
@nstarman nstarman deleted the alert-autofix-5 branch October 2, 2025 21:40
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