System Security Plan
NIST SP 800-171 Rev 2
Last updated: August 6, 2026 · Memcode AI, Inc.
System Description
Memcode is an agentic coding platform: a local CLI with persistent codebase memory, a hosted model gateway, and a web application providing chat, scheduled agents, and a team knowledge base. The system is designed so that customer source code and its memory remain on the customer's machine; the hosted components process the context required to serve each model request and the data customers explicitly upload.
- Web hosting: Vercel (SOC 2 Type II, ISO 27001, HIPAA, PCI DSS)
- Database: Supabase PostgreSQL (SOC 2 Type II, HIPAA)
- Model gateway: Google Cloud Run (SOC 2 Type II, ISO 27001, ISO 27018)
- Secrets: Google Cloud Secret Manager, accessible only to the gateway service account
- Authentication: Supabase Auth via OAuth 2.0 (Google, GitHub)
- AI providers: OpenAI, Anthropic, Google, xAI, Fireworks (enterprise API terms, no training on customer data)
System Boundary
The system boundary encompasses the Memcode web application, its API layer, the model gateway, database, file storage, and authentication services. The Memcode CLI runs on customer machines outside the boundary; it communicates only with the gateway over authenticated HTTPS. Third-party AI model providers are external to the boundary and operate under enterprise data processing terms.
Security Control Implementation
3.1 Access Control
3.1.1
Limit system access to authorized users.
All access requires OAuth 2.0 authentication via supported identity providers (Google, GitHub). Every API endpoint enforces an authenticated session. The model gateway requires a per-organization key on every request.
3.1.2
Limit system access to the types of transactions and functions that authorized users are permitted to execute.
Role-based access control at the organization level (admin/member). Database-level row security ensures users can only access their own data with strict tenant isolation enforced on every query.
3.1.5
Employ the principle of least privilege.
User sessions are scoped to only the resources they own. Elevated operations are restricted to internal services with dedicated credentials. Customer-supplied provider API keys are stored in a dedicated secrets vault readable only by the service that routes model requests; they are never written to the application database or logs.
3.1.7
Prevent non-privileged users from executing privileged functions.
Administrative operations (member management, billing, organization settings) require a verified admin role, enforced server-side on every request.
3.1.12
Monitor and control remote access sessions.
All access is over HTTPS. Sessions are tracked with automatic expiration and token rotation. Rate limiting prevents brute-force and abuse.
3.1.20
Verify and control connections to external systems.
AI model providers are accessed exclusively over authenticated HTTPS APIs under enterprise terms that prohibit training on customer data. If a customer-supplied key fails, the request fails cleanly rather than silently falling back to another credential.
3.3 Audit and Accountability
3.3.1
Create and retain system audit logs.
Structured logging captures authentication events, API activity, and billing operations across the web application and model gateway. The billing ledger is append-only.
3.3.2
Ensure actions can be traced to individual users.
Every request is attributed to an authenticated user and organization. Billing and usage records carry the originating organization and account on every entry.
3.3.8
Protect audit information from unauthorized access and modification.
Ledger records are append-only at the database level and deduplicated on external transaction identifiers. Users cannot modify or delete billing or usage records.
3.5 Identification and Authentication
3.5.1
Identify system users and processes.
Each user is assigned a unique identifier upon registration and belongs to at least one organization. All API requests require authenticated sessions. Automated processes use dedicated service credentials.
3.5.2
Authenticate users and devices.
Authentication is handled by enterprise OAuth 2.0 identity providers (Google, GitHub) which support device verification and organizational security policies.
3.5.3
Use multifactor authentication.
MFA is supported through OAuth identity providers. Google Workspace and GitHub both support MFA enforcement. Organizations can mandate MFA at the identity provider level for all users.
3.8 Media Protection
3.8.1
Protect system media containing confidential information.
All uploaded files are encrypted at rest using AES-256. File access requires authenticated, time-limited signed URLs. Your source code and its memory remain on your machine; only the context relevant to a model request transits the gateway.
3.8.9
Protect the confidentiality of backups.
Database backups are encrypted at rest and managed by SOC 2 Type II certified infrastructure. No unencrypted backups are created by the application.
3.12 Security Assessment
3.12.1
Periodically assess security controls.
Automated testing verifies authentication enforcement across all endpoints, including guard tests that fail the build if security-relevant contracts are violated. Dependency auditing is performed regularly. Infrastructure providers maintain independent SOC 2 Type II audits.
3.12.3
Monitor security controls on an ongoing basis.
Application and gateway logging capture security-relevant events. Rate limiting detects and blocks abuse patterns. Entitlement checks gate every model call.
3.13 System and Communications Protection
3.13.1
Monitor, control, and protect communications at external boundaries.
All communications are encrypted via TLS 1.2+. HSTS is enforced. Content Security Policy and CORS restrict unauthorized resource loading and cross-origin requests.
3.13.8
Implement cryptographic mechanisms to prevent unauthorized disclosure of data during transmission.
TLS 1.2+ is enforced on all connections. All communications with third-party services use HTTPS exclusively. The model gateway is stateless and holds prompts only in transit.
3.13.16
Protect the confidentiality of data at rest.
AES-256 encryption at rest for all database and file storage. Encryption key management is handled by SOC 2 certified infrastructure providers. Customer-supplied provider keys are encrypted in a dedicated secrets vault, isolated from application data.
Contact
For questions about this System Security Plan, contact tim@memcode.ai.