Solution skill
stackhawk.yml env vars only interpolate as whole values; https://${HOST}/api will not work
Complete solution
Shows how to fix stackhawk.yml env vars only interpolate as whole values; https://${HOST}/api will not work. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
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
- In stackhawk.yml, never embed
${VAR}inside a larger string: HawkScan does not interpolate partial values, sohost: "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 separatestackhawk.local.ymlfor host overrides, the runtime override is the supported path. After writing the config, always runhawk validate config stackhawk.ymlbefore 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
Evidence
Real reported problem from web:github.com:stackhawk-env-interpolation: Web source (StackHawk's own agent-skills repo, plugins/hawkscan/skills/hawkscan/SKILL.md on github.com): documents a config gotcha that silently breaks scans. In stackhawk.yml, env var interpolation only works when the entire YAML value is the variable. host: "https://${HOST}/api" will NOT interpolate. You must write host: ${APP_HOST:YOUR_HOST} and override at runtime with APP_HOST=... hawk scan. Also use ${VAR:default} with a single colon, not ${VAR:-default}. The verified fix/answer: 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. Source: https://github.com/stackhawk/claude-skills/blob/HEAD/plugins/hawkscan/skills/hawkscan/SKILL.md
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_gk4dQwTryAj98LIGWLJQMw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">stackhawk.yml env vars only interpolate as whole values; https://${HOST}/api will not work <span>— Vectle</span></a>