Skip to content

ci: patched PyPI publish action, checkouts without the job token, actions.lock - #294

Open
Totara-thib wants to merge 3 commits into
mixpanel:mainfrom
Totara-thib:ci/pypi-publish-advisory
Open

Totara-thib wants to merge 3 commits into
mixpanel:mainfrom
Totara-thib:ci/pypi-publish-advisory

Conversation

@Totara-thib

Copy link
Copy Markdown

Hi, some CI hardening contribution:

The publish job uploads to PyPI with pypa/gh-action-pypi-publish at v1.14.2, an action version with a published advisory: up to 1.14.2 it ships the now-revoked emSign root CA in the trust store Sigstore uses for Trusted Publishing (GHSA-5xjx-3w67-w9x9, critical).

Dependabot will not bring it yet: it raises no alert for an action pinned by commit, and its five open action bumps are the default limit.

Three commits:

  • The publish action moves to v1.14.3, the first patched release. Same inputs.
  • The nine checkouts stop keeping the job token. None pushes with it, four run a coding assistant beside it, and a hijacked step could dump it (tj-actions, CVE-2025-30066). conformance and codex-review then fetch anonymously.
  • actions.lock, GitHub's workflow dependency lockfile from gh actions-lock --no-narrow: your pins stay as written. It adds a check that each commit belongs to the action's repository. Open Dependabot bumps need a rebase after. Happy to drop it.

The release and assistant jobs do not run on this PR.

Found and fixed with Plumber (E 30/100 before, A 100/100 after), reviewed and submitted by me.

The publish job pins the action at dc37677, which is v1.14.2. The
comment next to it still said v1.14.0: the last bump moved the commit
and left the comment.

GHSA-5xjx-3w67-w9x9 (critical) covers every version up to 1.14.2. The
action bundled the emSign root CA through certifi, the trust store that
Sigstore uses for Trusted Publishing and the attestations. 1.14.3 is
the first patched release.

Between the two tags the action's pinned requirements and its
Dockerfile change, action.yml and its inputs do not. The comment now
has the plain form of the other pins.
actions/checkout keeps the job token on the runner until the end of
the job, in a file under $RUNNER_TEMP, so that later steps can run
authenticated git commands. No job here pushes with it, and four of
them hand the runner to a coding assistant right after the checkout.
One of those tokens can write to the repository.

What each job does without it:

- ci, docs, the release build and the Copilot setup steps have no git
  step after the checkout.
- conformance and codex-review fetch from origin again. That fetch is
  anonymous now, which a public repository allows.
- codex.yml posts its comment through github-script with github.token,
  which does not come from the checkout.
- The other two assistant workflows use an action that puts its own
  git credentials on the remote before the model runs.
.github/workflows/actions.lock is GitHub's workflow dependency
lockfile, written by gh actions-lock. It was generated with
--no-narrow, so no workflow file changes: every action stays pinned by
its commit, with the version in the comment.

The commit pins already fix what runs, including the five actions that
the pinned ones call, which are pinned by commit in turn. The lockfile
adds two checks that GitHub makes when a job starts: the repository
behind each name is still the one recorded here (owner and repository
ids), and each commit belongs to the recorded tag in the action's own
repository, not to a fork of it.

The publish action generates a local container action at run time. The
tool cannot follow it and locks the publish action itself.

Dependabot updates the matching entry in the same pull request as its
bump. The action bumps that are open today were prepared before the
file existed, so they need a rebase before they merge.

This commit stands alone and can be dropped without touching the other
two.
@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; no actionable issues were found.

Reviews (1) · Last reviewed commit: "ci: record the pinned actions in actions..." · Reviewed by Greptile

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