Security & trust

How Safia handles your code

Everything below describes protections that are actually implemented today. Where something is not built yet, it is not listed.

Credential security

  • GitHub access tokens are encrypted with AES-256-GCM before they are written to the database, and decrypted only inside server code.
  • Tokens are never sent to the browser, never included in API responses and never logged.
  • Webhook signing secrets are generated server-side, shown to you exactly once, and stored encrypted.
  • You can disconnect GitHub at any time from Settings, which deletes the stored token.

Data isolation

  • Every table storing your data has row-level security enforced in the database, scoped to your user id.
  • Backend-only tables (rate limits, billing events, encrypted tokens) are unreachable from the browser entirely.
  • Repository code is read through your own GitHub authorisation, so Safia can never see a repository you cannot.
  • Safia never executes code from your repository. Files are read as text and passed to the analysis model only.

Request protections

  • Inbound GitHub webhooks are rejected unless the HMAC-SHA256 signature matches your repository's stored secret.
  • Billing webhooks are signature-verified and processed idempotently, so retries never double-apply.
  • Live-site scanning is HTTPS-only and blocks localhost, private IP ranges, cloud metadata endpoints, non-standard ports and unvalidated redirects.
  • Every agent is rate limited server-side, and monthly usage caps are enforced in the backend — not in the browser.

Retention you control

  • Test runs, reviews, scans and reports are kept for the retention window you choose in Settings: 7, 30, 90 or 365 days, or indefinitely.
  • You can purge all agent history immediately from Settings at any time.
  • Safia stores analysis results, not copies of your repository.

Payments

Subscriptions are handled by LemonSqueezy as merchant of record. Safia never sees or stores your card details; we receive only your subscription status and renewal date.