Skip to content

v0.9.5: pre-launch security audit + hardening#6

Merged
Shaan-alpha merged 2 commits into
mainfrom
feat/v0.9.5-security-review
May 28, 2026
Merged

v0.9.5: pre-launch security audit + hardening#6
Shaan-alpha merged 2 commits into
mainfrom
feat/v0.9.5-security-review

Conversation

@Shaan-alpha

Copy link
Copy Markdown
Owner

Summary

Full pre-launch security audit of the whole app — no high or critical findings. Verified sound: ownership checks on every mutation (no IDOR), AES-GCM session-token encryption, OAuth state CSRF (constant-time), no SQL injection, no XSS (escaped LLM narrative), no SSRF (server-side username validation), server-only secrets.

Two Medium hardening fixes shipped:

  • OAuth scope read:user public_reporead:user. public_repo grants write to public repos; reading public data needs no repo scope. Shrinks a leaked token's blast radius. New logins only; existing sessions unaffected.
  • HTTP security headers (next.config.ts): enforced X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy; plus a report-only CSP baseline (tune before enforcing).

Load test split to v0.9.6; legal docs to v0.9.7.

Operator follow-ups (config, no code)

  • Confirm COOKIE_SECURE=true in prod.
  • Ensure CORS_ALLOW_ORIGIN_REGEX is scoped to our origins (not *.vercel.app).

Test plan

  • Backend ruff clean; pytest 284 passed / 69 skipped (+1 OAuth scope test)
  • Frontend lint + tsc clean; vitest 54 passed; next build clean (headers config valid)
  • Post-merge: curl -I prod confirms security headers present; /health = 0.9.5

Pre-launch audit fixes (no high/critical found):
- OAuth scope read:user public_repo -> read:user. public_repo grants write
  to public repos despite its name; reading public data needs no repo scope.
  Shrinks a leaked stored token's blast radius. New logins only.
- Add HTTP security headers in next.config.ts: X-Frame-Options, nosniff,
  Referrer-Policy, Permissions-Policy (enforced) + report-only CSP baseline.
@Shaan-alpha Shaan-alpha merged commit 1e594e6 into main May 28, 2026
4 checks passed
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.

1 participant