Skip to main content
SECURITY / TRUST

Built Secure From Day One

SaaS Factory provisions and runs enterprise-grade infrastructure for every product it builds. The controls below are implemented in production — not on a roadmap.

GDPR Data Deletion

Automated nightly sweep processes deletion requests — complete with email confirmation on completion.

Encryption at Rest

All sensitive values — tokens, credentials, environment variables — are encrypted before storage, version-prefixed for rotation.

Audit Logging

Mutation operations on sensitive data write immutable audit trail entries. SOC 2 CC7.2 controls are wired into auth events.

Data Export

Users can request a full JSON/CSV archive of their data. Export files are time-limited and automatically expired.

[ INFRA / EVERY PRODUCT ]

The same stack that runs the factory runs your product

Every product SaaS Factory builds inherits the platform's own infrastructure. Environment variable encryption, Vercel deployment validation, GitHub secret management and dependency scanning are active from the first commit — not bolted on after launch.

  • GitHub secrets encrypted via libsodium before storage

  • Environment variables encrypted at rest, pushed securely to Vercel

  • Vercel deployment status validated before traffic shifts

  • Automated dependency update configuration for security patches

  • Security headers including a strict Content-Security-Policy

SaaS Factory dashboard showing product infrastructure overview
DATA-DELETIONGDPR deletion request processed for user:u_882102:14
ENV-VAULTEncrypted env vars pushed to Vercel for project:crm-pro02:15
AUDIT-LOGSensitive read: githubToken status accessed by user:u_440102:16
DEP-SCANDependency security audit passed — 0 high-severity findings02:17
APPROVAL-GATEGate expiry sweep — 1 stale gate marked expired, pipeline halted02:18
DATA-EXPORTExport archive generated for user:u_2209 — link valid 7 days02:19
RLS-POLICYRow-level security enforced on tenant table: ai_conversations02:20
SEC-HEADERCSP policy validated on deploy — no unsafe-script directives02:21

[ CONTROL / LAYER BY LAYER ]

Defence in depth — concrete controls at every layer

Row-Level Security

Tenant-keyed tables are progressively gaining RLS policies in Postgres — defence-in-depth so a single credential leak cannot cross tenant boundaries.

Approval Gates

Autonomous pipelines pause at human-defined approval checkpoints before merging. Gates auto-expire and abort the pipeline when left unreviewed.

Security Notifications

Webhook channels (email, Slack, Discord) dispatch MRR-drop, churn-spike and pipeline-failure events. Configurable per product.

SaaS Factory mobile dashboard showing pipeline and security status

[ AUTH / ACCESS CONTROL ]

Identity and access you can inspect

Authentication flows through GitHub, Google, Microsoft Entra and Okta OAuth. Every sign-in attempt — successful, blocked or waitlisted — is recorded in the audit trail. Team roles are enforced at the router layer so no API call bypasses permission checks.

  • GitHub, Google, Microsoft Entra & Okta OAuth — no password storage

  • Role-based access enforced in every tRPC router

  • Org-scoped invitations with token-verified acceptance

  • Active OAuth token inventory visible per product

  • Session expiry and secure cookie configuration

[ COMPLIANCE / AUTOMATED ]

Privacy workflows that run without you thinking about them

GDPR deletion, data export fulfilment and consent records are handled by scheduled background processors — not manual tickets to your team.

  1. STEP 01 — REQUEST

    User submits deletion or export request

    Recorded in data_deletion_requests or data_export_requests with status pending.

  2. STEP 02 — PROCESS

    Nightly sweep picks up eligible requests

    Runs daily at 01:00 UTC. Sets status processing, executes deletion across all associated tables.

  3. STEP 03 — CONFIRM

    Confirmation email dispatched, status finalised

    Status set to completed. User receives confirmation email. Export archives expire after 7 days.

0.0sPOST /api/gdpr/deletion
0.1sstatus: pending | scheduledFor: T+30d
0.0scron: 0 1 * * * gdpr-deletion-sweep
0.2sexecuteUserDeletion(userId) — 7 entities cleared
0.0sstatus: completed | email: sent via Resend
0.1sdata_deletion_requests — fully resolved

[ MCP / API / KEYS ]

API keys, MCP and external integrations

SaaS Factory exposes a built-in MCP server and REST API per product. API keys are org-scoped, stored encrypted, and every tool call is logged with token usage. OAuth tokens for MCP clients are inventoried and revocable.

MCP SERVER

Model Context Protocol — built in

Every product gets an MCP SSE endpoint. Bearer-token authenticated. Active OAuth tokens tracked per client, revocable from the dashboard. Tool call volume is logged per API key.

  • Bearer token auth on every MCP connection

  • OAuth token inventory — revoke from the dashboard

  • Per-key tool call usage logged and queryable

REST API

REST API with rate limiting

The REST API surface is protected by API key authentication and an active rate-limiting layer. Keys are project-scoped with configurable expiry and last-used tracking.

  • API keys hashed, project-scoped and expirable

  • Rate limiting active on all public API routes

  • REST API usage tracked per key with timestamps

[ ENV / SECRETS / VERCEL ]

Secrets managed, validated and pushed automatically

The environment variable manager validates API credentials against live endpoints — GitHub, Vercel, Twilio — before storing them encrypted. Values are pushed to Vercel deployments via authenticated API calls, never stored in plain text or committed to source.

  • Live credential validation against GitHub and Vercel APIs before save

  • AES encryption with version-prefixed ciphertext for future rotation

  • Masked display in the dashboard — values never returned to the client

  • Secure push to Vercel environment — no plaintext in source control

SaaS Factory platform security and environment variable management

[ SUPPLY CHAIN / DEPENDENCY ]

Supply-chain controls on the platform itself

Dependency Security Scanning

npm audit runs in CI against every commit. High and critical severity findings block the pipeline — not informational-only.

XSS Sanitisation

Server-fetched HTML is sanitised before output. Script tags, event handlers and dangerous attributes are stripped at the server layer.

Error Scrubbing

Error captures scrub credential-bearing fields before they leave the server — authorization headers, API key fields and stack-frame args are redacted.


[ FAQ / SECURITY ]

Common questions

Security you can verify, not just trust

Every control described here is in production today. Questions or a specific security review? Email sf-core-org-support-saas-factory@saas-factory.ai — or get started and see the infrastructure provision in real time.