Format status json

This commit is contained in:
Alvaro Muñoz
2023-03-28 23:06:59 +02:00
parent 18e38d441e
commit 14c19d1654
2 changed files with 88 additions and 75 deletions

View File

@@ -5,30 +5,37 @@
## Configuration
A configuration file will be created in `~/.config/mrva/config.yml`. The following options are supported:
- `codeql-path`: Path to CodeQL distribution
- `controller`: NWO of the MRVA controller to use
- `listFile`: Path to the JSON file containing the target repos
## Usage
Until the extension gets published you can use `go run .` instead of `gh mrva`
### Submit a new query
```bash
gh mrva submit [--controller <CONTROLLER>] --lang <LANGUAGE> [--list-file <LISTFILE>] --list <LIST> --query <QUERY> [--name <NAME>]
gh mrva submit [--codeql-path<path to CodeQL>] [--controller <controller>] --lang <language> --name <run name> [--list-file <list file>] --list <list> [--query <query> | --query-suite <query suite> ]
```
Note: `controller` and `list-file` are only optionals if defined in the configuration file
Note: if a `name` (any arbitrary name) is provided, the resulting run IDs will be stored in the configuration file so they can be referenced later for download
Note: `codeql-dist`, `controller` and `list-file` are only optionals if defined in the configuration file
### Download the results
```bash
gh mrva download [--controller <CONTROLLER>] --lang <LANGUAGE> --output-dir <OUTPUTDIR> [--name <NAME> | --run <ID>] [--download-dbs]
gh mrva download --name <run name> --output-dir <output directory> [--download-dbs] [--nwo <owner/repo>]
```
Note: `controller` is only optionals if defined in the configuration file
Note: if a `name` is provided, the run ID is not necessary and instead `gh-mrva` will download the artifacts associated that `name` as found in the configuration file
### List sessions
```bash
gh mrva list [--json]
```
### Check scan status
```bash
gh mrva status --name <run name> [--json]
```
## Contributing