Mastra Platform adds encrypted secrets for all projects
Mastra announced encrypted secrets for all Mastra Platform projects, covering LLM API keys, tokens, and sensitive environment variables. Secrets are stored as encrypted msec values, decrypted only for delivery into a running application’s memory at startup, and are write-only in the dashboard and API; existing environments will be encrypted in place after variable review. Mastra says plaintext secret values are never stored or written to disks, container images, logs, deployment artifacts, or hosting variable stores, but the supplied report provides no independent verification of these security claims.
The feature directly addresses the exposure of model-access credentials and other sensitive variables described in the report, while changing how Mastra Platform users save, retrieve, migrate, and rotate secrets.
To keep our platform and users safe from future incidents, we're introducing encrypted secrets for all projects to protect your LLM API keys, tokens, and other sensitive environment variables. Plaintext secret values are never stored. With this change, secrets stay stored in our platform's key management service and are never written as plaintext to disk, container images, logs, or deploy artifacts, and, importantly, never left in a hosting provider's variable store.
Your browser does not support the video tag.An OPENAI_API_KEY saved as a secret in the Mastra platform dashboard is encrypted into an msec value holding an encrypted key and an encrypted secret, then decrypted and passed to the running app at startup.
Stolen inference API keys have become one of the fastest ways for attackers to monetize a breach. In October 2026, Wiz Research tracked a "Black October" stretch of security incidents across at least nine AI developer platforms, with attackers hunting stored environment variables for model access. Our own upstream service provider Railway was one of the targets, with attackers going after router and frontier lab API keys stored on their servers.