Security & Privacy
How the Race Engineer protects your data through sandbox isolation, ownership checks, and OAuth authentication.
The Race Engineer is designed with security at every layer. Your racing data is protected by sandbox isolation, per-query ownership verification, and industry-standard authentication.
Sandbox Isolation
AI code runs in isolated-vm, a V8 isolate with no access to:
- Network: Cannot make HTTP requests or connect to external services
- Filesystem: Cannot read or write files
- Environment: Cannot access environment variables or secrets
- Modules: Cannot
require()orimportexternal packages
The sandbox is constrained to:
| Limit | Value |
|---|---|
| Execution timeout | 10 seconds |
| Memory | 32 MB |
| API calls per execution | 20 |
| Code size | 10 KB |
| Output size | 100 KB |
If any limit is exceeded, execution is terminated immediately.
Data Ownership
Every function verifies that the authenticated user owns the requested data:
assertSessionOwnership(userId, sessionId)before any session queryassertRaceOwnership(userId, raceEventId)before calendar operationsassertNotepadOwnership(userId, notepadId)before notepad access
There is no way to query another user’s data — even if you know their session IDs. The one exception is a public leaderboard lap you explicitly duel with compareTraces, which is only readable because its owner opted to share it publicly.
Input Validation
All functions use Zod schemas with strict validation:
- MUTATING and CREATIVE functions use
.strict()— unknown fields cause errors - Every parameter has a
.describe()annotation explaining its purpose - Type coercion is disabled — the AI must pass the correct types
- The
_validateOnly: trueflag lets AI dry-run mutations without writing
This prevents prompt injection attacks where an AI might try to pass unexpected parameters.
Authentication
The server uses OAuth 2.0 with PKCE (Proof Key for Code Exchange):
- Dynamic client registration — AI clients register automatically
- Authorization code flow — User explicitly grants access via consent page
- PKCE mandatory — Prevents authorization code interception
- JWT tokens — Access tokens are signed and verified on every request
- Refresh tokens — Automatic token renewal without re-authorization
Discovery Endpoints
The server follows RFC 8414 and RFC 9728 for automatic discovery:
| Endpoint | Standard | Purpose |
|---|---|---|
/.well-known/oauth-authorization-server | RFC 8414 | OAuth metadata discovery |
/.well-known/oauth-protected-resource | RFC 9728 | Resource metadata with 401 WWW-Authenticate |
Clients supporting MCP over Streamable HTTP and OAuth can use these endpoints for discovery. Configuration steps vary by client.
CORS Policy
The server allows requests from known AI platforms:
https://claude.aihttps://chatgpt.comhttps://chat.openai.com- Plus custom origins configured by the server operator
Data Handling
- Model training: The Race Engineer does not train its own model on your telemetry. A connected AI client’s provider may process requested results under its own terms.
- Account access: Queries are scoped to your authenticated account; requested results pass to the AI client you authorize.
- Soft deletes: Most data uses
deleted_attimestamps — accidental deletions can be recovered - Null stripping: Output is cleaned of null values to reduce token usage
What We Don’t Store
The Race Engineer does not store:
- AI conversation history
- The code that AI writes (executed and discarded)
- AI model responses
- Your AI client’s API keys or credentials