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>
16 lines
821 B
Bash
Executable File
16 lines
821 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
pip install --quiet --require-hashes --only-binary :all: -r requirements.txt
|
|
# REFRESH_ONLY from a manual run: "page" or "details" runs that group of the
|
|
# store refresh, "anticheat" only the anti-cheat sweep; empty = everything.
|
|
# Each part commits on its own, so a failure in the sweep never costs the
|
|
# store refresh its push (and set -e still stops at a crash in either).
|
|
if [[ "${REFRESH_ONLY:-}" != "anticheat" ]]; then
|
|
python scripts/refresh_store_data.py ${REFRESH_ONLY:+--only "$REFRESH_ONLY"}
|
|
bash "$(dirname "$0")/commit_push.sh" "Refresh store data [$(date +'%Y-%m-%d')]"
|
|
fi
|
|
if [[ -z "${REFRESH_ONLY:-}" || "${REFRESH_ONLY:-}" == "anticheat" ]]; then
|
|
python scripts/refresh_anticheat.py
|
|
bash "$(dirname "$0")/commit_push.sh" "Refresh anti-cheat [$(date +'%Y-%m-%d')]"
|
|
fi
|