Web Development

The Push Landed in the Same Second as the Approval: Bind CI Approval to a Commit, Not a Moment

Two 2026 advisories describe the same gate: a bot compares one-second timestamps to decide whether a fork branch moved after a maintainer approved it, and an equal second passes. Field notes on what we bind approval to now.

KAKabir AnandLead Developer
9 min read
Close-up photograph of two identical brass stamp dies pressing onto the same spot of a sheet of paper at the same instant, shallow depth of field, cold daylight

A maintainer reads a pull request from a fork, agrees with it, and leaves the comment that lets the privileged bot run. In the same second — measured in whole seconds, because that is all a commit timestamp has — a new commit lands on the fork branch. The bot does exactly what it was written to do: it asks whether the branch moved since the approval, compares two times, finds that the newer one is not strictly newer, and proceeds. Then it checks out the branch, which is no longer the thing anybody read.

That is CVE-2026-84973, published on 3 September 2026 against the jupyterlab/maintainer-tools update-snapshots-checkout action, where the privileged workflow went on to execute files from the checked-out tree. Thirteen days later GitHub Security Lab published GHSL-2026-226 describing the same gate in a different project's test-release workflow, where winning the same race got an external contributor code execution with a write-scoped token and a path to publishing attacker-controlled packages to TestPyPI and npm.

Both gates were written by people who had already thought about this attack. That is the part worth sitting with. Neither workflow forgot to check. Both checked the wrong kind of thing.

A Second Is Not a Tiebreaker

Git stores commit times as whole seconds since the epoch. There is no sub-second field to fall back on, and no amount of care in the comparison invents one.

So a gate that asks _did anything land after the approval?_at one-second resolution cannot separate “nothing landed” from “something landed inside the same second.” A strict comparison rejects only strictly later pushes, and an equal timestamp sails through. Flipping it to a non-strict comparison does not rescue the design either: it starts rejecting honest contributors whose last push happened to share a second with the review, and it is still a clock being asked to answer a question about identity. The class does not close, it only changes which way the coin lands.

The question the bot actually needed to ask has nothing to do with time. It is: is the tree I am about to run the tree that was reviewed? That question has an exact answer, and it is a commit digest.

“A clock can tell you that two things happened. It cannot tell you which of them you read.”

The Same Mistake, Two Ecosystems Apart

Read the two advisories side by side and the interesting difference is not the bug. It is the blast radius, which is set entirely by what the privileged job was allowed to touch.

  • The snapshot bot— a convenience feature. A maintainer comments, a workflow regenerates Playwright snapshots and pushes them back. Winning the race here means arbitrary code running in a job that holds a write-scoped repository token. The fix landed in v1.0.0 of the action, which means every reference pinned below that version is still the old gate.
  • The release bot— the same comparison, but the job on the other side of it publishes. Winning the race put attacker-chosen code into a job whose purpose is to ship packages to a registry, which is a materially different outcome from editing a branch.
  • What downstream saw— in the publishing case, nothing anomalous. A job that can mint an OIDC token publishes under the project’s own identity, so the artifact is signed and attested correctly. Provenance faithfully records _which workflow built this_. It has never claimed to record whether the input to that workflow was reviewed.

This is why we stopped treating a signed artifact as evidence of review. The signature is a statement about the builder. If approval was bound to a moving branch, the builder was honest and the input was not, and every attestation in the chain is accurate.

Flat vector illustration of two horizontal tracks of evenly spaced tick marks, with a hollow circle and a filled circle sitting on the same single tick
Two events, one tick. At this resolution the gate cannot tell you which circle it read.

The Trigger Changes Under You on 2 December

From 2 December 2026, GitHub Actions blocks the pull_request_target event by default in public repositories unless an Actions event policy explicitly allows it, ideally scoped to a named workflow file. Two brownouts ran first, on 9 and 16 November, 16:00 to 18:00 UTC, and during those windows affected workflows failed with an annotation instead of running. Private and internal repositories are out of scope, as is GitHub Enterprise Server.

That is a good change and it is not this change. The policy retires one trigger — the one that runs base-branch workflow definitions with base-repository permissions against fork code. It says nothing about the pattern most teams migrate to when it bites them, which is a bot that watches for an approving comment and then does privileged work on the contributor's branch.

Both advisories above are that pattern. So the December deadline will push a round of migrations straight into the failure mode, and the migration will look like a security improvement in the pull request that introduces it.

What the Bot's Permissions Quietly Hand Over

There is one guardrail in Actions that teams lean on without naming it: a push made with GITHUB_TOKEN cannot create or update files under .github/workflows/ on contents write alone. It is the reason a compromised test job is usually a bad day rather than a permanent foothold.

An app-backed bot that holds both contents write and workflows write, and that is willing to move fork code into the base repository, removes that guardrail on the attacker's behalf. Researchers have published this as bot-delegated TOCTOU, and the framing is the useful part: the bot is not the vulnerability, the bot is the delegation. It carries a maintainer's authority to code the maintainer did not read, into a directory the base threat model assumed was unreachable.

Someone who types the approving comment believes they are authorising a test run. The ceiling on what they are actually authorising is whatever the bot can do, and nobody reviews that ceiling on the day they approve.

“Every automation that acts on a human decision inherits that human's authority. Almost none of them inherit the thing the human actually looked at.”

Hand-drawn ink and wash sketch of a padlock clamped around one solid link of a chain while the neighbouring links are drawn as faint dashed outlines
Clamp the approval to the link you inspected. Dashed links are the ones that can be swapped after you look away.

What We Changed in Our Own Release Jobs

We ship client repositories with bots in them, so we went through ours after the September advisories rather than waiting for the December deadline. Five rules came out of it, none of them large edits.

The approval contract we now require

  • Approval records a full commit digest. The reviewer's decision is stored against the forty-character SHA they were shown, and the gate's only input is that string. A different SHA is not a stale approval, it is no approval.
  • Privileged jobs check out by SHA, never by ref. A branch name resolves at fetch time, which is after the decision; a digest resolves to one tree or fails. This single substitution is what both advisories were missing.
  • Untrusted code and credentials never share a job. The job that runs fork code gets no secrets and a read-only token. Anything crossing to the privileged job crosses as a named artifact, checked by digest on arrival.
  • The privileged job rebuilds. We do not promote a binary produced by a job that executed contributor code, however clean the logs look, because the signature on it will be valid either way.
  • Workflow files are ring-fenced. Changes under .github/ need an admin review, and no bot in our repositories holds workflows write. The guardrail only holds if nothing is standing beside it offering to help.

Most of that work is reading, not editing. The shape to look for is a privileged job fetching by branch name, and it gets there by an entirely reasonable route: somebody needed the bot to see the contributor's latest commit, and a branch name is the obvious way to say that. It is obvious, it is what every tutorial shows, and it is the one line the digest has to replace.

If You Only Change One Thing

Grep your workflows and your bot code for a comparison between two timestamps whose result decides whether privileged work proceeds. Dates, commit times, comment times, anything. Every hit is the same bug, whether or not an attacker has found it yet, because time ordering was never the property you needed.

Then make the smallest possible edit: record the digest the human saw, and pass that digest to the checkout. Approval names an object, not a moment. Everything else here is a consequence of getting that one sentence the wrong way round.

Keep Reading

More from the blog

Track Record

The Engineering Partner You Can Build On

Reliable software takes an experienced team that owns delivery end to end. Here’s the track record behind ours.

Book a Free Consultation
01

11+

Years Building Custom Software

02

320+

Projects Delivered Across Web, Mobile & AI

03

85%

Repeat Client Rate

04

12+

Countries Served Worldwide

Trusted by startups and enterprises worldwide

Work With Us

Let’s create
with purpose

Share your goals, timeline, and challenges — we’ll respond with clarity and next steps.

Ambitious ideas deserve thoughtful execution. Start the conversation and let’s define what success looks like.

Team

Acetrum

Est. 2015

4.9/5

Trusted by
top brands

Services interested in:

By submitting, I confirm I’ve read and agree with Privacy and Cookie Policies.

Newsletter

Signals worth
paying attention

No recycled headlines — just the patterns we’re seeing across real client work, distilled into one read a month.

A curated digest of practical thinking and real-world brand perspectives monthly.

No spam. Unsubscribe anytime.