Skip to content

P0 security hardening for Cloud Run deploy - #16

Open
sokanacollectiveCRM wants to merge 308 commits into
disc-template:mainfrom
sokanacollectiveCRM:security/p0-pilot-hardening
Open

P0 security hardening for Cloud Run deploy#16
sokanacollectiveCRM wants to merge 308 commits into
disc-template:mainfrom
sokanacollectiveCRM:security/p0-pilot-hardening

Conversation

@sokanacollectiveCRM

Copy link
Copy Markdown

Summary

  • Closes P0 security work: endpoint auth matrix, Cloud SQL-authoritative roles, webhook HMAC/replay, public intake abuse protection, safer logging, staff profile CRUD on Cloud SQL.
  • Makes npm test + test:security-smoke a GitHub Actions and Cloud Build gate before Cloud Run update on main.
  • Documents encryption at rest/in transit and that this is HIPAA input, not an attestation.

Test plan

  • Local: npm run build && npm test -- --runInBand && npm run test:security-smoke (46 suites / 375 tests)
  • GitHub Actions test gate on this PR
  • After merge: Cloud Build test-gate then deploy sokana-private-api

Do not merge until CI is green. Merging to main is what deploys.

Made with Cursor

keigocodes and others added 30 commits March 31, 2025 14:45
jbony2888 and others added 25 commits May 4, 2026 20:48
Use getSupabaseAdmin() for upload/delete so client portal documents always
hit Storage with the service role. Align bucket MIME types with common
browser and phone variants (image/jpg, webp, heic/heif) and sync existing
buckets via updateBucket. Update SQL migration and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Map full request submission into Cloud SQL (city/state/zip, birth_location,
  provider_type, pronouns, contact prefs, pets, services_interested,
  service_support_details, intake_age_years, primary_language, children_expected).
- Add migrations for referral columns, expanded primary insurance, and intake CRM fields.
- RequestFormService: intake age/provider validation, payment label normalization,
  shared insurance validation (expandedInsuranceBilling).
- referralSource constants; staff referral patch narrowing fix in clientController.
- Tests for request submission DTO, flow, and repository param positions; billing
  and birth outcome test updates. PHI field set extended for new columns.
- Docs: changelog, Cloud SQL schema notes, closed handoff; delete-phi-client-by-email script.

Co-authored-by: Cursor <cursoragent@cursor.com>
Validate birth place, four CRM payment labels (reject Medicaid on public intake),
age/provider_type, and secondary insurance; extend repository billing skips and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Map home_access, home_types, home_type_other, and people counts from
request submission; validate counts and normalize checkbox arrays. Omit
legacy home_type on INSERT where the column is absent. Add migration and
tests aligned with Playwright e2e payloads.

Co-authored-by: Cursor <cursoragent@cursor.com>
The admins branch was missing a NULL for languages_other_than_english,
causing PostgreSQL to reject GET /clients/team/all in production.

Co-authored-by: Cursor <cursoragent@cursor.com>
…safe-logging

Secure backend production logging for SEC-01
Keep Cloud SQL socket connections working in production by not forcing TLS when CLOUD_SQL_SSLMODE=disable or host is /cloudsql/..., and fix the gcloud deploy flag plus the QB sync unit mock.

Co-authored-by: Cursor <cursoragent@cursor.com>
fix(cloud-sql): honor SSL disable on Cloud Run unix sockets
Mount /contracts/templates with cache-busting, harden role checks, and list storage DOCX templates so Cloud Run no longer 404s the admin templates panel.

Co-authored-by: Cursor <cursoragent@cursor.com>
…es-api

Expose contract templates API for Contracts page
Protect auth, webhooks, and public intake; keep staff roles in Cloud SQL; add CI/Cloud Build test gates so a merge to main can deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

@jbony2888 is attempting to deploy a commit to the DISC NU's projects Team on Vercel.

A member of the Team first needs to authorize it.

Repo-wide prettier/eslint is not clean yet; the workflow was failing on thousands of legacy files. Scope the GitHub lint job to this change set so the P0 deploy PR can pass.

Co-authored-by: Cursor <cursoragent@cursor.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.

5 participants