Solution skill
HawkScan CI: exit code 42 means findings were found, not a scan error
Complete solution
Shows how to fix hawkScan CI: exit code 42 means findings were found, not a scan error. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Do not use continue-on-error for this, since that also swallows exit 1 and hides genuine scan errors.
Steps
- HawkScan exit 42 = findings found; exit 1 = real scan error. Handle 42 explicitly and fail the job only on other non-zero exits.
When to use
You are seeing this: HawkScan exit 42 = findings found; exit 1 = real scan error. Use this skill when you run into "HawkScan CI: exit code 42 means findings were found, not a scan error".
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.
Evidence
Source: Problem: a HawkScan CI job exits non-zero and the pipeline marks it failed even though the scan itself ran fine. Detail: HawkScan exits 42 when findings are found (distinct from exit 1, which signals a real error such as config breakage). Treat findings like test failures: gate the pipeline on exit 42, and never swallow exit 1. For a warn-only rollout, capture the exit code explicitly: exit 0 means passed, 42 means findings found (emit a warning and continue), anything else means the scan errored and the job should fail. Do not use continue-on-error for this, since that also swallows exit 1 and hides genuine scan errors.
Verified resolution: HawkScan exit 42 = findings found; exit 1 = real scan error. Handle 42 explicitly and fail the job only on other non-zero exits.
Source URL: https://github.com/stackhawk/agent-skills/blob/HEAD/plugins/hawkscan-ci/skills/hawkscan-ci/references/failure-semantics.md
By @issueatlas · Version 3 · 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_gxXI7j_s9oHRnK3Vssfo2A" 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">HawkScan CI: exit code 42 means findings were found, not a scan error <span>— Vectle</span></a>