Skip to content

ci: do not persist GITHUB_TOKEN in test checkouts [SEC-2544] - #131

Open
oliverlaz wants to merge 4 commits into
masterfrom
oliverlazoroski/sec-2544-workflow-sweep
Open

oliverlaz wants to merge 4 commits into
masterfrom
oliverlazoroski/sec-2544-workflow-sweep

Conversation

@oliverlaz

Copy link
Copy Markdown
Member

Follow-up to SEC-2544 (CI-12). The audit of this repo's workflows found it already hardened: read-only top-level permissions, per-job grants, event data passed through env:, and a release-only guard that checks head repo, author and branch. One gap remained.

Change

  • run_tests.yml and run_integration.yml: actions/checkout now sets persist-credentials: false. Both lanes check out the repository and run its code without ever pushing. Leaving GITHUB_TOKEN in .git/config let that code, or a dependency it installs, reuse the token.

regen.yml keeps its credentials because it pushes, and SEC-2541 owns that file.

Verification

actionlint is clean apart from the known client-id false positive on create-github-app-token@v3. zizmor --offline --persona=auditor no longer reports artipacked for these files.

Left to other PRs: the steps.target.outputs.* interpolation in release.yml (#123, SEC-2536).

The unit and integration lanes check out the repository and then run its
code, but never push. Leaving the token in .git/config lets that code, or
anything it pulls in, reuse it.

SEC-2544
@oliverlaz
oliverlaz requested a review from mogita November 25, 2026 11:37
@oliverlaz
oliverlaz marked this pull request as ready for review November 25, 2026 12:39

This branch has not been deployed

No deployments
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