Environment variables complement yourDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DevDonzo/warden/llms.txt
Use this file to discover all available pages before exploring further.
.wardenrc.json by providing sensitive credentials that should never be committed to source control. Warden automatically loads a .env file from your project root at startup using dotenv, so you can keep all secrets in one place during local development without exporting them in your shell.
Using a .env File
Create a .env file at your project root (the same directory as your .wardenrc.json) and populate it with the variables below. Warden reads this file before executing any command:
Variables
GITHUB_TOKEN
Required for branch creation and pull request management.
A GitHub Personal Access Token (classic) with the
repo scope, or a
fine-grained token with Contents (read/write) and Pull Requests
(read/write) permissions on the target repository. Warden uses this token to
push fix branches and open PRs on your behalf.SNYK_TOKEN
Recommended when using the snyk scanner.
Your Snyk API token. Retrieve it from your Snyk account
settings. Without this token, Warden falls back
to
npm-audit (if scanner.fallback is true) or fails if fallback is
disabled.GITHUB_OWNER
The GitHub username or organization name that owns the target repository, e.g.
"my-org". Used when constructing the API path for PR creation. Can also be
set via --repository owner/repo on the CLI.GITHUB_REPO
The repository name (without the owner prefix), e.g.
"my-repo". Combined
with GITHUB_OWNER to form owner/repo for GitHub API calls.GITHUB_ASSIGNEE
A GitHub username to assign to every PR Warden creates. This is a convenience
shorthand for a single assignee; for multiple assignees use
github.assignees in .wardenrc.json.RESEND_API_KEY
Optional. Your Resend API key for sending email
notifications. Required when
notifications.email.provider is "resend" in
.wardenrc.json. The variable name can be customized via
notifications.email.apiKeyEnv.OPENAI_API_KEY
Optional. Reserved for future AI-assisted vulnerability analysis and
remediation guidance features. Not used in the current release.
ANTHROPIC_API_KEY
Optional. Reserved for future AI-assisted analysis using Anthropic’s Claude
models. Not used in the current release.
.env Example
The following mirrors examples/.env.example from the Warden repository:
Using Environment Variables in CI
In CI/CD pipelines you should store credentials as encrypted secrets rather than committing a.env file.
Variable Priority
When both a.env file and a shell environment variable define the same key, the shell environment variable wins. This makes it easy to override local .env values in CI without modifying the file: