ci: persist-credentials: false on the 9 checkout steps that lacked it (CI-SECURITY-CREDENTIALS) #595

Manually merged
github merged 1 commit from gh-pr/595/head into gh-pr/595/base 2026-11-26 09:10:44 +00:00
Owner

@⁠TuroYT on GitHub · 2026-11-24 09:30 UTC · original
TuroYT:ci/persist-credentials-false → main · +17 −0 · 3 files · 1 commits · merged 2026-11-25 21:26 UTC

Claimed in the coordination issue as: CI-SECURITY-CREDENTIALS (#14), from NinsonD's finding in the same issue.

ci.yml (5 steps), runtime.yml (3) and xma2-decoder.yml (1) left the GITHUB_TOKEN in .git/config for the rest of the job. The other 8 checkout steps in .github/workflows/ already set persist-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's git submodule update and the FetchContent downloads, both over public URLs. The one job with submodules: 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:

  • Every actions/checkout step in all workflow files parses with PyYAML and has with.persist-credentials: false (17 of 17).
  • git diff --check is 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.py and test_runtime_paths.py pass (Python 3.14.10).
  • python -I scripts/check_no_game_data.py on the three files: exit 0.

Not tested: the workflows themselves, since I have no way to run GitHub Actions here and actionlint is 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).

**@⁠TuroYT** on GitHub · 2026-11-24 09:30 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/595) `TuroYT:ci/persist-credentials-false` → `main` · +17 −0 · 3 files · 1 commits · merged 2026-11-25 21:26 UTC Claimed in the coordination issue as: CI-SECURITY-CREDENTIALS (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14), from NinsonD's finding in the same issue. `ci.yml` (5 steps), `runtime.yml` (3) and `xma2-decoder.yml` (1) left the `GITHUB_TOKEN` in `.git/config` for the rest of the job. The other 8 checkout steps in `.github/workflows/` already set `persist-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`'s `git submodule update` and the `FetchContent` downloads, both over public URLs. The one job with `submodules: 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: - Every `actions/checkout` step in all workflow files parses with PyYAML and has `with.persist-credentials: false` (17 of 17). - `git diff --check` is 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.py` and `test_runtime_paths.py` pass (Python 3.14.10). - `python -I scripts/check_no_game_data.py` on the three files: exit 0. Not tested: the workflows themselves, since I have no way to run GitHub Actions here and `actionlint` is 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).
ci.yml (5 steps), runtime.yml (3) and xma2-decoder.yml (1) left the
GITHUB_TOKEN in .git/config for the rest of the job. No step in those
jobs runs an authenticated git command, so the token was never needed
there. The other 8 checkout steps already set the flag.

CI-SECURITY-CREDENTIALS
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:10:42 +00:00
github manually merged commit 1c850c02bc into gh-pr/595/base 2026-11-26 09:10:44 +00:00
Author
Owner

@⁠MoonEyes on GitHub · 2026-11-24 13:37 UTC · original

Reviewed at 1c850c02b. Looks right to me; checked rather than read:

  • Parsed every workflow file at the PR head with PyYAML 6.0.3: 17 actions/checkout steps, all 17 with persist-credentials: false (the 7 in ci.yml included: change-scope, check, translator-tests, semantic-tests, macos-python, viewer-tests, stdlib-tests-linux).
  • In the jobs this touches (ci.yml, runtime.yml, xma2-decoder.yml) nothing pushes, fetches with auth, calls gh or reads GITHUB_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, and rpf9-explorer is a public URL anyway, so that job should be unaffected. The CI run on this PR is still the proof for that one.
  • #608 also edits xma2-decoder.yml (top-level concurrency), 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).

**@⁠MoonEyes** on GitHub · 2026-11-24 13:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/595#issuecomment-7133109461) Reviewed at 1c850c02b. Looks right to me; checked rather than read: - Parsed every workflow file at the PR head with PyYAML 6.0.3: 17 `actions/checkout` steps, all 17 with `persist-credentials: false` (the 7 in `ci.yml` included: change-scope, check, translator-tests, semantic-tests, macos-python, viewer-tests, stdlib-tests-linux). - In the jobs this touches (`ci.yml`, `runtime.yml`, `xma2-decoder.yml`) nothing pushes, fetches with auth, calls `gh` or reads `GITHUB_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, and `rpf9-explorer` is a public URL anyway, so that job should be unaffected. The CI run on this PR is still the proof for that one. - #608 also edits `xma2-decoder.yml` (top-level `concurrency`), 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).
Author
Owner

@⁠NinsonD on GitHub · 2026-11-24 20:19 UTC · original

Claimed in the coordination issue as: CI-SECURITY-CREDENTIALS (#14 (comment)), from NinsonD's finding in the same issue.

ci.yml (5 steps), runtime.yml (3) and xma2-decoder.yml (1) left the GITHUB_TOKEN in .git/config for the rest of the job. The other 8 checkout steps in .github/workflows/ already set persist-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's git submodule update and the FetchContent downloads, both over public URLs. The one job with submodules: 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:

Every actions/checkout step in all workflow files parses with PyYAML and has with.persist-credentials: false (17 of 17).
git diff --check is 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.py and test_runtime_paths.py pass (Python 3.14.10).
python -I scripts/check_no_game_data.py on the three files: exit 0.
Not tested: the workflows themselves, since I have no way to run GitHub Actions here and actionlint is 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).

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!

**@⁠NinsonD** on GitHub · 2026-11-24 20:19 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/595#issuecomment-7143362428) > Claimed in the coordination issue as: CI-SECURITY-CREDENTIALS (#14 (comment)), from NinsonD's finding in the same issue. > > ci.yml (5 steps), runtime.yml (3) and xma2-decoder.yml (1) left the GITHUB_TOKEN in .git/config for the rest of the job. The other 8 checkout steps in .github/workflows/ already set persist-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's git submodule update and the FetchContent downloads, both over public URLs. The one job with submodules: 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: > > Every actions/checkout step in all workflow files parses with PyYAML and has with.persist-credentials: false (17 of 17). > git diff --check is 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.py and test_runtime_paths.py pass (Python 3.14.10). > python -I scripts/check_no_game_data.py on the three files: exit 0. > Not tested: the workflows themselves, since I have no way to run GitHub Actions here and actionlint is 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). 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!
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 21:26 UTC · original

Merged, thanks! All 17 checkouts now set persist-credentials: false, and no job pushes or uses a token.

  • Checked on main f9642954f + 1c850c02b: the semantic suite passes (491 files, 6,312 tests, 0 files failed); the 15 docs and writer tests pass; check_no_game_data.py is clean on the 3 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 21:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/595#issuecomment-7175084164) Merged, thanks! All 17 checkouts now set `persist-credentials: false`, and no job pushes or uses a token. - **Checked on `main` `f9642954f` + `1c850c02b`:** the semantic suite passes (491 files, 6,312 tests, 0 files failed); the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 3 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.