Package: ws-bulk-report-generator
Mend Bulk Report GeneratorCLI Tool to generate reports on multiple products or projects.The tool allows including and excluding scopes by stating their tokens.Report scope (-s, --ReportScope) determines whether reports run on projects or products.If included scopes (via-i, --includedTokens) are not specified, the tool runs reports onallscopes.Report data exported by default in binary format (i.e., Excel or PDF) or JSON.Recommended using -o parameter for specifying output-dir. Otherwise, the output stored in the running dir (which is pip install cmd work with, and it depends on your OS)Supported Operating SystemsLinux (Bash):CentOS, Debian, Ubuntu, RedHatWindows (PowerShell):10, 2012, 2016PrerequisitesPython 3.6+Installation and Execution by pulling package from PyPi:Executepip install ws-bulk-report-generatorRun report:ws_bulk_report_generator -u <USER_KEY> -k <ORG_TOKEN> -r <REPORT_NAME> -o <OUTPUT_PATH>Note:  If installing packages as a non-root user, insure to include the path to the executables within the Operating System paths.Examples:Generate Due Diligence Reports (file per product) on all products within an organization in JSON format:ws_bulk_report_generator -u <USER_KEY> -k <ORG_TOKEN> -o <OUTPUT_PATH> -r due_diligence -t jsonGenerate Due Diligence Reports (file per project) on all projects within an organization in JSON format:ws_bulk_report_generator -u <USER_KEY> -k <ORG_TOKEN> -o <OUTPUT_PATH> -s project -r due_diligence -t jsonGenerate Risk Reports (PDF format) on all products (file per product) within an organization:ws_bulk_report_generator -a app-eu -u <USER_KEY> -k <ORG_TOKEN> -o <OUTPUT_PATH> -r riskSearch for log4j 3 recent vulnerabilities in the entire organization and get output in a single unified JSON:ws_bulk_report_generator -a di.whitesourcesoftware.com -u <USER_KEY> -k <ORG_TOKEN> -o <OUTPUT_PATH> -r vulnerability -t unified_json -x vulnerability_names="CVE-2021-45046,CVE-2021-44228,CVE-2021-4104"Note: The output produces only if the specified CVEs were discovered.Generate Inventory report filtered by 'libwebp-dev_0.6.1-2_amd64.deb' and get a unified JSON for the entire organization:ws_bulk_report_generator -u <USER_KEY> -k <ORG_TOKEN> -o <OUTPUT_PATH> -r inventory -t unified_json -x lib_name=libwebp-dev_0.6.1-2_amd64.debGenerate Security Alerts report and get a unified JSON for all organizations within a Global organization (Note: user must be defined in each organization):ws_bulk_report_generator -u <USER_KEY> -k <ORG_TOKEN> -o <OUTPUT_PATH> -r inventory -t unified_json -y globalOrganizationGenerate Vulnerability report and get a unified Excel report on 2 specific products in the organization (-s project means the API calls run on the project level behind the scenes, used when timeouts in the API response):ws_bulk_report_generator -u <USER_KEY>  -k <ORG_TOKEN> -o <OUTPUT_PATH> -r vulnerability -t unified_xlsx -i "<PRODCUCT_TOKEN_1> , <PRODCUCT_TOKEN_2> -s project"NEW!USING ASYNCHRONOUS API for large organizations.Supported reports:inventory,vulnerability,alerts,plugin request historyThe TIMEOUT is 6 minutes, meaning it's checking for the report status READY for 6 min before moving to the next one. If it's not ready in 6 minutes, the tool logs the reportStatusId for manually checking the status (and downloading), and moves along. The timeout will be configurable in the following releases.Generate Vulnerability report using asynchronous API calls in Excel format:ws_bulk_report_generator -u <USER_KEY>  -k <ORG_TOKEN> -o <OUTPUT_PATH> -r vulnerability -t binary -c TrueSearch for log4j 3 recent vulnerabilities in the entire organization using asynchronous API call and get output per each Product in JSON format:ws_bulk_report_generator -u <USER_KEY> -k <ORG_TOKEN> -o <OUTPUT_PATH> -r vulnerability -t json -x vulnerability_names="CVE-2021-45046,CVE-2021-44228,CVE-2021-4104" -c TrueNote: The output produces only if the specified CVEs were discovered.Generate Security Alerts report using asynchronous API calls in Excel format:ws_bulk_report_generator -u <USER_KEY>  -k <ORG_TOKEN> -o <OUTPUT_PATH> -r alerts -t binary -c TrueGenerate Plugin Request history report using asynchronous API calls in Excel format (unlimited results):ws_bulk_report_generator -u <USER_KEY>  -k <ORG_TOKEN> -o <OUTPUT_PATH> -r request_history -t binary -c True -x plugin=TrueGenerate Inventory report using asynchronous API calls in Excel format:ws_bulk_report_generator -u <USER_KEY>  -k <ORG_TOKEN> -o <OUTPUT_PATH> -r inventory -t binary -c TrueFull Usage:usage:ws_bulk_report_generator[-h]-uWS_USER_KEY-kWS_TOKEN[-y{organization,globalOrganization}]-r{alerts,ignored_alerts,resolved_alerts,inventory,lib_dependencies,vulnerability,container_vulnerability,source_files,source_file_inventory,in_house_libraries,in_house,risk,library_location,license_compatibility,due_diligence,attributes,attribution,effective_licenses,bugs,request_history(-xplugin=true)}[-t{unified_json,unified_xlsx,binary,json}][-s{project,product}][-aWS_URL][-oDIR][-xEXTRA_REPORT_ARGS][-iINC_TOKENS][-eEXC_TOKENS][-c{True,False}]MendBulkReportsGenerator

optionalarguments:-h,--helpshowthishelpmessageandexit-uWS_USER_KEY,--userKeyWS_USER_KEYWSUserKey-kWS_TOKEN,--tokenWS_TOKENWSToken-y{organization,globalOrganization},--token_typeWSTokenType-r{alerts,ignored_alerts,resolved_alerts,inventory,lib_dependencies,vulnerability,container_vulnerability,source_files,source_file_inventory,in_house_libraries,in_house,risk,library_location,license_compatibility,due_diligence,attributes,attribution,effective_licenses,bugs,request_history},--reportReportTypetoproduce-t{unified_json,unified_xlsx,binary(i.e.,ExcelorPDF),json},--outputTypeTypeofoutput-s{project,product},--ReportScopeScopeofreport-aWS_URL,--wsUrlWS_URLWSURL-oDIR,--reportDirDIRReportDir-xEXTRA_REPORT_ARGS,--extraReportArgumentsEXTRA_REPORT_ARGSExtraarguments(key=value)topassthereport-iINC_TOKENS,--includedTokensINC_TOKENSIncludedtoken(Default:All)-eEXC_TOKENS,--excludedTokensEXC_TOKENSExcludedtoken(Default:None)-cASYNCR,--asynchronousCallsASYNCRAsynchronousAPI(Default:False)