Skip to content

Skip the scan when no API key is set; validate fail-on - #1

Merged
thistehneisen merged 1 commit into
mainfrom
skip-without-key
Nov 14, 2026
Merged

thistehneisen merged 1 commit into
mainfrom
skip-without-key

Conversation

@thistehneisen

Copy link
Copy Markdown
Contributor

Fork and Dependabot pull requests get no secrets, so api-key is empty there and the scan failed with a 401.

  • api-key is optional. When empty, the scan is skipped with a warning and the new skipped output is true.
  • fail-on is validated against critical, high, medium, low, kev, exploited or empty before any request.
  • SARIF is uploaded only when a report was written.
  • README: actions/checkout@v7, and the skip behaviour is documented.
  • CI: a keyless step asserts the scan is skipped.

Tested: actionlint clean; the step script run locally with an empty key exits 0 with skipped=true, and with a key continues to validation and the file check.

After merge: add the RADAR_API_KEY repository secret so CI runs a real scan, then tag v1.0.1 and move v1.

…idate fail-on

Fork and Dependabot pull requests get no secrets, so the scan failed with a 401.
There, an empty api-key now skips with a warning and sets the skipped output.
Anywhere else an empty key fails the step, so a missing secret never passes the
gate. fail-on is checked before the request, SARIF uploads only when a report was
written, and the README snippet uses actions/checkout@v7.
@thistehneisen
thistehneisen merged commit 346bdf0 into main Nov 14, 2026
8 checks passed
@thistehneisen
thistehneisen deleted the skip-without-key branch November 14, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant