This document describes the product scanning scenario. It is not expected that end-users set up their project in Mend themselves. The work described here is part of the GEANT Software Composition Analysis (SCA) assistance service. This information is published to provide a deeper understanding of the workflows and functioning of Mend and capture its key elements.
Firstmost, it is necessary to get acquainted with Unified Agent (UA).
The Unified Agent is a Java command-line tool that scans directories' open source components for vulnerable libraries and license complications and displays the results in the Mend web application. The Unified Agent works the following way: directories are scanned to identify the open-source components, whereupon the Unified Agent checks each new component against organizational policies (note that no source code is shared - only descriptive information is sent to Mend).
At the end of the Unified Agent's scan, it aggregates the information and uploads it to the Mend web application, where it is presented in an Organization/Product/Project hierarchy, enabling the user to view and analyze the scan results. Additionally, an informative report of the results is generated in HTML and JSON formats, located in the 'Mend' folder. This folder is created in the directory where the Unified Agent ran.
Java JDK/JRE installation is required in order to run the Unified Agent. The following versions of Java are supported:
Additionally, depending on what you are scanning, ensure that the relevant build tools, package managers, etc. are installed. An overview of project types and corresponding project managers is given here.
Enter the following parameters in the configuration file:
wss.url
:#wss.url=https://saas.whitesourcesoftware.com/agent
#wss.url=https://app.whitesourcesoftware.com/agent
wss.url=https://app-eu.whitesourcesoftware.com/agent (our Mend run under this url)
From the menu bar, select Products > New Product. The Create New Product screen is displayed.
Enter the product name, and click Create.
ProductToken can be retrieved from the 'Integrate' page in your Mend account. In the product, we can define several projects.
Click Add Project.
Enter the project name, and click Create.
After running the scan, the output goes to the project.
Best practices - Mend recommends placing the project and product names in the configuration file (versions are optional). This is preferable for the first-time setup as it automatically creates a new project and product in Mend. If names or versions change rapidly, then use the projectToken and productToken of the existing Mend counterparts.
In the section Polices:
checkPolices=false
; policies are not being checked, as we don't have policies for nowIn section General:
In the section Package Manager Dependency Resolvers, there are all dependencies that UA can scan (#resolveDependencies=false
); they all are comments, so all will be scanned by UA. In GÉANT there are many different projects with many technologies and languages, so it would be safer to scan all dependencies.
To run the Unified Agent from the command line, execute the following command on the machine where your codebase is located:
Linux/macOS:
java -jar /path/to/wss-unified-agent.jar -c /path/to/wss-unified-agent.config -d /path/to/project/root/directory
Windows:
java -jar "C:\path\to\wss-unified-agent.jar" -c "C:\path\to\wss-unified-agent.config" -d "C:\path\to\project\root\directory"
Note: When the scan is done locally, you have to install the software of the project.