Warden supports two authentication methods: direct API keys and Claude Code CLI subscription authentication.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/getsentry/warden/llms.txt
Use this file to discover all available pages before exploring further.
Authentication Methods
Warden automatically detects your authentication setup in this order:Using API Keys
Setting Your API Key
Export your Anthropic API key as an environment variable:API keys can be obtained from the Anthropic Console.
GitHub Actions
For CI/CD pipelines, store your API key as a GitHub secret:.github/workflows/warden.yml
Using Claude Code CLI
Installation
Install the Claude Code CLI:Authentication
Log in to your Claude Code account:Pre-flight Verification
Warden performs authentication checks before starting analysis. Here’s how it works:src/sdk/auth.ts
Authentication Errors
Common Error Patterns
Warden detects authentication failures through error patterns:src/sdk/errors.ts
Troubleshooting
Error: Claude Code CLI not found on PATH
Error: Claude Code CLI not found on PATH
The
claude binary is not installed or not in your PATH.Solution:Error: Authentication failed: unauthorized
Error: Authentication failed: unauthorized
Error: IPC/subprocess failure (EPIPE, ECONNRESET)
Error: IPC/subprocess failure (EPIPE, ECONNRESET)
The Claude Code CLI subprocess cannot communicate, often due to sandbox restrictions.Solution:
CI/CD Environments
For GitHub Actions and other CI environments, use the API key method:src/sdk/types.ts
Authentication Flow
Best Practices
- Local Development: Use Claude Code CLI for convenience
- CI/CD: Always use API keys stored as secrets
- Team Projects: Document authentication setup in your README
- Security: Rotate API keys regularly and never commit them to version control