mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-10-20 18:56:24 +00:00
Lock the indexer image and close the advisories in the build tooling
The indexer image installed @subql/node and the @polkadot -> @pezkuwi aliases with an unlocked npm install, and the build cache kept the layer from the day it was first built: the indexers ran @pezkuwi/wasm-crypto 7.5.17/7.5.18, the build whose ed25519 and secp256k1 are stubs, plus vm2 3.9.19 (the mapping sandbox, 54 advisories). No lockfile meant Dependabot never saw that tree. - docker/indexer holds the image's package.json and package-lock.json: @subql/node 6.4.6 as today, @pezkuwi 16.5.39 / 14.0.26 / 7.5.21, overrides for vm2 3.12.2, uuid 11 and package-json 7 (got 11). The Dockerfile runs npm ci on Node 24 (Node 20 is out of support). - The pruned-state patch stops the build when a pattern matches nothing, instead of reporting success with the fallback missing. - CI builds the indexer image and runs the crypto smoke test inside it through the @polkadot aliases, the way subql-node loads them. - The root yarn.lock, which the host installs as root on every deploy to run subql codegen/build, moves the advisory ranges forward with targeted resolutions and @pezkuwi/braces. Left: elliptic (low, via ethers 5 in @subql/cli) and sprintf-js (moderate, via jest's argparse 1); neither has a fixed release.
This commit is contained in:
1 parent
5a92becba0
commit
c4f2bd943b
8 files changed
+5557
-305
No files matched your search
@@ -79,6 +79,26 @@ jobs:
|
||||
[ "$code" -ne 0 ] && [ "$code" -ne 124 ] || { echo "expected the bot to exit with an error, got $code"; exit 1; }
|
||||
grep -qF "$EXPECT" <<<"$out" || { echo "expected: $EXPECT"; exit 1; }
|
||||
|
||||
# The indexers run docker/Dockerfile.node (docker-compose.prod.yml). Build it
|
||||
# as production does: the patch step fails the build if a pattern no longer
|
||||
# matches. Then the aliased crypto stack must be the locked one and sign with
|
||||
# every key type, and subql-node must load.
|
||||
indexer:
|
||||
name: Indexer image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
- name: Build the image
|
||||
run: docker build -f docker/Dockerfile.node -t indexer .
|
||||
|
||||
- name: Crypto stack
|
||||
run: docker run --rm --entrypoint node -v "$PWD/scripts/bot-smoke.mjs:/app/bot-smoke.mjs:ro" indexer /app/bot-smoke.mjs indexer
|
||||
|
||||
- name: subql-node loads
|
||||
run: docker run --rm indexer --help >/dev/null
|
||||
|
||||
# The scripts the deploy key is pinned to are the whole of what CI can do on
|
||||
# the host, so they are checked with every change.
|
||||
host-scripts:
|
||||
|
||||
Reference in new issue
Block a user