ci: persist-credentials: false on the 9 checkout steps that lacked it (CI-SECURITY-CREDENTIALS) #595
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!595
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/persist-credentials-false"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: CI-SECURITY-CREDENTIALS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7127480355), from NinsonD's finding in the same issue.
ci.yml(5 steps),runtime.yml(3) andxma2-decoder.yml(1) left theGITHUB_TOKENin.git/configfor the rest of the job. The other 8 checkout steps in.github/workflows/already setpersist-credentials: false; after this change all 17 do.No step in those jobs runs an authenticated git command, so the token was never needed there. The only git calls are
make_game.py'sgit submodule updateand theFetchContentdownloads, both over public URLs. The one job withsubmodules: recursive(ci.yml, line 66) is the case to watch: the checkout action fetches submodules before it drops the credentials, so it should still work.Tested:
actions/checkoutstep in all workflow files parses with PyYAML and haswith.persist-credentials: false(17 of 17).git diff --checkis clean; line endings and the final newline are unchanged.python -I tests/test_ci_registration.py,test_no_game_data_workflow.py,test_pr_conflict_label.pyandtest_runtime_paths.pypass (Python 3.14.10).python -I scripts/check_no_game_data.pyon the three files: exit 0.Not tested: the workflows themselves, since I have no way to run GitHub Actions here and
actionlintis not installed. The CI run on this PR is the real check, especially the submodule job. No game files and no GPU needed.AI-assisted (Claude Code).
Reviewed at 1c850c02b. Looks right to me; checked rather than read:
actions/checkoutsteps, all 17 withpersist-credentials: false(the 7 inci.ymlincluded: change-scope, check, translator-tests, semantic-tests, macos-python, viewer-tests, stdlib-tests-linux).ci.yml,runtime.yml,xma2-decoder.yml) nothing pushes, fetches with auth, callsghor readsGITHUB_TOKEN/secrets.*, so dropping the persisted token removes exposure without removing a capability.submodules: recursive(ci.yml:68): the checkout action fetches submodules before it removes the credentials, andrpf9-exploreris a public URL anyway, so that job should be unaffected. The CI run on this PR is still the proof for that one.xma2-decoder.yml(top-levelconcurrency), a different hunk from this one's checkout step; I don't expect a conflict, but whichever lands second should re-check.No game data in the diff. AI-assisted review (Claude Code).
Thanks @TuroYT for picking up and implementing the CI-SECURITY-CREDENTIALS finding I reported in #14!
I’ve reviewed the proposed changes, and adding persist-credentials: false to the remaining checkout steps looks like a sensible security improvement.
Thanks also to @MoonEyes for the additional review and validation.
I noticed the GitHub Actions workflows currently show action_required, so the CI results are still pending verification. It would be good to confirm that the recursive submodule checkout and other affected jobs pass once the workflows are approved to run.
Happy to help with further security reviews and CI improvements. Looking forward to contributing more to Leonida!
Merged, thanks! All 17 checkouts now set
persist-credentials: false, and no job pushes or uses a token.mainf9642954f+1c850c02b: the semantic suite passes (491 files, 6,312 tests, 0 files failed); the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 3 changed files.AI-assisted (Claude Code, Claude Opus 5.5).