mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 09:13:04 +01:00
Update README with timestamp description
This commit is contained in:
committed by
=Michael Hohn
parent
ee11214aee
commit
68ce4ab5aa
35
README.md
35
README.md
@@ -86,7 +86,7 @@ Set up the virtual environment and install the packages:
|
|||||||
|
|
||||||
`results-log.scanlog` contains a raw log of any errors encountered while parsing the sarif and `results-log.csv` contains a summary of the scanlog contents.
|
`results-log.scanlog` contains a raw log of any errors encountered while parsing the sarif and `results-log.csv` contains a summary of the scanlog contents.
|
||||||
|
|
||||||
### sample usage:
|
### Sample usage 1 -- no separate timestamps file
|
||||||
```
|
```
|
||||||
python bin/sarif-extract-scans-runner sarif-files.txt -o <outer-level-results-directory>
|
python bin/sarif-extract-scans-runner sarif-files.txt -o <outer-level-results-directory>
|
||||||
```
|
```
|
||||||
@@ -97,6 +97,39 @@ Set up the virtual environment and install the packages:
|
|||||||
data/torvalds_linux__2021-10-21_10_07_00__export.sarif
|
data/torvalds_linux__2021-10-21_10_07_00__export.sarif
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
When called this way, `sarif-pad-aggregate` *should* be used because it
|
||||||
|
will overwrite single-date timestamps with a random 1-year range.
|
||||||
|
|
||||||
|
### Sample usage 2 -- with separate timestamps file
|
||||||
|
When a separate `timestamps.json` file is available and has the form
|
||||||
|
|
||||||
|
timestamps = {
|
||||||
|
"db_create_start" : "2023-07-03T00:56:15.576222",
|
||||||
|
"db_create_stop" : ...,
|
||||||
|
"scan_start_date" : ...,
|
||||||
|
"scan_stop_date" : ...,
|
||||||
|
}
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
{
|
||||||
|
"db_create_start": ...,
|
||||||
|
"db_create_stop": ...,
|
||||||
|
"scan_start": ...
|
||||||
|
"scan_stop": ...
|
||||||
|
}
|
||||||
|
|
||||||
|
the runner can be called via e.g.,
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sarif-extract-scans-runner --input-signature CLI --with-timestamps - <<EOF
|
||||||
|
foo.sarif,timestamps.json
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
When called this way, `sarif-pad-aggregate` should *not* be used because it
|
||||||
|
will overwrite those timestamps.
|
||||||
|
|
||||||
## sarif-aggregate-scans
|
## sarif-aggregate-scans
|
||||||
Parses the `codeflows.csv`,`projects.csv`, `results.csv`, `scans.csv` files generated for some batch of input sarifs and creates a final set of `codeflows.csv`,`projects.csv`, `results.csv`, `scans.csv` files aggregating all of the contents across those sarif files.
|
Parses the `codeflows.csv`,`projects.csv`, `results.csv`, `scans.csv` files generated for some batch of input sarifs and creates a final set of `codeflows.csv`,`projects.csv`, `results.csv`, `scans.csv` files aggregating all of the contents across those sarif files.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user