Skip to content

Stop persisting GITHUB_TOKEN in CI checkouts - #788

Merged
d-chambers merged 1 commit into
devfrom
ci-persist-credentials
Jul 26, 2026
Merged

Stop persisting GITHUB_TOKEN in CI checkouts#788
d-chambers merged 1 commit into
devfrom
ci-persist-credentials

Conversation

@d-chambers

@d-chambers d-chambers commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Description

actions/checkout defaults to persist-credentials: true, which writes the job's GITHUB_TOKEN into .git/config as an http.extraheader. It then stays readable by every subsequent step in the job, including the third-party tooling our workflows run (mamba/conda, npm, quarto, pyodide-build, codspeed). runtests.yml already set persist-credentials: false on the network job; this applies the same setting to the remaining 11 checkout steps.

Nothing in CI needs the persisted credentials — no workflow pushes with git:

  • docs deploy via quarto publish (Netlify token) and actions/deploy-pages (OIDC)
  • release assets via softprops/action-gh-release
  • PyPI via pypa/gh-action-pypi-publish
  • build_deploy_stable_docs.yaml only runs local git tag --list / git restore

The one remote git call is git fetch --tags --force in .github/actions/mamba-install-dascore, which works anonymously against this public repo and already runs credential-free today in the network test job.

This clears all artipacked findings from zizmor (uvx zizmor@1.26.1 .github/workflows/ goes from 12 to 0; the remaining unpinned-uses findings are pre-existing and out of scope).

Raised by CodeRabbit on #783, which flagged the new WASM job's checkout. Rather than fix that one step in isolation, all of them are handled here. #783 keeps only the Pyodide version alignment.

Changelog

none

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes.
  • documented the new feature with docstrings and/or appropriate doc page.
  • included tests. See testing guidelines.
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

actions/checkout leaves the job token in .git/config by default, so it
stays readable by every later step, including the third-party tooling
these jobs run (mamba, npm, quarto, pyodide-build). No DASCore workflow
pushes with git: docs deploy through Netlify and actions/deploy-pages,
releases through softprops/action-gh-release, and PyPI through
gh-action-pypi-publish, all of which carry their own credentials. The
only remote git call is 'git fetch --tags' in the mamba-install-dascore
action, which works anonymously against this public repo and already
runs credential-free in the network test job.

Every checkout now sets persist-credentials: false, clearing the
remaining zizmor 'artipacked' findings.
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@d-chambers, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c796263a-3e40-4bbf-b941-f4ba5facb8fb

📥 Commits

Reviewing files that changed from the base of the PR and between 86dddf5 and 2c3c7aa.

📒 Files selected for processing (10)
  • .github/workflows/build_deploy_master_docs.yaml
  • .github/workflows/build_deploy_stable_docs.yaml
  • .github/workflows/get_coverage.yml
  • .github/workflows/lint.yml
  • .github/workflows/profile.yml
  • .github/workflows/run_min_dep_tests.yml
  • .github/workflows/runtests.yml
  • .github/workflows/test_doc_build.yml
  • .github/workflows/test_wasm.yml
  • .github/workflows/upload_pypi.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci-persist-credentials

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@d-chambers d-chambers added the ready_for_review PR is ready for review label Jul 26, 2026
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.98%. Comparing base (86dddf5) to head (2c3c7aa).

❌ Your project check has failed because the head coverage (99.98%) is below the target coverage (100.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #788   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         164      164           
  Lines       17659    17659           
=======================================
  Hits        17657    17657           
  Misses          2        2           
Flag Coverage Δ
network 48.11% <ø> (ø)
unittests 99.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@d-chambers

Copy link
Copy Markdown
Contributor Author

Coverage gap is unrelated (since this didnt touch any actual code)

@d-chambers
d-chambers merged commit edaecbc into dev Jul 26, 2026
27 of 29 checks passed
@d-chambers
d-chambers deleted the ci-persist-credentials branch July 26, 2026 17:33
@d-chambers d-chambers removed the ready_for_review PR is ready for review label Aug 11, 2026
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