Skip to main content

The golden rule

Never commit API keys to source control. Not even in private repositories. Not even “temporarily.” Not in comments. Not in test files. ZenVeil will catch this — and so will attackers.

ZenVeil API key

Where to store it

What to never do

GitHub token

Minimum required scopes

Use the minimum scope for your use case. A token with repo scope can read all your private repositories — don’t create one for scanning-only use cases. GitHub’s fine-grained personal access tokens let you scope access to specific repositories:
  1. Go to github.com/settings/tokens
  2. Generate new token → Fine-grained token
  3. Set Repository access → Only select repositories → choose your target
  4. Set Permissions → Contents → Read-only (for scanning)
  5. Add Pull requests → Read and write (only if using auto-PR)

Token rotation

Rotate your GitHub token every 90 days. To rotate:
  1. Generate a new token
  2. Update it in your CI/CD secrets and local environment
  3. Revoke the old token at github.com/settings/tokens

Anthropic API key

The Anthropic API key is used only for AI-powered commands (explain, fix, triage, agent). It’s optional — local scanning works without it.
ZenVeil uses this key to call Anthropic’s API. The key is passed via the Authorization header in HTTPS requests — it’s never logged, stored, or transmitted to ZenVeil servers.

Usage limits

Monitor usage at console.anthropic.com. Set monthly spending limits to prevent unexpected charges.

Security checklist

ZenVeil’s secrets scanner will flag a missing .env in .gitignore as MEDIUM severity.
GitHub Actions automatically masks values of secrets in logs. GitLab allows you to mark variables as Masked. Always enable masking for API keys.
Set a calendar reminder to rotate API keys every 90 days. GitHub supports token expiration — use it.
When rotating, revoke the old key immediately. A valid old key is a live credential even after you stop using it.
Use fine-grained GitHub tokens scoped to specific repos. Don’t use personal access tokens with broad access for CI.