@@ -68,6 +68,7 @@ ScanPipe's own commands are listed under the ``[scanpipe]`` section::
68
68
list-project
69
69
output
70
70
purldb-scan-worker
71
+ report
71
72
reset-project
72
73
run
73
74
show-pipeline
@@ -174,6 +175,10 @@ Required arguments (one of):
174
175
| project-2
| pkg:deb/debian/
[email protected] |
175
176
+----------------+---------------------------------+
176
177
178
+ .. tip ::
179
+ In place of a local path, a download URL to the CSV file is supported for the
180
+ ``--input-list `` argument.
181
+
177
182
Optional arguments:
178
183
179
184
- ``--project-name-suffix `` Optional custom suffix to append to project names.
@@ -194,14 +199,15 @@ Optional arguments:
194
199
Example: Processing Multiple Docker Images
195
200
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196
201
197
- Assume multiple Docker images are available in a directory named ``local-data/ `` on
202
+ Suppose you have multiple Docker images stored in a directory named ``local-data/ `` on
198
203
the host machine.
199
- To process these images with the ``analyze_docker_image `` pipeline using asynchronous
200
- execution::
204
+ To process these images using the ``analyze_docker_image `` pipeline with asynchronous
205
+ execution, you can use this command ::
201
206
202
207
$ docker compose run --rm \
203
- --volume local-data/:/input-data:ro \
204
- web scanpipe batch-create input-data/ \
208
+ --volume local-data/:/input-data/:ro \
209
+ web scanpipe batch-create
210
+ --input-directory /input-data/ \
205
211
--pipeline analyze_docker_image \
206
212
--label "Docker" \
207
213
--execute --async
@@ -224,6 +230,19 @@ Each Docker image in the ``local-data/`` directory will result in the creation o
224
230
project with the specified pipeline (``analyze_docker_image ``) executed by worker
225
231
services.
226
232
233
+ Example: Processing Multiple Develop to Deploy Mapping
234
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
235
+
236
+ To process an input list CSV file with the ``map_deploy_to_develop `` pipeline using
237
+ asynchronous execution::
238
+
239
+ $ docker compose run --rm \
240
+ web scanpipe batch-create \
241
+ --input-list https://url/input_list.csv \
242
+ --pipeline map_deploy_to_develop \
243
+ --label "d2d_mapping" \
244
+ --execute --async
245
+
227
246
`$ scanpipe list-pipeline [--verbosity {0,1,2,3}] `
228
247
--------------------------------------------------
229
248
@@ -375,6 +394,46 @@ your outputs on the host machine when running with Docker.
375
394
.. tip :: To specify a CycloneDX spec version (default to latest), use the syntax
376
395
``cyclonedx:VERSION `` as format value. For example: ``--format cyclonedx:1.5 ``.
377
396
397
+ .. _cli_report :
398
+
399
+ `$ scanpipe report --model MODEL `
400
+ ---------------------------------
401
+
402
+ Generates an XLSX report of selected projects based on the provided criteria.
403
+
404
+ Required arguments:
405
+
406
+ - ``--model {package,dependency,resource,relation,message,todo} ``
407
+ Specifies the model to include in the XLSX report. Available choices are based on
408
+ predefined object types.
409
+
410
+ Optional arguments:
411
+
412
+ - ``--output-directory OUTPUT_DIRECTORY ``
413
+ The path to the directory where the report file will be created. If not provided,
414
+ the report file will be created in the current working directory.
415
+
416
+ - ``--search SEARCH ``
417
+ Filter projects by searching for the provided string in their name.
418
+
419
+ - ``--label LABELS ``
420
+ Filter projects by the provided label(s). Multiple labels can be provided by using
421
+ this argument multiple times.
422
+
423
+ .. note ::
424
+ Either ``--label `` or ``--search `` must be provided to select projects.
425
+
426
+ Example usage:
427
+
428
+ 1. Generate a report for all projects tagged with "d2d" and include the **TODOS **
429
+ worksheet::
430
+
431
+ $ scanpipe report --model todo --label d2d
432
+
433
+ 2. Generate a report for projects whose names contain the word "audit" and include the
434
+ **PACKAGES ** worksheet::
435
+
436
+ $ scanpipe report --model package --search audit
378
437
379
438
.. _cli_check_compliance :
380
439
0 commit comments