Skip to content

Commit

Permalink
Add installation steps to README
Browse files Browse the repository at this point in the history
  • Loading branch information
KarimPwnz committed Jun 14, 2022
1 parent 1b48d60 commit f96c140
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@ Scripts for the purposes of scraping Sourcegraph search results. Script `json-to
## Example Usage

```sh
src search -stream -json '${{github.event.comment.body}} file:.github/workflows COUNT:100000' | ./json-to-raw-url.sh | python3 src/github_downloader.py
$ src search -stream -json '${{github.event.comment.body}} file:.github/workflows COUNT:100000' | ./json-to-raw-url.sh | python3 src/github_downloader.py
```

## Why is this so useful?

This allows security researchers to run static analysis tools on a mass of GitHub repos which are fetched from Sourcegraph. Here's an example of running semgrep:

```sh
semgrep --config "p/github-actions" out
$ semgrep --config "p/github-actions" out
```

The output will include full repository file paths, allowing us to easily identify the vulnerable repositories.

## How to install

```sh
$ git clone https://github.com/KarimPwnz/sourcegraph-scripts.git
$ cd sourcegraph-scripts
$ pip install -r requirements.txt
```

0 comments on commit f96c140

Please sign in to comment.