Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
396f5e6
test(ci): read the image of a RunsOn runner label
auxesis Oct 28, 2026
863f8d1
ci(runners): run the heavy 16 vCPU jobs on RunsOn
auxesis Oct 28, 2026
05cd73f
ci(runners): run the four integration suites on RunsOn
auxesis Oct 28, 2026
19e394e
ci(runners): log in to Docker Hub before RunsOn jobs pull images
auxesis Oct 29, 2026
4818bb0
ci(runners): keep the service login working without the secrets
auxesis Oct 29, 2026
b770e53
ci(runners): build the gnu FFI binaries on RunsOn
auxesis Oct 29, 2026
3ebcf55
ci(runners): wait for the apt lock on a fresh RunsOn machine
auxesis Oct 29, 2026
baa4471
ci(runners): move every Blacksmith job to a RunsOn machine of the sam…
auxesis Nov 19, 2026
a4b9ead
ci(runners): log in to Docker Hub before every RunsOn job pulls an image
auxesis Nov 19, 2026
07de8dd
test(ci): require every RunsOn job to wait for the apt lock
auxesis Nov 19, 2026
62f7342
style(ci): format the RunsOn guard tests with Biome
auxesis Nov 19, 2026
966b32c
ci(runners): log in before the README walkthrough pulls its database
auxesis Nov 19, 2026
9b86851
ci(runners): retry apt-get update until boot-time apt lets go
auxesis Nov 24, 2026
017d1fd
test(ci): share one copy of the mise task readers
auxesis Nov 26, 2026
0100f10
test(ci): end a mise task only at a table header
auxesis Nov 26, 2026
a3b15bb
test(ci): share one way to expand a local composite action
auxesis Nov 26, 2026
e7a3b5e
test(ci): find more ways a step can pull an image
auxesis Nov 26, 2026
43cfff2
test(ci): read apt commands as the shell does
auxesis Nov 26, 2026
1fd007a
test(ci): read only tracked mise files in the login guard
auxesis Nov 26, 2026
067cc2c
ci(runners): say a fork pull request only where one can run
auxesis Nov 26, 2026
d4cb035
ci(runners): stop calling Blacksmith the current runner in comments
auxesis Nov 26, 2026
a2c70da
ci(runners): log out of Docker Hub after the last pull
auxesis Nov 26, 2026
30978e0
docs(skills): name the two Docker Hub secrets the FFI pre-flight passes
auxesis Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/supply-chain-skill-preflight-secrets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"stash": patch
---

The `stash-supply-chain-security` skill now describes the secrets of the FFI release pre-flight workflow correctly. It said that the workflow passes no secrets to its build. The workflow now passes exactly two, by name: `DOCKER_HUB_USERNAME` and `DOCKER_HUB_PASSWORD`. The musl build uses them to log in to Docker Hub before it pulls Alpine. They cannot authenticate an npm publish, so the workflow still cannot publish.
23 changes: 7 additions & 16 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
# actionlint validates every `runs-on:` against the list of GitHub-hosted runner
# labels it ships with. Blacksmith runners are self-hosted from its perspective,
# so without this file each of the fourteen jobs using one is reported as an
# unknown label — and the release lint gate (.github/workflows/lint-release.yml)
# would be red on the day it lands, for reasons that have nothing to do with the
# release machinery it exists to check.
# actionlint checks every `runs-on:` label against the GitHub-hosted labels it
# knows, and against the self-hosted labels listed here.
#
# Nothing complained before because actionlint has never run in this repository;
# lint-release.yml is what introduces it.
# The list is empty. Every self-hosted job runs on RunsOn, and each RunsOn
# label starts with `runs-on=${{ github.run_id }}`. actionlint does not check
# a label that contains an expression. So a Blacksmith label is now unknown,
# and actionlint reports it.
self-hosted-runner:
labels:
- blacksmith-4vcpu-ubuntu-2404
# Every job in the imported EQL suite. Sixteen of them, and the size is
# deliberate upstream: the sharded SQLx matrix compiles the full Rust
# dependency tree, so the runner is chosen for the compile rather than for
# the tests. Kept as its own label rather than renamed to the 4vcpu one —
# rehoming those jobs is a cost decision, not a lint fix.
- blacksmith-16vcpu-ubuntu-2204
labels: []
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ updates:
versioning-strategy: lockfile-only
# Monthly, where npm and actions are weekly. The deviation is about
# validation cost, not risk appetite: a Cargo.lock bump is checked by
# tests-rust.yml — one Blacksmith job, 45-minute timeout, cargo test +
# tests-rust.yml — one RunsOn job, 45-minute timeout, cargo test +
# clippy on host AND wasm32 — and the release additionally cross-builds
# six platform binaries. Security fixes are not delayed by this: Dependabot
# security updates are driven by alerts, not by `schedule`.
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/_build-eql-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ permissions:
jobs:
publish-docs:
name: Build and publish documentation
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=16/image=ubuntu22-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 20

steps:
Expand All @@ -53,10 +53,18 @@ jobs:
cache: false # publish path; see _build-eql-sql.yml
working_directory: packages/eql

# A fresh RunsOn machine can still be running apt from boot, and apt-get
# fails at once on a held lock unless told to wait for it.
# DPkg::Lock::Timeout makes install wait. It does not make update wait
# for the package-list lock, so update retries for up to 5 minutes.
- name: Install Doxygen
run: |
sudo apt-get update
sudo apt-get install -y doxygen
for attempt in $(seq 1 20); do
sudo apt-get -o DPkg::Lock::Timeout=300 update && break
if [ "$attempt" -eq 20 ]; then exit 1; fi
sleep 15
done
sudo apt-get -o DPkg::Lock::Timeout=300 install -y doxygen

- name: Generate documentation
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_build-eql-sql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ permissions:
jobs:
build:
name: Build EQL
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=16/image=ubuntu22-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 20

steps:
Expand Down
49 changes: 46 additions & 3 deletions .github/workflows/_build-ffi-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ on:
description: Commit to build from
required: true
type: string
# For the musl leg's Docker Hub login. Optional, because the login does
# nothing without them and the build still runs.
secrets:
DOCKER_HUB_USERNAME:
required: false
DOCKER_HUB_PASSWORD:
required: false

permissions:
contents: read
Expand Down Expand Up @@ -114,12 +121,21 @@ jobs:
# a native x86_64 build — so the other two legs were paying an
# `apt-get update` (full package indexes) plus a ~200MB toolchain they do
# not link against.
#
# A fresh RunsOn machine can still be running apt from boot, and apt-get
# fails at once on a held lock unless told to wait for it.
# DPkg::Lock::Timeout makes install wait. It does not make update wait
# for the package-list lock, so update retries for up to 5 minutes.
- name: Install cross-compile toolchain (linux-arm64-gnu)
if: ${{ matrix.cfg.platform == 'linux-arm64-gnu' }}
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y gcc-13-aarch64-linux-gnu
for attempt in $(seq 1 20); do
sudo apt-get -o DPkg::Lock::Timeout=300 update && break
if [ "$attempt" -eq 20 ]; then exit 1; fi
sleep 15
done
sudo apt-get -o DPkg::Lock::Timeout=300 install -y gcc-13-aarch64-linux-gnu
sudo ln -sf /usr/bin/aarch64-linux-gnu-gcc-13 /usr/bin/aarch64-linux-gnu-gcc

# Rust comes from the runner image; only the TARGET has to be added. This
Expand Down Expand Up @@ -216,6 +232,26 @@ jobs:
pnpm run "$BUILD_SCRIPT"
fi

# Docker Hub refuses pulls without a login after too many from one
# address, and RunsOn machines reach that limit. With either secret empty,
# this step does nothing and pulls stay anonymous.
# scripts/__tests__/workflow-docker-hub-login.test.mjs requires it. Only
# the RunsOn legs log in. The macOS leg has no Docker,
# so `docker login` would fail there once the secrets exist.
- name: Log in to Docker Hub
if: ${{ startsWith(matrix.cfg.os, 'runs-on=') }}
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: |
set -euo pipefail
if [ -z "$DOCKER_HUB_USERNAME" ] || [ -z "$DOCKER_HUB_PASSWORD" ]; then
echo "No Docker Hub credentials, so image pulls stay anonymous."
exit 0
fi
printf '%s' "$DOCKER_HUB_PASSWORD" |
docker login --username "$DOCKER_HUB_USERNAME" --password-stdin

# The musl binary is built inside Alpine Linux, a musl system, so the
# compiler and its runtime libraries are musl's own. The toolchain this
# leg used to download from musl.cc timed out from GitHub's runners on
Expand Down Expand Up @@ -266,6 +302,13 @@ jobs:
node -e "require(process.argv[1])" "$PWD/platforms/$PLATFORM/index.node"
'

# The login stored the Docker Hub password in the Docker config file,
# where any later step could read it. No later step pulls an image.
# scripts/__tests__/workflow-docker-hub-login.test.mjs checks the order.
- name: Log out of Docker Hub
if: ${{ always() && startsWith(matrix.cfg.os, 'runs-on=') }}
run: docker logout

- name: Place the binding in its platform package
if: ${{ matrix.cfg.platform != 'linux-x64-musl' }}
working-directory: languages/typescript/packages/protect-ffi
Expand Down Expand Up @@ -358,7 +401,7 @@ jobs:
# this job collects the six platform artifacts and uploads the complete set
# as one artifact, so a caller downloads `ffi-tarballs` and has everything.
needs: [binaries]
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=4/image=ubuntu24-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test-auth-refresh-soak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
soak:
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=16/image=ubuntu22-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 30
env:
MISE_ENV: test
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/bench-eql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ defaults:
jobs:
bench:
name: "Bench EQL (Postgres 17)"
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=16/image=ubuntu22-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 60

env:
Expand Down Expand Up @@ -146,10 +146,34 @@ jobs:
# slow. Asserted by scripts/__tests__/eql-suite-ci.test.mjs.
save-if: false

# Docker Hub refuses pulls without a login after too many from one
# address, and RunsOn machines reach that limit. With either secret empty,
# this step does nothing and pulls stay anonymous.
# scripts/__tests__/workflow-docker-hub-login.test.mjs requires it.
- name: Log in to Docker Hub
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: |
set -euo pipefail
if [ -z "$DOCKER_HUB_USERNAME" ] || [ -z "$DOCKER_HUB_PASSWORD" ]; then
echo "No Docker Hub credentials, so image pulls stay anonymous."
exit 0
fi
printf '%s' "$DOCKER_HUB_PASSWORD" |
docker login --username "$DOCKER_HUB_USERNAME" --password-stdin

- name: Setup database
run: |
mise run postgres:up "postgres-${POSTGRES_VERSION}" --extra-args "--detach --wait"

# The login stored the Docker Hub password in the Docker config file,
# where any later step could read it. No later step pulls an image.
# scripts/__tests__/workflow-docker-hub-login.test.mjs checks the order.
- name: Log out of Docker Hub
if: always()
run: docker logout

- name: Run bench tests
# CS_* scoped to THIS step only (least privilege): test:bench -> test:sqlx:prep
# -> fixture:generate:all encrypts via cipherstash-client and needs BOTH a
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:
jobs:
analyze:
name: Analyze
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=4/image=ubuntu24-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 10

strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/crap-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ env:
jobs:
crap-stack-auth:
name: CRAP (stack-auth)
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=16/image=ubuntu22-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 45
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
Expand All @@ -83,7 +83,7 @@ jobs:

crap-stack-encrypt:
name: CRAP (stack-encrypt)
runs-on: blacksmith-16vcpu-ubuntu-2204
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=16/image=ubuntu22-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 45
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/ffi-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ name: FFI release pre-flight
# It never publishes, and cannot — both authentication paths are absent, which
# takes more than the one line it looks like. No `id-token` permission closes
# OIDC; a plain `NPM_TOKEN` would authenticate a publish regardless, so there is
# also no secret passed (no `secrets: inherit` on the call below), no
# `registry-url` on setup-node (that is what writes an `_authToken` line into
# .npmrc), and no NPM_TOKEN or NODE_AUTH_TOKEN anywhere. Adding any one of them
# turns this dry run into a publisher.
# also no `secrets: inherit` on the call below, no `registry-url` on setup-node
# (that is what writes an `_authToken` line into .npmrc), and no NPM_TOKEN or
# NODE_AUTH_TOKEN anywhere. Adding any one of them turns this dry run into a
# publisher.
#
# The call below passes exactly two secrets, by name: DOCKER_HUB_USERNAME and
# DOCKER_HUB_PASSWORD. The musl build logs in to Docker Hub with them before it
# pulls Alpine. They cannot authenticate an npm publish.

on:
workflow_dispatch:
Expand All @@ -35,6 +39,9 @@ jobs:
uses: ./.github/workflows/_build-ffi-artifacts.yml
with:
ref: ${{ inputs.ref }}
secrets:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

smoke:
name: Install and smoke-test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fta-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ permissions:
jobs:
fta:
name: Analyze v3 complexity
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=4/image=ubuntu24-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 10

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
# Not on the nightly schedule, which is the campaign's. A manual dispatch
# runs both jobs.
if: github.event_name != 'schedule'
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=4/image=ubuntu24-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 30
strategy:
fail-fast: false
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
fuzz-campaign:
name: fuzz campaign (${{ matrix.slug }})
if: github.event_name != 'pull_request'
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=4/image=ubuntu24-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 30
strategy:
fail-fast: false
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/integration-drizzle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ on:
jobs:
integration:
name: Drizzle v3 integration (db=${{ matrix.db }})
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=4/image=ubuntu24-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 35
# No concurrency group: `integration-db` gives each job its own compose
# project and ephemeral host ports, so live-DB jobs no longer contend and do
Expand Down Expand Up @@ -300,6 +300,24 @@ jobs:
with:
wasm: 'true'

# Docker Hub refuses pulls without a login after too many from one
# address, and RunsOn machines reach that limit. With either secret empty,
# as on a fork's pull request, this step does nothing and pulls stay
# anonymous. scripts/__tests__/workflow-docker-hub-login.test.mjs
# requires it.
- name: Log in to Docker Hub
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: |
set -euo pipefail
if [ -z "$DOCKER_HUB_USERNAME" ] || [ -z "$DOCKER_HUB_PASSWORD" ]; then
echo "No Docker Hub credentials, so image pulls stay anonymous."
exit 0
fi
printf '%s' "$DOCKER_HUB_PASSWORD" |
docker login --username "$DOCKER_HUB_USERNAME" --password-stdin
Comment thread
auxesis marked this conversation as resolved.
Resolved

# No pre-`up` cleanup step any more: the project name is unique per job, so
# a container leaked by a hard-killed prior run cannot hold this job's
# name or its (ephemeral) port. Blanket-pruning would now be actively
Expand All @@ -311,6 +329,13 @@ jobs:
with:
db: ${{ matrix.db }}

# The login stored the Docker Hub password in the Docker config file,
# where any later step could read it. No later step pulls an image.
# scripts/__tests__/workflow-docker-hub-login.test.mjs checks the order.
- name: Log out of Docker Hub
if: always()
run: docker logout

# `globalSetup` installs EQL v3 by shelling out to the real
# `stash eql install --eql-version 3`, so an installer regression fails
# here rather than hiding behind a test-only SQL apply.
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/integration-prisma-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ on:
jobs:
integration:
name: prisma-next v3 integration (db=${{ matrix.db }})
runs-on: blacksmith-4vcpu-ubuntu-2404
runs-on: runs-on=${{ github.run_id }}/family=c8a+m8a/cpu=4/image=ubuntu24-full-x64/volume=80gb/extras=s3-cache
timeout-minutes: 15
# No concurrency group: `integration-db` gives each job its own compose
# project and ephemeral host ports, so live-DB jobs no longer contend and do
Expand Down Expand Up @@ -172,6 +172,24 @@ jobs:
- name: Build the @cipherstash/auth binding
uses: ./.github/actions/build-auth-binding

# Docker Hub refuses pulls without a login after too many from one
# address, and RunsOn machines reach that limit. With either secret empty,
# as on a fork's pull request, this step does nothing and pulls stay
# anonymous. scripts/__tests__/workflow-docker-hub-login.test.mjs
# requires it.
- name: Log in to Docker Hub
env:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
run: |
set -euo pipefail
if [ -z "$DOCKER_HUB_USERNAME" ] || [ -z "$DOCKER_HUB_PASSWORD" ]; then
echo "No Docker Hub credentials, so image pulls stay anonymous."
exit 0
fi
printf '%s' "$DOCKER_HUB_PASSWORD" |
docker login --username "$DOCKER_HUB_USERNAME" --password-stdin

# No pre-`up` cleanup step any more: the project name is unique per job, so
# a container leaked by a hard-killed prior run cannot hold this job's
# name or its (ephemeral) port. Blanket-pruning would now be actively
Expand All @@ -183,6 +201,13 @@ jobs:
with:
db: ${{ matrix.db }}

# The login stored the Docker Hub password in the Docker config file,
# where any later step could read it. No later step pulls an image.
# scripts/__tests__/workflow-docker-hub-login.test.mjs checks the order.
- name: Log out of Docker Hub
if: always()
run: docker logout

# `globalSetup` installs EQL v3 by shelling out to the real
# `stash eql install --eql-version 3`, so an installer regression fails
# here rather than hiding behind a test-only SQL apply.
Expand Down
Loading
Loading