﻿# Ad-Hoc Github Repo Vulnerability Scan

Run this ad-hoc python script to perform a github vulnerability scan on a desired repo in `theorchard` organization. It generates the same output as the `GitHub Vulnerability Scanner` produced by the orchardci on PR Changes. 

## Pre-requisites
1. Configure your GitHub personal access token: https://github.com/settings/tokens
2. Configure your Atlassian API auth token: https://id.atlassian.com/manage-profile/security/api-tokens
3. Activate a virtual env.
4. Install deps by running `pip install -r requirements.txt`

## How-To

### Scan all repos
1. Run `python3 scan_all.py` with optional CLI arguments below
   - `update_jira`: create/ update Jira issues for each repository in which vulnerabilities are reported
   - `log_to_file`: output all scan results to a CSV
   - `app_family=<enter-app-family>`: Enable Jira isssue creation for a specific application family


### Scan one repo
1. Run `python3 scan_single.py`
3. Follow the prompt. Your scan results should appear in the console output.
4. To create a Jira issue for this scan result, follow the prompt.
   - Look up project key: https://theorchard.atlassian.net/jira/projects
5. Navigate to Jira issue.

## Jira Dashboard
Navigate to this Jira Dashboard to view unresolved issues: https://theorchard.atlassian.net/jira/dashboards/16029

## References
https://github.com/theorchard/security-scripts/tree/master/github_remediation
