Scan Agent Plugins
The following enhancement to Code Insight remote scanning is now available.
Enhance Generic Scan-Agent Plugin Capabilities with New Command-Line Options
This release enhances the functionalities of the generic scan-agent plugin by introducing new command-line options that allow you to generate and download reports as well as to customize the report generation process after a scan. The following are the new command-line options to support these functionalities:
-
-reportType <REPORT_TYPE>—Allows you to specify the name of a Code Insight report that you want to be generated as a part of the scan build process once the scan completes. You can replace the
\<REPORT_TYPE\>variable with the required Code Insight report name. -
-reportDownloadLocation <REPORT_DOWNLOAD_LOCATION>—Allows you to specify the directory where you want the report to be downloaded. You can replace the
\<REPORT_DOWNLOAD_LOCATION\>variable with the required directory. -
- reportOptions <REPORT_OPTION_FILE>—Allows you to specify the directory to the JSON file that includes additional parameters for custom reports. You can replace the
\<REPORT_OPTION_FILE\>variable with the required JSON file directory.- Specifying the JSON file directory allows the generic scan-agent plugin to apply the additional parameters from that file to customize the report generation process.
Example Command
To download a report using the generic scan-agent plugin, run the following command from the command line as a Java application:
java -Dflx.agent.logLevel=info -jar codeinsight-generic-<VERSION>.jar -server "<CODEINSIGHT_SERVER_HOSTNAME>:<PORT>/<CODEINSIGHT_SERVER_PATH>" -token "Bearer <JWT_TOKEN>" -proj "<CODEINSIGHT_PROJECT_NAME>" -root "</path/to/the/codebase>" -scandirs "</path/to/the/codebase/PROJECT>" -alias “<SCAN_AGENT_ALIAS>” -host “<SCAN_AGENT_HOST>”
-Djavax.net.ssl.trustStore="<JAVA_HOME>”\lib\security\cacerts -reportType "<REPORT_TYPE>"
-reportDownloadLocation "<REPORT_DOWNLOAD_LOCATION>" -reportOptions "<REPORT_OPTION_FILE>"
For more information, see “Running the Generic Scan-Agent Plugin” in the Code Insight Plugins Guide.