How can developers protect the secrets AI agents access? Varlock joins Cloudflare

Varlock, an open-source toolkit for managing environment variables and secrets, is joining Cloudflare. The project will continue to be developed under the MIT license and will remain vendor-neutral, according to the announcement. Work that had been planned for a hosted Varlock service will instead go toward Cloudflare Secrets Store and improving configuration and secret handling across Cloudflare’s developer platform.
The move addresses a broader problem in how applications define and use API keys and other sensitive information. The Varlock and Cloudflare announcement says many projects lack a single, reliable source of truth for environment variables. Instead, information is scattered across outdated example files, README documents, custom validation code and comments in a repository. Keys kept as plain text on developers’ laptops may be shared in chat messages and copied into multiple dashboards. Rotating a key can become a chore that teams put off.
Varlock is designed to replace that scattered approach with a .env.schema file that can be committed to a Git repository. The schema uses JSDoc-style comments to describe variable types and rules, including whether a value is required. It also provides a function syntax for securely loading secrets from external vaults or encrypted local files. According to the announcement, the approach adds validation, type safety and a defined way to load secrets, while providing a single reference point for configuration.
The companies say the issue has become more urgent with the spread of AI coding agents. The announcement describes protections that let agents work with environment variables without exposing their values as one of Varlock’s aims. AI-assisted development can speed up code production, but it can also introduce new attack types, such as prompt injection, and accelerate traditional vulnerabilities and supply-chain attacks. The source presents these as broader risks; it does not claim that Varlock eliminates them.
Joining Cloudflare does not mean Varlock’s roadmap is being scrapped. The team says it is continuing work on better workflows for agents, broader language support beyond JavaScript, improved native encryption tools, and SOPS-style team vaults that do not require an external backend. Varlock also intends to remain a flexible toolkit, with first-party plugins for popular secret vaults and frameworks.
One concrete change is that a hosted service planned for Varlock will no longer receive the development effort originally intended for it. The announcement says that work will be redirected to Cloudflare Secrets Store and improvements to configuration and secrets across the platform. In practical terms, the decision is not to shut Varlock down or turn it into a paid product, but to invest in Cloudflare’s platform tools instead of building the planned hosted Varlock solution.
The Varlock team also wants the .env.schema file format and @env-spec syntax to become an open standard used beyond Varlock. The goal, according to the announcement, is for a range of technologies to integrate the format; doing so will require contributions from people outside Cloudflare as well. The announcement points to Cloudflare’s recent acquisitions of Astro and VoidZero as examples of the company’s support for open-source developer tools.
Broader work on secrets management, identity and access is also under way. The announcement lists credential brokering, OpenID Connect (OIDC) and bot identity, improved machine workflows for issuing and rotating secrets, stronger boundaries and human-in-the-loop approvals among the areas being explored. It also suggests that many long-lived secrets may eventually become unnecessary, while emphasizing that reaching that point will be a long and difficult process.
Source: Varlock/Cloudflare announcement; @theozero.



