Security Overview
Comprehensive security controls and compliance readiness documentation for the Slopshop API platform. Built for enterprise adoption — authentication, data protection, audit logging, incident response, and cryptographic verification on every response.
We are working toward SOC 2 certification. This page documents our current security controls, not a certification status.
Infrastructure Security
The Slopshop API enforces transport-layer security, security headers, origin controls, and request limits at the application and network edge. The server handles graceful shutdown to prevent data loss during deployments.
slopshop.gg is served over TLS 1.3. HTTP requests
receive a 301 permanent redirect to HTTPS. The API proxy and edge
CDN both enforce TLS termination before traffic reaches the application layer.
X-Frame-Options, X-Content-Type-Options: nosniff,
Strict-Transport-Security, X-DNS-Prefetch-Control,
X-XSS-Protection, and Referrer-Policy on every response.
CORS_ORIGIN environment variable for self-hosted deployments.
SIGTERM and SIGINT signals and
performs a graceful shutdown: stops accepting new connections, waits for in-flight
requests to complete, flushes SQLite WAL, and then exits cleanly. This prevents
data loss during container restarts or deployments.
Authentication & Authorization
All API calls require a bearer token. Passwords and API keys are never stored in plaintext. Key scoping, rate limiting, and timing-safe comparisons protect against brute force and side-channel attacks.
crypto.pbkdf2Sync using SHA-512,
100,000 iterations, and a 16-byte random salt generated with
crypto.randomBytes(16). The salt is stored alongside the derived
key; the plaintext password is never persisted, logged, or returned in any response.
crypto.timingSafeEqual to prevent timing side-channel attacks.
This ensures that the comparison time does not leak information about the secret
value, even to an attacker measuring response latency.
Retry-After header indicating the number of seconds until the
limit resets. This enables well-behaved clients to back off automatically
without hammering the API.
POST /v1/auth/rotate-key.
The old key is immediately invalidated and the full credit balance transfers to the
new key. Both the in-memory cache and the SQLite database are updated atomically.
Data Protection
Data in transit is encrypted via TLS. Persistent storage uses SQLite with WAL journaling for crash safety. Memory is isolated per API key, and every response includes a SHA-256 output hash for tamper detection.
journal_mode = WAL (Write-Ahead Logging),
which provides crash recovery and allows concurrent reads. If the process is
interrupted mid-write, WAL ensures the database returns to its last consistent
state on next open. No data corruption occurs from unclean shutdowns.
users table stores only the PBKDF2-derived hash and the random
salt. The plaintext password is never written to disk, logged, or returned in any
API response. API keys in the database are also hashed.
_output_hash field containing
the SHA-256 digest of the response payload. Clients can independently verify that
the response has not been tampered with in transit or by a proxy. This is included
on every single API call automatically.
db.prepare() with positional
parameters. User-supplied values are bound at execution time — they are never
interpolated into SQL strings. This eliminates the entire class of SQL injection
vulnerabilities across all queries.
Audit & Observability
Every authenticated API call produces a structured audit record. Response headers provide per-call telemetry. All activity is correlatable via request IDs and traceable via API versioning.
X-Request-Id header containing a
unique identifier for that request. This ID is also recorded in the audit log,
enabling end-to-end correlation between client-side logs and server-side records
for debugging and compliance investigations.
X-API-Version header indicating the
server version that produced the response. This enables clients to detect API
changes, supports rollback verification, and provides an audit trail of which
code version handled each request.
audit_log table containing:
timestamp, key prefix (not the full key),
API endpoint, credits consumed,
latency in milliseconds, and the execution engine.
Indexes on ts and api support efficient queries.
Users can query their own history via GET /v1/usage.
Sunset
and Deprecation headers per RFC 8594 and the IETF Deprecation
header draft. This gives clients advance notice of breaking changes and enables
automated migration tooling.
X-Credits-Used,
X-Credits-Remaining, X-Latency-Ms,
X-Request-Id, and X-Engine headers. This allows
clients to observe their consumption in real time without querying the usage
endpoint.
Compliance Readiness
Slopshop is working toward SOC 2 Type II certification but is not yet certified. We implement controls aligned with enterprise compliance requirements. The platform is designed to be self-hostable for air-gapped and regulated environments.
SOC 2 Type II — In Preparation (Not Yet Certified)
- SOC 2 Type II certification has not been completed. We are implementing controls for security, availability, and confidentiality trust service criteria at the application layer. Formal audit with an independent assessor is planned but not yet scheduled.
-
Self-hostable for air-gapped/compliance deployments. The entire
platform can be deployed on-premises with
npm install slopshop && node server-v2.js. All compute APIs run with zero external dependencies. Enterprise customers can audit, modify, and deploy in fully isolated environments. -
/.well-known/security.txtendpoint. A machine-readable security contact file is served at the standard well-known URI per RFC 9116, providing vulnerability disclosure contacts and policy links. - No tracking, no analytics, no third-party scripts on API. The API server does not include any tracking pixels, analytics scripts, or third-party JavaScript. No user data is shared with advertising or analytics providers. The only outbound connections are to explicitly configured upstream APIs (LLM providers, when enabled).
-
GDPR: data deletion available via memory-delete. Users can delete
all their persistent memory data via the
memory-deleteAPI. Account deletion is available on request. No data is retained after deletion beyond the audit log (which contains only anonymized key prefixes, not personal data). - security.txt contact: dev@slopshop.gg
Service Level
Slopshop targets 99.5% uptime for the hosted API. The API runs on Railway Pro with automatic TLS, health monitoring, and zero-downtime deploys. Compute-tier APIs (189 endpoints) have zero external dependencies and are the most reliable. Network and LLM APIs depend on upstream providers.
For guaranteed SLAs with contractual commitments, contact dev@slopshop.gg for enterprise plans.
Incident Response
Slopshop maintains an incident response process for security vulnerabilities, service outages, and data incidents.
Reporting a Security Vulnerability
- Contact: dev@slopshop.gg
- Response time target: less than 24 hours for initial acknowledgment
- Status page: slopshop.gg/status-page
- Disclosure policy: We follow coordinated disclosure. We will work with reporters to understand and resolve issues before any public disclosure.
- Scope: All slopshop.gg infrastructure, API endpoints, client libraries, and documentation sites are in scope for vulnerability reports.
Verification
Slopshop provides cryptographic proof of execution on every response. Clients can independently verify that results are authentic, untampered, and produced by the real execution engine.
_engine field confirming the
execution backend. For compute APIs, this is always "real", indicating
the handler executed genuine computation rather than returning cached or mock data.
This field is verifiable via self-hosting.
_output_hash field containing the SHA-256
digest of the result payload. Clients can recompute
sha256(JSON.stringify(result)) to verify that neither a proxy, CDN,
nor man-in-the-middle has modified the response content.
Control Summary
| Category | Control | Status |
|---|---|---|
| Infrastructure | HTTPS enforced (301 redirect) | IMPLEMENTED |
| Infrastructure | Content Security Policy (CSP) | IMPLEMENTED |
| Infrastructure | Helmet.js security headers | IMPLEMENTED |
| Infrastructure | CORS: Allow-Origin: * (public API, configurable via CORS_ORIGIN env var) | IMPLEMENTED |
| Infrastructure | Request body size limits | IMPLEMENTED |
| Infrastructure | Graceful shutdown (SIGTERM/SIGINT) | IMPLEMENTED |
| Auth | PBKDF2-SHA512 (100K iterations) | IMPLEMENTED |
| Auth | Scoped keys (tier/category) | IMPLEMENTED |
| Auth | Timing-safe comparisons | IMPLEMENTED |
| Auth | Rate limiting (60 req/min default) | IMPLEMENTED |
| Auth | Retry-After on 429 | IMPLEMENTED |
| Auth | API key rotation | IMPLEMENTED |
| Data | Memory isolation (SHA-256 prefix) | IMPLEMENTED |
| Data | SQLite WAL crash-safe writes | IMPLEMENTED |
| Data | Credit refund on handler error | IMPLEMENTED |
| Data | No plaintext password storage | IMPLEMENTED |
| Data | SHA-256 output hashes | IMPLEMENTED |
| Data | Parameterized SQL (no injection) | IMPLEMENTED |
| Audit | Structured JSON logging | IMPLEMENTED |
| Audit | X-Request-Id on every response | IMPLEMENTED |
| Audit | X-API-Version header | IMPLEMENTED |
| Audit | Full audit log (every call) | IMPLEMENTED |
| Audit | Sunset/Deprecation headers | IMPLEMENTED |
| Compliance | SOC 2 Type II | IN PREPARATION (NOT YET CERTIFIED) |
| Compliance | Self-hostable (air-gapped) | IMPLEMENTED |
| Compliance | /.well-known/security.txt | IMPLEMENTED |
| Compliance | No tracking/analytics on API | IMPLEMENTED |
| Compliance | GDPR data deletion | IMPLEMENTED |
| Verification | _engine execution proof | IMPLEMENTED |
| Verification | SHA-256 output hashes | IMPLEMENTED |
| Verification | Merkle proofs (batch/army) | IMPLEMENTED |
| Verification | TEE attestation | ROADMAP |
| Infrastructure | Encryption at rest | ROADMAP |
| Infrastructure | Multi-region redundancy | ROADMAP |