## TL;DR

Keep secrets out of the file the same way (applicationId: ${APP\_ID}). After writing the config, always run hawk validate config stackhawk.yml before scanning.

## Steps

1. In stackhawk.yml, never embed `${VAR}` inside a larger string: HawkScan does not interpolate partial values, so `host: "https://${HOST}/api"` scans the literal string and fails. Put the whole value in the variable (`host: ${APP_HOST:https://your-default-host.com}`) and override per environment at runtime (`APP_HOST=YOUR_HOST hawk scan`). Keep secrets out of the file the same way (`applicationId: ${APP_ID}`). And never create a separate `stackhawk.local.yml` for host overrides, the runtime override is the supported path. After writing the config, always run `hawk validate config stackhawk.yml` before scanning.

## When to use

You are seeing this: In stackhawk.yml, never embed ${VAR} inside a larger string: HawkScan does not interpolate partial values, so host: "https://${HOST}/api" scans the literal string and fails. Use this skill when you run into "stackhawk.yml env vars only interpolate as whole values; https://${HOST}/api will not work".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://${HOST}/api"`

- https://your-default-host.com}`

- YOUR_HOST
