This document describes crwsync's recurring security process: how vulnerabilities are found, how rate limits and secrets get reviewed, and how to report a problem.
Open a private security advisory via GitHub's "Report a vulnerability" button on this repo's Security tab, or contact the maintainer directly. Do not open a public issue for an unpatched vulnerability.
Three layers run continuously, each catching a different class of problem:
| Layer | Trigger | What it checks | Where |
|---|---|---|---|
| Trivy filesystem scan | Every push/PR to main |
Known CVEs in the working tree (deps, base images, IaC) | .github/workflows/deploy.yml (scan-security job) |
Scheduled pnpm audit |
Weekly (Mondays), plus manual dispatch | High/critical vulnerabilities in the resolved pnpm-lock.yaml |
.github/workflows/security-audit.yml |
| Dependabot | Weekly | Opens a PR to bump any dependency (npm packages + GitHub Actions) with a known advisory | .github/dependabot.yml |
A failing scheduled audit files (or comments on) a dependency-audit-labeled issue automatically — it is never silent. Treat that issue as a blocker: run pnpm audit locally, upgrade the flagged package(s), and close it once a re-run is clean.
Global default (ThrottlerModule.forRoot in apps/backend/src/app.module.ts): 100 requests/minute per client, applied everywhere via APP_GUARD unless a route overrides it.
Sensitive routes are tuned tighter, e.g.:
POST /auth/signup— 5/hourPOST /auth/signin— 10/5 minPOST /password-reset/*— 5/hourPOST /contact— 3/minPOST /workspaces(create) — 5/hour, invites — 50/hour
Review these values quarterly, and immediately after any incident involving brute-forcing, scraping, or abuse. When reviewing, check:
- Has legitimate usage started hitting a limit (support reports, error-tracking noise)? Loosen it.
- Has a route been added without an explicit
@Throttle/@SkipThrottledecision? Every new controller method must pick one deliberately (seeCLAUDE.md). - Do the tightest limits (auth, password reset) still match current brute-force guidance (OWASP ASVS)?
Secrets are injected as GitHub Actions secrets at deploy time (.github/workflows/deploy.yml) and validated as required env vars at backend boot (apps/backend/src/main.ts). Current inventory:
JWT_ACCESS_TOKEN_SECRET,COOKIE_SECRET— session/auth signingDATABASE_URL— Postgres credentialsSTORAGE_ACCESS_KEY/STORAGE_SECRET_KEY— S3/MinIO credentialsREDIS_PASS— Redis authMAIL_USER/MAIL_PASS— SMTP credentialsSENTRY_AUTH_TOKEN— source map upload tokenDEMO_OWNER_PASSWORD/DEMO_MEMBER_PASSWORD/DEMO_INVITEE_PASSWORD— seeded demo accounts
Rotate every secret quarterly, and immediately (same day) if: a secret may have leaked (log line, screen share, compromised laptop), a team member with repository/environment access leaves, or a dependency with access to the secret (e.g. a CI action) is itself flagged by the scans above.
To rotate: generate a new value, update the corresponding GitHub Actions secret (repo or environment settings), then re-run the deploy workflow so the running stack picks it up — main.ts will refuse to boot if a required secret is missing, so a partial rotation fails loudly rather than falling back to an old value.