Files
loki/.github/workflows/audit.yml
65dea6f303 chore: pnpm — the fleet has one package manager (#478)
* chore: pnpm — the fleet has one package manager

- packageManager pnpm@11.25.0; lockfile via pnpm import, package-lock.json
  removed; npm "workspaces" replaced by pnpm-workspace.yaml packages
  (packages/agent), and bridge/ joins the workspace — one install, one
  lockfile, its own package-lock.json removed
- npm "overrides" (fast-uri pin) moved to pnpm-workspace.yaml (pnpm ignores
  the npm-only field)
- allowBuilds: better-sqlite3, node-pty, @sentry/cli, native toolchain, and
  the two git-hosted deps (@fleet/ai-forms, limitkit — pnpm wants the exact
  resolved spec, keys move with the pinned tags); temporary
  minimumReleaseAgeExclude for our own @bitbaum/ai-kit@0.6.2
- phantom deps declared: @auth/core (src/auth.ts augments @auth/core/jwt —
  TS2664 under pnpm's strict layout), dotenv, sharp (scripts)
- CI/audit/deploy workflows: pnpm/action-setup@v6, store-dir pinned outside
  the action's bin dir, cache: pnpm, frozen-lockfile; deploy's separate
  `npm --prefix bridge ci` is covered by the workspace install; Next cache
  key hashes pnpm-lock.yaml; npm audit → pnpm audit
- desktop-release: root install → pnpm; desktop/ itself STAYS an npm package
  (own package-lock.json, electron toolchain untouched)
- husky: pre-push staleness gate now compares pnpm-lock.yaml against
  node_modules/.modules.yaml; hooks + scripts (deploy-hetzner, hetzner/deploy,
  install-app, doctor, smoke) converted to pnpm
- check-deploy-ready fleet gate now recognizes pnpm verify/test lines too

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn

* fix: prettier-format pnpm-workspace.yaml — format:check gates verify

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn

---------

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-04 10:35:27 +00:00

43 lines
1.3 KiB
YAML

name: Audit
# Surfaces new CVEs without waiting for someone to remember `npm audit`.
# Runs every day at 07:13 UTC (off-the-hour to spread fleet load) and on
# demand via the Actions tab. Failing means a high+ severity vuln has
# entered the dep graph.
on:
schedule:
- cron: "13 7 * * *"
workflow_dispatch:
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
# setup-pnpm's default store nests inside its own bin dir, which breaks
# any prepare-building dep (portable-type TS2742) — pin it outside.
- run: pnpm config set store-dir ~/.pnpm-store --global
- uses: actions/setup-node@v7
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
# --audit-level=high → exit non-zero only when a high or critical
# vuln is present. Moderate transitive vulns flap too often (esbuild
# via drizzle-kit, postcss-via-next) to be a useful daily signal.
- name: pnpm audit (fail on high+)
run: pnpm audit --audit-level=high
# Always print the full report so the run page shows context even
# when the audit step itself passed.
- name: Full report (informational)
if: always()
run: npm audit || true