StackHawk Documentation StackHawk Logo HawkDocs

No results found

Try different keywords or check your spelling

Search documentation

Find guides, API references, and more

esc

Secrets Management

The Secrets Manager lets you store sensitive values—like API tokens and passwords—that HawkScan can use at runtime without exposing them as environment variables on your scanner host.

Secrets work just like environment variables when interpolated in your HawkScan configuration. Any defined secrets are automatically applied during scans and redacted in logs.

Creating a Secret

Navigate to Settings → Secrets to create a new secret:

  1. Click Add Secret
  2. Enter a name using environment variable convention (e.g., MY_API_TOKEN)
  3. Enter the secret value
  4. Click Save

Use a name you wouldn’t normally find in your scan environment variables so secrets are easier to track.

Using Secrets

Secrets are automatically applied when the authenticating user has defined them. They work as environment variable overrides when interpolating your HawkScan configuration, and are redacted in scan logs.

When running the hawk CLI, use --env/-e or --env-file to supply variable values. See environment variable runtime overrides for details.

For example, if your stackhawk.yml contains:

app:
  host: ${APP_HOST:http://localhost:3000}

Running with -e APP_HOST=http://dev.example.com sets the host to that value:

hawk scan -e APP_HOST=http://dev.example.com

This works similarly to Docker’s -e flag.

Your privacy settings

We use first and third party cookies to ensure that we give you the best experience on our website and in our products.