Core environment variables
Template signing
Private key used for signing templates. Required when using the
-sign flag.Public key used for verifying template signatures.
Template locations
Override the default templates directory location.
Authentication
GitHub personal access token for:
- Downloading private templates from GitHub
- Creating issues via GitHub integration
- Avoiding rate limits
GitLab personal access token for GitLab integrations.
Jira API token for issue tracking integration.
Cloud integration
ProjectDiscovery Cloud Platform API key for cloud integration.
AWS credentials
AWS access key for S3 template storage and AWS-related templates.
AWS secret access key.
AWS region for S3 operations. Defaults to
us-east-1.Azure credentials
Azure storage account name for Azure Blob Storage templates.
Azure storage account access key.
Debug and development
Enable debug output for troubleshooting.
Show DSL function execution errors in output.
Debug specific templates by path or ID.
Proxy configuration
HTTP proxy server for Nuclei requests.
HTTPS proxy server.
Comma-separated list of domains to bypass proxy.
Interactsh configuration
Custom Interactsh server URL for OAST testing.
Authentication token for self-hosted Interactsh servers.
Output and reporting
Sort mode for Markdown exports. Options:
template, severity, host.CI/CD integration examples
GitHub Actions
GitLab CI
Docker
Secrets management
Using .env files locally
Create a.env file (add to .gitignore):
Using Docker secrets
Variable precedence
Configuration is applied in this order (later overrides earlier):- Default values
- Configuration file (
~/.config/nuclei/config.yaml) - Environment variables
- Command-line flags
Best practices
Use secrets management
Use secrets management
Store sensitive tokens in:
- GitHub Secrets (GitHub Actions)
- GitLab CI/CD Variables (GitLab CI)
- Azure Key Vault (Azure Pipelines)
- AWS Secrets Manager (AWS environments)
- HashiCorp Vault (enterprise)
Rotate credentials regularly
Rotate credentials regularly
Set expiration dates on API tokens and rotate them periodically. Update your CI/CD secrets when rotating.
Use least privilege
Use least privilege
Grant tokens only the minimum permissions needed:
- GitHub:
reposcope for private templates - Jira: Issue creation only
- Cloud platforms: Read-only for templates
Isolate environments
Isolate environments
Use different tokens for dev/staging/prod environments to limit blast radius of compromised credentials.
Troubleshooting
Environment variables not working
Environment variables not working
Check:
- Variable is properly exported:
echo $VARIABLE_NAME - No typos in variable names (they’re case-sensitive)
- Command-line flags don’t override the environment variable
- Restart shell session after setting variables
Authentication failures
Authentication failures
Verify:
- Token is valid and not expired
- Token has required permissions/scopes
- No extra whitespace in token value
- Token format is correct for the service
Proxy issues
Proxy issues
Debug with:Check:
- Proxy URL format is correct
- Proxy is accessible from your environment
- NO_PROXY excludes internal domains if needed
Next steps
Reporting integrations
Set up Jira, Slack, and other integrations
Authentication
Configure authentication for private templates