Skip to content

Conversation

@nstarman
Copy link
Contributor

Potential fix for https://github.com/GalacticDynamics/is_annotated/security/code-scanning/6

To fix the problem, we should add a permissions block to the dist job in the workflow file .github/workflows/cd.yml. Since this job is for building distributions and does not require any special token privileges (it just checks out source code and runs build steps), we can safely set the permissions to the minimal possible, which is contents: read. This restricts the GITHUB_TOKEN to read-only access to repository contents, preventing accidental code or secret leaks and adhering to the principle of least privilege.

Steps:

  • Edit .github/workflows/cd.yml.
  • In the dist job (under jobs: dist:), add a permissions: block with contents: read, at the same indentation level as the other job properties (such as name and runs-on).
  • No further code or dependency changes required.

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 v1.x milestone Oct 27, 2025
@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

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

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

☔ 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 marked this pull request as ready for review October 27, 2025 03:25
@nstarman nstarman merged commit 49f78ef into main Oct 27, 2025
21 checks passed
@nstarman nstarman deleted the alert-autofix-6 branch October 27, 2025 03:28
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