SonarCloud's GitHub Actions and shell findings, all supply-chain hardening
for jobs that hold a write token (and, in the release workflows, the
signing keys):
- The six third-party actions in release-desktop.yml and release-android.yml
are pinned to the commit their major tag points at today, with the version
in a comment for Dependabot. dtolnay/rust-toolchain is pinned to a master
commit and given `toolchain: stable`: its `stable` branch is regenerated
on top of master, so a commit of it can vanish.
- Every `npm ci` is `npm ci --ignore-scripts`. Only fsevents, workerd and
wrangler's esbuild have install scripts; the last two find their binary in
their optional platform package without them, and fsevents is only file
watching. `npx` is gone from the workflows (`npm run cf:check`,
`npm test -- <file>`).
- requirements.txt pins every runtime package, transitive ones included
(certifi, charset-normalizer, idna), with the sha256 of every file on
PyPI; every install is `--require-hashes --only-binary :all:`. The new
requirements-test.txt holds pytest the same way. python-tests.yml runs the
data jobs' exact install line first, so a Dependabot bump is proven before
a data job meets it.
- `[[ ]]` instead of `[ ]` in the bash wrappers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
index.json was the client's only freshness signal and it was stamped on every
save. Two failures followed from that:
- A run that changed nothing still produced a new last_updated, so every
visitor re-downloaded all ~6 MB of shards (the 2026-09-16 "Dead link check"
commit touched only index.json).
- Nothing tied an index to the shard bytes it describes. index.json is edge-
cached for 30 s and the shards for 300 s, on top of raw.githubusercontent's
own CDN, so a client could receive the NEW index with an OLD shard and store
that pair in IndexedDB under the new stamp, where it stayed until the next
change.
_save_index() now records the sha256 of each shard's exact bytes and keeps the
previous last_updated when files, counts and hashes are unchanged - leaving
index.json byte-identical, so such a run makes no commit. save_jsonl writes LF
explicitly: on Windows, text mode wrote CRLF, which is not the blob Git stores
or raw.githubusercontent serves, and the hash would have described bytes no
client receives. An index without hashes bumps exactly once.
The pipeline had no tests. scripts/tests/test_index_hash.py pins all of this,
python-tests.yml runs it, and notify-ci-failure now also watches Web CI,
Python Tests, Daily Snapshot and Top Offline, which it silently did not.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
isChunkLoadError only matched the three "failed to fetch dynamically imported
module" style messages. Those cover a 404 on a stale chunk, but not what a
host with an SPA fallback returns: a request for a deleted hashed chunk is
answered with index.html at HTTP 200 and Content-Type: text/html, so the
browser rejects it on MIME type instead. The message looks nothing like a
fetch failure, so the reload-once recovery would silently stop working the
moment the site moves behind Cloudflare's not_found_handling. Added the
"failed to load module script" / "expected a javascript module script"
patterns and lifted the regex to a named constant.
Python installs now go through requirements.txt at all 11 sites — nine
bash/*.sh scripts and the two inline workflow steps — instead of a bare
`pip install requests`. The bare install silently ignored the urllib3 pin,
so CI was resolving a dependency the requirements file was trying to
constrain. mark-dead-games.yml already did this correctly.
requirements.txt and requirements-dev.txt move from `>=x,<y` ranges to exact
`==` pins: the pipeline should install identical versions on every run, and
Dependabot does not raise PRs for range-specified dependencies, so the new
pip ecosystem entry in dependabot.yml would otherwise have had nothing to do.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>