Implement functionality in order to generate report directly from the artifacts folder.
This commit is contained in:
1 parent
fb0611dd5d
commit
7b6c19d8d9
4 files changed
+239
-16
No files matched your search
@@ -17,10 +17,30 @@ pointing at a module that was never put on the path.
|
||||
|
||||
## Running
|
||||
|
||||
Two ways to say where the artifacts are.
|
||||
|
||||
**Out of the store** — Postgres for the rows, the bucket for the files:
|
||||
|
||||
```
|
||||
report_generator --scan_id <uuid> [--path <file-or-directory>] --config config.json
|
||||
report_generator generate --scan_id <uuid> [--path <file-or-directory>] --config config.json
|
||||
```
|
||||
|
||||
**Out of a folder** — neither Postgres nor the bucket, just the artifacts as the pipeline exported
|
||||
them:
|
||||
|
||||
```
|
||||
report_generator from-folder --artifacts ./sample [--path <file-or-directory>]
|
||||
```
|
||||
|
||||
`--scan_id` is optional there: the pipeline writes its own id into the paths it records in
|
||||
`metadata.json`, so an export names its own run. Pass it for a folder assembled by hand, or one
|
||||
whose metadata is gone.
|
||||
|
||||
The two produce the same document. Everything after the artifacts are in hand is shared code, and
|
||||
the sample export in `sample/` was checked against the report built from the store for the same
|
||||
scan: 17 of 17 pages identical. The tests cover the folder path; comparing the two needs a store
|
||||
and so is not among them.
|
||||
|
||||
`--scan_id` takes either id a run is known by. A run is recorded under two: the **pipeline id**,
|
||||
which the GUI shows, cipherverifier names its working directories after, and archon's `core_scan`
|
||||
row is keyed by; and the **stored scan id**, minted when the artifacts are uploaded, which `scans`,
|
||||
|
||||
Reference in new issue
Block a user