Security

Cloudflare Acquires Varlock to Strengthen Secrets Management for AI Coding Agents

API keys and passwords are easy to leak, and AI coding agents make that risk bigger. Cloudflare is bringing Varlock, an open-source secrets toolkit, into its team to help fix it.

Cloudflare acquires Varlock to strengthen secrets management for AI coding agents
Varlock is joining Cloudflare to improve how apps and AI agents handle secrets.

Varlock, an open-source toolkit for managing environment variables and secrets, is joining Cloudflare. Both teams say Varlock will keep being actively developed, stay open source under the MIT license, and remain vendor-neutral for everyone.

A secret is private information an app needs, such as an API key or a password. An environment variable is a setting, often a secret, that an app reads when it starts.

Why environment variables need a schema

To find out which settings an app needs, developers often piece together hints from an old .env.example file, a README, custom checking code, and comments across the project. Sensitive API keys can sit in plain .env files on laptops, travel through chat messages, and get copied into many dashboards. Rotating a key, meaning replacing it with a new one, is a chore that teams put off until something leaks.

Coding agents turned this fragile chore into an immediate security risk, say the teams behind the deal.

How Varlock works

Varlock replaces .env.example with a .env.schema file that you commit to Git. A schema is a written description of the rules. This one uses JSDoc-style decorator comments, such as # @required, to declare types and rules. A new function syntax loads secrets safely from external vaults or from encrypted local files.

# @plugin(@varlock/1password-plugin)
# ---
# @type=url
API_URL=https://api.example.com

# @required @sensitive @type=string(startsWith=sk_)
# @docs(https://docs.stripe.com/keys)
STRIPE_SECRET_KEY=op("op://prod/stripe/secret-key")

This schema layer brings several benefits:

  • Validation: bad or missing settings are caught early.
  • Type safety: each variable has a declared type.
  • Secure, declarative loading: secrets come from a vault, not from a loose file.
  • One source of truth: the schema is the single place that says what the app needs.
  • Agent-friendly: agents can work with your variables without leaking their values.

Plain idea: think of the schema as a checklist on the classroom door. It says what every student must bring, and nobody has to guess or copy answers from an old note.

What changes for Varlock

The teams say Varlock is not going anywhere. They point to Cloudflare's earlier acquisitions of Astro and VoidZero (the team behind Vite, Oxc, and more) as proof that it supports open-source developer tools and stays neutral. Varlock aims to remain a flexible open toolkit, with first-party plugins for the most popular secret vaults and frameworks.

The roadmap largely stays the same, with these items in the works:

  • Better agentic workflows.
  • Deeper language support beyond JavaScript.
  • Better built-in encryption tools.
  • Team vaults in the style of SOPS, with no external backend.

One change: the effort that would have gone into a hosted Varlock service will now go into Cloudflare Secrets Store and into improving how config and secrets are handled across Cloudflare's platform.

Pushing for an open standard

The teams also want .env.schema and the env-spec syntax to outgrow Varlock. They hope many technologies will adopt them as an open standard. They say this needs help from outside Cloudflare and invite interested people to get in touch.

Secrets in the age of AI

The problems are not new, but AI-powered development has made them bigger. There is more code and more secrets than ever. AI also brings new kinds of attacks, such as prompt injection, and speeds up regular vulnerabilities and supply chain attacks. Many new builders using AI tools are also meeting API keys for the first time.

So the teams say secrets, identity, and access all need rethinking for the agent era. They list several areas they are working on:

  • Credential brokering: a trusted go-between that hands out secrets safely.
  • OpenID Connect (OIDC) and bot identity: a way for software to prove who it is. See how OpenID Connect works.
  • Better machine flows: improved ways to issue and rotate secrets.
  • Guardrails and stronger boundaries.
  • Human-in-the-loop approvals: a person confirms risky actions.

They add that we may eventually move away from most long-lived secrets, but they call it a long, bumpy road.

What's next

The teams thank everyone who has used Varlock and filed issues or pull requests on GitHub. They say much more is coming for both the open-source project and Cloudflare Secrets Store in the coming months. If you have not tried Varlock yet, start with its Cloudflare Workers integration guide.

What It Means for Developers

This news matters most to people who handle keys and settings in their apps or let agents touch their code.

What It Means for Software Developers

  • Replace guesswork about which variables exist with a committed schema that lists them, with types and rules.
  • Load secrets from a vault with a simple function instead of copying them into plain .env files.
  • Give coding agents a safer way to see your configuration without exposing the actual values.
  • Keep an eye on the env-spec syntax, since the goal is for more tools to support it.
  • Want to see how leaks of this kind can hurt? Read our story on the Optimizely security incident.

What It Means for DevOps Engineers

  • Varlock stays open source under MIT and vendor-neutral, so it can fit setups that are not on Cloudflare.
  • Watch Cloudflare Secrets Store, because hosted Varlock effort is now going there.
  • Plan for key rotation. The teams say it is a task often put off until something leaks.
  • Look at upcoming features such as credential brokering, OIDC and bot identity, and human approvals when you set rules for agents.
  • New to Node.js tooling? See our Node.js tutorial.

Bottom line

Varlock joining Cloudflare ties a popular open-source secrets toolkit to a major developer platform. The promise is simple: keep Varlock open and neutral, and build better secret handling into Cloudflare Secrets Store.

The details of future products are still to come, so for now the practical step is to try a schema for your own environment variables and keep real secrets out of plain files.

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author