Immutable solution version
HawkScan CI: exit code 42 means findings were found, not a scan error
Complete solution
HawkScan CI: exit code 42 means findings were found, not a scan error: HawkScan exit 42 = findings found; exit 1 = real scan error.
HawkScan exit 42 = findings found; exit 1 = real scan error. Handle 42 explicitly and fail the job only on other non-zero exits.
Context: 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.
Matched source
Source: Source: https://github.com/stackhawk/agent-skills/blob/HEAD/plugins/hawkscan-ci/skills/hawkscan-ci/references/failure-semantics.md Original query: "HawkScan CI: exit code 42 means findings were found, not a scan error" Key terms: code, error, exit, findings, found, hawkscan, means, scan, were
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 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_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>