Scanning With the Unified Agent in Offline Mode
Overview
It is possible to save the output of the scan into a file instead of sending it directly to Mend by HTTPS. This approach is useful in case there is no connectivity (or limited connectivity) while scanning.
By changing the configuration file to offline mode, any execution of the Unified Agent will store the current configuration and metadata in a JSON .txt file named update-request.txt, located in the newly-created 'mend' directory. It is located under the current working directory ($pwd or %cd%). This file can later be manually uploaded to Mend from the Admin Console or via the command line.
Setting up Offline Mode
Update the wss-unified-agent.config file:
Change the offline property to true.
For very large projects, it's recommended that you add the property offline.zip=true to reduce the size of the created file. This setting enables zipping the content of the output file.
To prettify the output file to JSON format, add the offline.prettyJson=true property.
Uploading an Offline Request File
Upload via command line with configuration file (supported from version 1.8.9):
Before you begin this procedure, ensure these parameters are properly configured:
apiKey
wss.url
projectName
Execute the Unified Agent with the -requestFiles flag specifying the path to the update-request.txt file you created in the previous step. In order to send more than one file, separate file names with a comma.
java -jar <path to wss-unified-agent-*.jar> -c <path of config file> -requestFiles <file-path1>[,<file-path2>]
Upload via command line without configuration file (supported from version 1.8.9):
Execute the Unified Agent with the -requestFiles flag specifying the path to the update-request.txt file you created in the previous step. In order to send more than one file, separate file names with a comma.
java -jar <path to wss-unified-agent-*.jar> -wss.url <mendInstance/agent> -apiKey <apiKey> -productToken <productToken> -project <newProjectName> -requestFiles <pathToUpdate-request.txt> -noConfig true
Mend SCA has a 1 million dependency limit, please note this on file upload.