Skip to content

ci: add ThreatCrush security scan - #12

Merged
ralyodio merged 4 commits into
mainfrom
chore/threatcrush-scan
Aug 3, 2026
Merged

ci: add ThreatCrush security scan#12
ralyodio merged 4 commits into
mainfrom
chore/threatcrush-scan

Conversation

@ralyodio

@ralyodio ralyodio commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Sample install — the one you asked to see before the fleet rollout. Installs threatcrush-scan@1.1.0 from the sh1pt Actions Store.

Scans PRs for hardcoded credentials, injection, SSRF, unsafe deserialisation, XXE and dependency tampering. Findings go to the Security tab as SARIF and to a PR comment; snippets are redacted, so no credential material reaches a CI log. Report-only — it will not fail a PR on findings.

Read this PR's CI history — it's the interesting part

Run 1 — green, and wrong. Reported 0 findings. The runner installed the published @profullstack/threatcrush@0.2.2, which has no --format:

error: unknown option '--format'

Commander exits 1 — the same code the CLI uses for "findings at or above failOn". The step read a failure as a result, no SARIF was written, the empty-run fallback supplied one, and the comment declared the repo clean. A green check on a repository nothing had scanned.

Run 2 — red, but the comment still lied. The new capability check failed the job correctly, yet the comment still said "0 findings": the report tested status == "error", and a skipped step yields an empty string, so it fell through to the happy path.

Run 3 — red and honest. "NOT RUN — the scan did not complete, so this diff was not examined." Correct, but useless: it refused to scan anything until a new CLI shipped.

Run 4 — green, and genuinely scanned. The workflow now detects the interface up front and converts 0.2.2's text output when --format is missing:

CLI 0.2.2 predates --format; converting terminal output instead.
✔ Scanned 5 files
  ✓ No security issues found!
converted 0 finding(s) to threatcrush.sarif

That 0 findings is a real clean result — 5 files scanned, completion footer present — not the absence of one. The difference between run 1 and run 4 is the whole point.

Coverage

The legacy converter is a stopgap. 0.2.2 is a secrets scanner: 12.9% true-positive rate against profullstack/malware-test-prs, at 0.0% false positives.

Once profullstack/threatcrush#73 is merged and published, the workflow picks the native --format sarif path automatically and coverage goes to 90.32% at the same 0.0% false-positive rate. No change needed here.

🤖 Generated with Claude Code

Installs threatcrush-scan@1.0.0 from the sh1pt Actions Store.
Scans pull requests for hardcoded credentials, injection, SSRF, unsafe
deserialisation and dependency tampering; uploads SARIF to the Security
tab.

Report-only — it will not fail a pull request. Set the pack's failOn
input to critical,high once the existing findings are triaged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

0 finding(s)

No findings.

ralyodio and others added 2 commits August 3, 2026 10:01
Re-render at threatcrush-scan@1.0.1.

The first run on this PR reported "0 findings" without scanning
anything: the runner installed the published 0.2.2, which has no
--format, and the resulting `unknown option` error exited 1 — the same
code the CLI uses for a real findings result. See run 30803607991.

The workflow now verifies the interface before scanning and treats the
SARIF file as the only evidence a scan happened.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio ralyodio changed the title ci: add ThreatCrush security scan ci: add ThreatCrush security scan (sample install — do not merge yet) Aug 3, 2026
@ralyodio
ralyodio marked this pull request as ready for review August 3, 2026 10:21
The published 0.2.2 has no --format, so the previous version refused to
run at all. It now converts the text output instead, fail-closed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ralyodio ralyodio changed the title ci: add ThreatCrush security scan (sample install — do not merge yet) ci: add ThreatCrush security scan Aug 3, 2026
@ralyodio
ralyodio merged commit 55d651f into main Aug 3, 2026
3 checks passed
@ralyodio
ralyodio deleted the chore/threatcrush-scan branch August 3, 2026 11:21
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.

2 participants