Environment Variables

Environment Variables

Urx supports configuration through environment variables for sensitive data and default settings.

API Keys

URX_VT_API_KEY

VirusTotal API key for accessing the VirusTotal provider.

export URX_VT_API_KEY=your_api_key_here
urx example.com --providers vt

Multiple Keys (Rotation):

export URX_VT_API_KEY=key1,key2,key3
urx example.com --providers vt

URX_URLSCAN_API_KEY

Optional URLScan API key. The urlscan provider works anonymously without a key (rate-limited to ~30 requests/min per IP); set a key only to raise those limits and enable key rotation.

export URX_URLSCAN_API_KEY=your_api_key_here
urx example.com --providers urlscan

Multiple Keys (Rotation):

export URX_URLSCAN_API_KEY=key1,key2,key3
urx example.com --providers urlscan

URX_ZOOMEYE_API_KEY

ZoomEye API key for accessing the ZoomEye provider.

export URX_ZOOMEYE_API_KEY=your_api_key_here
urx example.com --providers zoomeye

Multiple Keys (Rotation):

export URX_ZOOMEYE_API_KEY=key1,key2,key3
urx example.com --providers zoomeye

Summary

Variable Provider Description
URX_VT_API_KEY VirusTotal VirusTotal API key
URX_URLSCAN_API_KEY URLScan Optional URLScan API key (the provider also works anonymously)
URX_ZOOMEYE_API_KEY ZoomEye ZoomEye API key

Usage Notes

  • Environment variables are automatically detected when running Urx
  • Command-line flags take precedence over environment variables
  • Multiple API keys can be comma-separated for rotation
  • API keys enable automatic activation of the respective providers

Best Practices

Store in Profile

Add to your ~/.bashrc, ~/.zshrc, or ~/.profile:

# Urx Configuration
export URX_VT_API_KEY=your_vt_key
export URX_URLSCAN_API_KEY=your_urlscan_key
export URX_ZOOMEYE_API_KEY=your_zoomeye_key

Use .env Files

For project-specific configuration:

# .env
URX_VT_API_KEY=your_vt_key
URX_URLSCAN_API_KEY=your_urlscan_key
URX_ZOOMEYE_API_KEY=your_zoomeye_key

Load with:

source .env
urx example.com

Docker Environment

docker run --rm \
  -e URX_VT_API_KEY=your_key \
  -e URX_URLSCAN_API_KEY=your_key \
  -e URX_ZOOMEYE_API_KEY=your_key \
  ghcr.io/hahwul/urx:latest \
  example.com

CI/CD Secrets

Store API keys as secrets in your CI/CD platform:

GitHub Actions:

- name: Run Urx
  env:
    URX_VT_API_KEY: ${{ secrets.VT_API_KEY }}
    URX_URLSCAN_API_KEY: ${{ secrets.URLSCAN_API_KEY }}
    URX_ZOOMEYE_API_KEY: ${{ secrets.ZOOMEYE_API_KEY }}
  run: urx example.com

Security Considerations

  • Never commit API keys to version control
  • Use secrets management for production environments
  • Rotate keys regularly
  • Use different keys for different environments (dev/staging/prod)