Skip to content

chore(ci): harden workflows + add zizmor security analysis - #190

Merged
cpojer merged 1 commit into
mainfrom
chore/security-workflow-hardening
May 7, 2026
Merged

cpojer merged 1 commit into
mainfrom
chore/security-workflow-hardening

Conversation

@Boshen

@Boshen Boshen commented May 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Add Security Analysis workflow running oxc-project/security-action on PRs and on pushes that touch .github/workflows/**.
  • Apply zizmor's recommended hardenings to existing workflows:
    • persist-credentials: false on every actions/checkout step.
    • Top-level permissions: {} plus least-privilege per-job permissions (contents: read, preserving id-token: write on publish).
  • Drop cache: pnpm from publish.yml setup-node (release path runs --frozen-lockfile + provenance, so a poisoned pnpm cache could otherwise compromise published artifacts) and add inline # zizmor: ignore[cache-poisoning] for the residual Low-confidence warnings.

- Add Security Analysis workflow running oxc-project/security-action
- Set persist-credentials: false on all actions/checkout steps
- Add top-level permissions: {} and least-privilege per-job permissions
- Drop pnpm cache from publish.yml setup-node and ignore residual zizmor cache-poisoning warnings (mitigated by --frozen-lockfile + provenance)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you.

@cpojer
cpojer merged commit e68cd31 into main May 7, 2026
9 of 10 checks passed
@cpojer
cpojer deleted the chore/security-workflow-hardening branch May 7, 2026 06:17
cpojer pushed a commit that referenced this pull request Sep 11, 2026
…en usage enforcement (#190)

Admin suspend/unsuspend/plan-change only touched the slug routing entry,
leaving custom-domain (`domain:<host>`) routes, sandbox-block / ai-block KV,
and the UsageCounter DO latches out of sync — so a project stayed 429'd on its
custom domain after an admin unsuspend (the void.cloud case).

- routing.ts: reason-aware `applyRoutingSuspension` (force / matchReason so an
  admin suspension outranks a usage one and a usage reconcile never lifts an
  admin block); `setProjectsRoutingSuspension` fans out to the slug AND every
  domain route (including crash-window pending domains).
- admin/users.tsx: suspend stamps edge KV first, DB last (fail-closed +
  retryable); unsuspend clears edge + DO latch first, DB last; plan-change
  optimistically clears request+sandbox+AI; reserved usage reasons rejected and
  partial failures surfaced as a retryable 500 instead of a false success.
- usage-counter.ts: retry-safe cleanup — flip suspension latches only AFTER the
  KV/DB writes succeed (rollover, reevaluate-sandbox, record) and defer the
  rollover billingPeriodStart mutation past the awaits, so a mid-cleanup throw is
  retried instead of stranding ai-block / sandbox-block keys (sandbox has no
  /init re-stamp, so a latch-before-write there failed open).
- index.ts: latch-driven self-healing request reconcile every scheduled pass.

959/959 api tests, typecheck/lint/fmt clean.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants