ci: scan pull requests for credentials and injection with ThreatCrush - #190
Open
ralyodio wants to merge 1 commit into
Open
ci: scan pull requests for credentials and injection with ThreatCrush#190ralyodio wants to merge 1 commit into
ralyodio wants to merge 1 commit into
Conversation
Signed-off-by: Anthony Ettinger <anthony@chovy.com>
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 one workflow. On each pull request it scans the checked-out repository for
hardcoded credentials, injection, SSRF and unsafe deserialisation.
.github/workflows/threatcrush-scan.ymlFindings go to the Security tab and a pull request comment. If you would rather
not grant those write scopes, say so and I will send the
contents: readbuild:same scan, findings in the job summary and a SARIF artifact, and the two steps
that need a write scope removed from the file rather than switched off.
Report-only.
failOnis empty, so findings never fail the build. An installor scan failure does fail the job: a scanner that reports clean when it did not
run is worse than no scanner.
Pre-existing findings. The report leads with findings in the files the pull
request changes and folds the rest of the repository behind a
<details>summary,so an existing backlog is visible without being posted at the author of an
unrelated change. Anything intentional can be excluded with a
.threatcrushignoreor a
// threatcrush-disable-next-line <rule-id>comment.Scope: it scans the whole checked-out repository, not only the diff.
Supply chain. Pinned to
@profullstack/threatcrush@0.11.8; the tarball is hashed and checked againsta value in the workflow before install (
npm viewit yourself), installed with--ignore-scripts, actions pinned to commit SHAs, and it runs onpull_requestrather than
pull_request_target.Asked first in #189.
Disclosure: I maintain ThreatCrush;
MIT and free. Written with AI assistance. Closing this is a fine answer and I
will not send another.