Commit Graph
3 Commits
Author SHA1 Message Date
g-butandClaude Opus 4.7 ac800a161c chore(ci): daily Audit workflow surfaces new CVEs as they land
Adds .github/workflows/audit.yml — runs `npm audit --audit-level=high`
every day at 07:13 UTC plus on-demand via the Actions tab. Fails when
a HIGH or CRITICAL severity vulnerability enters the dep graph.

The off-the-hour minute (13 vs 0) spreads fleet load. Moderate vulns
are intentionally not the trigger — the chronic transitive-noise from
esbuild-via-drizzle-kit and postcss-via-next would flap the workflow
constantly without giving us actionable signal.

A failing run is the cue to either run `npm audit fix` (if non-breaking)
or evaluate the breaking-fix path. Verified: workflow YAML parses,
`npm audit --audit-level=high` currently exits 0 since b53421d patched
the Next.js DoS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 20:45:44 +02:00
g-butandClaude Opus 4.7 aa75af712f fix(ci): drop the build step — needs a live DB the workflow can't have
The first run of cca3113 failed because /events (and likely every other
DB-backed page) does its DB query during Next's static pre-render,
hitting the stub DATABASE_URL with ECONNREFUSED.

Two options to fix:
  A) Mark every DB-backed page `export const dynamic = "force-dynamic"`.
     Real fix, but it's a prod-behavior change (every request re-fetches
     instead of serving cached HTML).
  B) Drop `next build` from CI and rely on Vercel's deploy build —
     which has a real DB attached — to catch build issues.

Going with B. Pre-commit + CI now gate type/lint (cheap, fast,
DB-independent); Vercel gates build (slow, DB-aware). Layered checks,
each at the right place.

If the DB-time-of-render coupling becomes a problem later — e.g. a
contributor breaks the build but Vercel doesn't deploy that branch —
revisit and add postgres-service + drizzle-push to the workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 11:44:26 +02:00
g-butandClaude Opus 4.7 cca31135c7 chore(ci): add GitHub Actions workflow running tsc + eslint + build
Pre-commit (bceacc8) catches local commits, but anything pushed with
--no-verify or arriving via a PR from a fork bypasses it. Add a
GitHub Actions workflow that runs the same checks on origin (push to
main and every PR) plus a `next build` to catch issues that only
surface during compilation.

- Node 22 with npm cache (subsequent runs reuse node_modules)
- Concurrency: cancels in-progress runs on the same ref so quick
  commit chains don't waste minutes
- DATABASE_URL is set to a syntactically-valid stub so src/db/index.ts
  doesn't throw at module-load; postgres-js pools lazily, no real
  connection happens during build

Belt-and-suspenders with the husky hook and Vercel's own build —
covers the case where Vercel is down or the PR author skipped local
hooks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 11:40:45 +02:00