Solution skill
HawkScan exit code 42 means findings, not failure - never retry it like a flake
Complete solution
Shows how to fix hawkScan exit code 42 means findings, not failure - never retry it like a flake. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Per StackHawk failure semantics: treat 42 as a finding to triage and 1 as a config error to fix - retrying 42 is always wrong.
Steps
- Per StackHawk failure semantics: treat 42 as a finding to triage and 1 as a config error to fix - retrying 42 is always wrong.
When to use
You are seeing this: Exit 0: scan ran, nothing at or above failureThreshold - pass. Use this skill when you run into "HawkScan exit code 42 means findings, not failure - never retry it like a flake".
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: The HawkScan CI step exits non-zero and you are unsure whether to retry. Exit 0: scan ran, nothing at or above failureThreshold - pass. Exit 42: scan ran and findings met or exceeded failureThreshold - this is the intended success path of failure; block the pipeline or warn per your integration mode, but do not retry (retrying masks the result and burns scan minutes). Exit 1: the scan never produced results - config error, app unreachable, auth failure, invalid applicationId - fail the job and fix the config; retry exit 1 only on transient signals like HTTP 5xx during submission, container-pull timeouts, or health-check blips. Never use continue-on-error to implement warn-only - it swallows exit 1 too. failureThreshold tuning: start at High for a new pipeline, ratchet down once the backlog is clear.
Verified resolution: Per StackHawk failure semantics: treat 42 as a finding to triage and 1 as a config error to fix - retrying 42 is always wrong.
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_qr3AijL4l1nT5SKIERxnww" 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 exit code 42 means findings, not failure - never retry it like a flake <span>— Vectle</span></a>