ci / rust-arm64 (pull_request) Failing after 5s
ci / web (pull_request) Successful in 1m9s
ci / docs-site (pull_request) Failing after 1m19s
ci / bun-nix (pull_request) Successful in 25s
ci / rust (pull_request) Successful in 6m47s
nix / flake (pull_request) Successful in 13m37s
The audit workflow's blocking `bun audit` leg went red on web with five
findings; sdk and plugin-kit stayed clean. Three had published fixes and are
bumped through the existing overrides block:
* dompurify 3.4.12 → 3.4.13 GHSA-55q2-fjhq-7xh7 (IN_PLACE hook removal
leaves a detached subtree executable). The override was already pinned at
^3.4.12, which the new advisory range swallowed.
* js-yaml 4.3.0 → 4.3.1 GHSA-5p4m-2wfm-xmqj (quadratic CPU in !!omap).
* nanoid 3.3.16 → 3.3.18 GHSA-2v37-7h3g-55p8 (custom generators loop
forever at size zero). New override — it arrives under postcss, which was
already pinned, but the pin does not reach postcss's own dependency.
The remaining two are the image-size infinite-loop DoS pair
(GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq), and they are ignored in the
workflow rather than fixed, because they are both unfixable and unreachable:
the vulnerable range is `<= 2.0.2` and 2.0.2 is the latest published version,
so no override can clear them; and image-size rides in under
@unom/ui > @payloadcms/richtext-lexical > ... > payload, where
@payloadcms/richtext-lexical is a peer that only @unom/ui's ./richtext export
needs. The console imports section, toast, button, card, dialog, form/*,
material and tabs — never ./richtext — so payload is auto-installed peer weight
that no bundle and no request path touches. The ignores are scoped to the web
matrix leg so sdk and plugin-kit stay strictly fail-on-any, and the reasoning
is recorded at the step so they can be dropped once image-size ships a fix or
@unom/ui marks that peer optional.
bun.nix is regenerated by the bun2nix postinstall; scripts/ci/check-bun-nix.sh
reports both bun packages in sync. web build, typecheck and server tests pass.
180 lines
8.3 KiB
YAML
180 lines
8.3 KiB
YAML
# Supply-chain advisory scan for EVERY dependency tree the project ships or publishes, plus the
|
||
# license-allowlist gate (CRA Annex I Part II: know your components; catch a bad dep the moment
|
||
# it lands).
|
||
# * cargo-audit → the (network-facing, crypto-heavy) Rust tree, against the RustSec advisory DB.
|
||
# * bun audit → each Bun-managed tree that ships or publishes: web (the mgmt console BFF —
|
||
# login gate, session sealing, mgmt bearer token), sdk (@punktfunk/host),
|
||
# plugin-kit (@punktfunk/plugin-kit).
|
||
# * pnpm audit → clients/decky (the Steam Deck plugin).
|
||
# * docs-site → scanned NON-blocking (continue-on-error): known transitive advisories ride in
|
||
# via the CMS/UI chain (@unom/ui → payload → dompurify/monaco) and the nitropack
|
||
# build chain (node-tar, brace-expansion); clearing them needs coordinated bumps
|
||
# verified against the LIVE site (the docs don't build standalone) — tracked in
|
||
# punktfunk-planning design/cra-readiness.md. Flip to blocking once clean.
|
||
# * cargo-about → license-allowlist gate over BOTH Rust workspaces (about.toml `accepted`);
|
||
# fails if any crate carries a license outside the allowlist — the regression
|
||
# guard about.toml always promised. (The Android Gradle tree has no lockfile, so
|
||
# nothing scans it — see the CRA roadmap.)
|
||
# Triggers: weekly (catch newly-disclosed CVEs in pinned deps), on every lockfile/allowlist
|
||
# change, and on demand.
|
||
# To silence a known-unfixable Rust advisory, add it to `.cargo/audit.toml` ([advisories] ignore=[…]).
|
||
name: audit
|
||
# One pending run per workflow+ref: a newer push supersedes the queued/running one and cancels
|
||
# it (a canary only needs the latest commit; each release tag is its own ref so tag runs never
|
||
# cancel each other). Keeps a busy push cadence from piling ~10 queued runs per commit onto the
|
||
# runner fleet. Gitea honors this for push triggers (PR triggers: see gitea#35933).
|
||
concurrency:
|
||
group: ${{ github.workflow }}-${{ github.ref }}
|
||
cancel-in-progress: true
|
||
|
||
|
||
on:
|
||
schedule:
|
||
- cron: '0 6 * * 1' # Mondays 06:00 UTC
|
||
push:
|
||
branches: [main]
|
||
paths:
|
||
- 'Cargo.lock'
|
||
- 'packaging/windows/drivers/Cargo.lock'
|
||
- 'web/bun.lock'
|
||
- 'docs-site/bun.lock'
|
||
- 'sdk/bun.lock'
|
||
- 'plugin-kit/bun.lock'
|
||
- 'clients/decky/pnpm-lock.yaml'
|
||
- 'about.toml'
|
||
- '.gitea/workflows/audit.yml'
|
||
workflow_dispatch:
|
||
|
||
jobs:
|
||
cargo-audit:
|
||
runs-on: ubuntu-24.04
|
||
container:
|
||
image: 192.168.1.58:5010/punktfunk-rust-ci:latest
|
||
timeout-minutes: 30
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
# Cache /usr/local/cargo so the cargo-audit binary (and the advisory DB clone) persist.
|
||
- uses: actions/cache@v4
|
||
with:
|
||
path: |
|
||
/usr/local/cargo/bin
|
||
/usr/local/cargo/registry
|
||
key: cargo-audit-${{ hashFiles('Cargo.lock') }}
|
||
restore-keys: cargo-audit-
|
||
- name: cargo audit
|
||
run: |
|
||
git config --global --add safe.directory "$PWD"
|
||
command -v cargo-audit >/dev/null 2>&1 || cargo install --locked cargo-audit
|
||
cargo audit
|
||
|
||
bun-audit:
|
||
strategy:
|
||
fail-fast: false
|
||
matrix:
|
||
tree: [web, sdk, plugin-kit]
|
||
runs-on: ubuntu-24.04
|
||
container:
|
||
image: oven/bun:1
|
||
timeout-minutes: 15
|
||
defaults:
|
||
run:
|
||
working-directory: ${{ matrix.tree }}
|
||
steps:
|
||
# oven/bun's slim base lacks a CA bundle + git — actions/checkout's HTTPS fetch needs them
|
||
# (same preamble as web-screenshots.yml / ci.yml's web job).
|
||
- name: Install git + CA certs
|
||
working-directory: /
|
||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git
|
||
- uses: actions/checkout@v4
|
||
# `bun audit` queries the registry advisory DB for the versions pinned in the tree's
|
||
# bun.lock. No install/build needed — it reads the manifest + lockfile. Fails the job on any
|
||
# advisory, the same fail-on-vulnerability stance as cargo-audit above; triage a finding by
|
||
# bumping the dep (or, if genuinely unfixable + inapplicable, pinning a resolution and
|
||
# noting why here).
|
||
#
|
||
# web carries two ignores, the ONLY ones in a blocking tree — both image-size advisories
|
||
# (GHSA-w3rx-r6r6-pgpr ICNS, GHSA-5p2g-fcmc-qvqq JXL/HEIF infinite-loop DoS). They are
|
||
# unfixable AND unreachable:
|
||
# * unfixable — the vulnerable range is `<= 2.0.2` and 2.0.2 IS latest; upstream has
|
||
# published no patched release, so no override can clear them.
|
||
# * unreachable — image-size rides in under `@unom/ui › @payloadcms/richtext-lexical ›
|
||
# … › payload`, and @payloadcms/richtext-lexical is a PEER of @unom/ui that only its
|
||
# `./richtext` export needs. The console imports section/toast/button/card/dialog/
|
||
# form/*/material/tabs — never `./richtext` — so payload is auto-installed peer weight
|
||
# that no bundle, and no request path, ever touches.
|
||
# Drop these the moment image-size ships a fix, or @unom/ui marks that peer optional
|
||
# (peerDependenciesMeta) and the chain leaves web/bun.lock entirely — either one makes the
|
||
# bare `bun audit` green again. Scoped per-tree so sdk/plugin-kit stay strictly fail-on-any.
|
||
- name: bun audit
|
||
run: |
|
||
if [ "${{ matrix.tree }}" = "web" ]; then
|
||
bun audit --ignore=GHSA-w3rx-r6r6-pgpr --ignore=GHSA-5p2g-fcmc-qvqq
|
||
else
|
||
bun audit
|
||
fi
|
||
|
||
# Kept OUT of the bun-audit matrix so this tree's known-advisory state can't normalize failure
|
||
# in a shipping tree. Non-blocking via a step-level `||` (NOT job-level continue-on-error, which
|
||
# act_runner does not reliably honor — a red job here would take the whole run red). The full
|
||
# advisory list still lands in the log; the warning marks it wasn't clean.
|
||
docs-site-audit:
|
||
runs-on: ubuntu-24.04
|
||
container:
|
||
image: oven/bun:1
|
||
timeout-minutes: 15
|
||
defaults:
|
||
run:
|
||
working-directory: docs-site
|
||
steps:
|
||
- name: Install git + CA certs
|
||
working-directory: /
|
||
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git
|
||
- uses: actions/checkout@v4
|
||
- name: bun audit (non-blocking)
|
||
run: bun audit || echo "::warning::docs-site has known advisories (CMS/UI + nitropack chains) — tracked in punktfunk-planning design/cra-readiness.md"
|
||
|
||
pnpm-audit:
|
||
runs-on: ubuntu-24.04
|
||
container:
|
||
image: node:22-bookworm
|
||
timeout-minutes: 15
|
||
defaults:
|
||
run:
|
||
working-directory: clients/decky
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
# decky is pnpm-managed (pnpm-lock.yaml lockfileVersion 9.0 → pnpm 10 reads it). Like
|
||
# bun audit, `pnpm audit` needs no install/build — lockfile + registry advisory DB only.
|
||
# --prod: rollup bundles only the prod deps into the shipped plugin; devDependencies are
|
||
# build tooling that never leaves CI (auditing them fails on toolchain advisories that
|
||
# can't reach a user — the docs-site problem in miniature).
|
||
- name: pnpm audit
|
||
run: |
|
||
npm install -g pnpm@10
|
||
pnpm audit --prod
|
||
|
||
# The regression guard about.toml documents: fail if any crate in either Rust workspace carries
|
||
# a license outside the `accepted` allowlist (e.g. a copyleft dep silently entering the linked
|
||
# set). cargo-about is version-pinned: the config uses the per-crate `accepted` syntax
|
||
# validated against exactly this version.
|
||
license-gate:
|
||
runs-on: ubuntu-24.04
|
||
container:
|
||
image: 192.168.1.58:5010/punktfunk-rust-ci:latest
|
||
timeout-minutes: 30
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
- uses: actions/cache@v4
|
||
with:
|
||
path: |
|
||
/usr/local/cargo/bin
|
||
/usr/local/cargo/registry
|
||
key: cargo-about-0.9.1
|
||
restore-keys: cargo-about-
|
||
- name: cargo about license gate (host + driver workspaces)
|
||
run: |
|
||
git config --global --add safe.directory "$PWD"
|
||
command -v cargo-about >/dev/null 2>&1 || cargo install --locked cargo-about --version 0.9.1 --features cli
|
||
cargo about generate about.hbs --fail -o /dev/null
|
||
cargo about generate -m packaging/windows/drivers/Cargo.toml -c about.toml about.hbs --fail -o /dev/null
|