ci: allow the SubQuery indexer packages in Dependency Review

The indexer image now installs from a lockfile, so Dependency Review sees
the @subql packages it builds the indexer from. The mapping imports only
their types, which are erased on emit; the build job now checks that no
@subql import survives in the emitted mapping.
This commit is contained in:
Satoshi Qazi Muhammed committed 2026-10-12 19:03:00 +04:00
1 parent ee88cc6bd4
commit 602709e3bf
2 files changed
+22

No files matched your search

+10
View File
@@ -31,6 +31,16 @@ jobs:
- name: Build
run: ./node_modules/.bin/subql build pezkuwi.yaml
# Dependency Review allows the @subql packages because the mapping imports
# only their types; this is the check that keeps it true. A type-only
# import is erased on emit, a value import survives as a require.
- name: The mapping imports no @subql code
run: |
out=$(mktemp -d)
./node_modules/.bin/tsc -p tsconfig.json --outDir "$out" --declaration false
! grep -rn 'require("@subql/' "$out" || {
echo "the mapping imports @subql code; import its types with 'import type' or drop it"; exit 1; }
# The noter and payout bots ship as their own images (docker-compose.prod.yml)
# and nothing else here builds or runs them. Build each image as production
# does, then run inside it: the crypto stack must be the locked one and sign
+12
View File
@@ -61,10 +61,22 @@ jobs:
# with --omit=optional and never contain it (checked in ci.yml, bots).
# TruffleHog (AGPL-3.0) is the secret scanner this workflow runs; it
# executes in CI and is never shipped, served or distributed.
# The @subql packages make up the SubQuery indexer that runs the
# mapping; the mapping imports only their types, so the bundle this
# repo builds carries none of their code (checked in ci.yml, build).
allow-dependencies-licenses: >-
pkg:npm/@bizinikiwi/connect,
pkg:npm/@bizinikiwi/connect-extension-protocol,
pkg:npm/@bizinikiwi/connect-known-chains,
pkg:npm/@subql/cli,
pkg:npm/@subql/common,
pkg:npm/@subql/common-substrate,
pkg:npm/@subql/node,
pkg:npm/@subql/node-core,
pkg:npm/@subql/testing,
pkg:npm/@subql/types,
pkg:npm/@subql/types-core,
pkg:npm/@subql/utils,
pkg:githubactions/trufflesecurity/trufflehog
secret-scan: