ci: scan pull requests for credentials and injection with ThreatCrush - #9414
Open
ralyodio wants to merge 2 commits into
Open
ci: scan pull requests for credentials and injection with ThreatCrush#9414ralyodio wants to merge 2 commits into
ralyodio wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a pull-request workflow that scans the diff for hardcoded credentials,
injection, SSRF and unsafe deserialisation. Results go to the Security tab as
SARIF and to a comment on the pull request.
It is report-only.
failOnis empty, so it annotates and never fails a build.A repository with pre-existing findings should get a report on its first install,
not a blocked pull request — a gate that fires on everything gets switched off
within a day. Tighten it to
critical,highin the workflow once any backlog istriaged.
.github/workflows/threatcrush-scan.yml— the workflow.github/scripts/threatcrush-to-sarif.py— a compatibility shim for CLI versionsolder than native SARIF output; unused once the installed CLI can emit it itself
Permissions are least-privilege (
contents: read,pull-requests: write,security-events: write). It runs onpull_request, notpull_request_target,so contributor code never executes with your secrets in scope. The SARIF upload
is
continue-on-errorand degrades quietly where code scanning is unavailable.Disclosure: I maintain ThreatCrush.
It is free and MIT, and the workflow installs it from npm — nothing here phones
home. If this is not something you want, closing it is the right answer, and I
will not send another.