...
This page describes how to get started with the Unified Agent.
Prerequisites
Ensure you have one of the following Java versions on the computer on which you want to run the Unified Agent
...
:
Java JDK 8
Java JRE 8
Java JDK 11
...
Java JDK 17
Depending on your project type,
...
make sure that the relevant package
...
manager is installed:
Project Type | Package Manager |
---|---|
C# |
|
Elixir, Erlang | MIX |
Go |
|
Haskell | Cabal |
Java |
|
JavaScript |
|
Objective-C, Swift | CocoaPods - required only if the project is not built |
OCaml | Opam |
PHP | Composer - required only if the project is not built |
Python |
|
R | Packrat - if used |
Ruby | Bundler |
Rust | Cargo - required only if the project is not built |
Scala | SBT |
Unified Agent Usage Overview
Step # | Step Name |
---|---|
1 | Download the latest version of the Unified Agent and verify its integrity. |
2 | |
3 | Do one of the following:
(See execution examples on this page) |
4 |
...
Latest Unified Agent Version | File | Features | Release Date | MD5 | Comments | |
---|---|---|---|---|---|---|
21.1022.4.2 | Release Notes 2122.104.2 | 1415-1105-2021 | 90A989C0D60A70FCC9A62AF2D54F5E9B | N/A | 2022 |
Previous Unified Agent Versions
NOTE: Unified Agent versions will be available and supported for a year after their release.
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Setting Up the Unified Agent
There are several methods for configuring the Unified Agent:
Environment Variables (Recommended)
All the parameters available in the configuration file can be passed to the Unified Agent using environment variables. For more information, refer here.
Configuration File
A configuration file can be passed to the Unified Agent in the command line using the -c argument. If no file is specified, the Unified Agent will look for a configuration file named
wss-unified-agent.config
in the current working directory. Refer here for more information.
It is recommended to create a blank configuration file and only add parameters that you want to change, in order to make use of the default configuration settings. As a reference, please refer here.
Command-line Parameters
The Unified Agent supports command-line options and parameters. For more information refer here.
The configuration is applied in the following order of precedence:
...
Linux/macOS:
export WS_APIKEY=my<your-api-apiKeykey>
export WS_USERKEY=my<your-user-userKeykey>
export WS_PRODUCTNAME=my<your-product-name>
export WS_PROJECTNAME=my<your-project-name>
export WS_WSS_URL=https://saas.whitesourcesoftware.com/agent
java -jar wss-unified-agent.jar
...
Executing the Unified Agent with Inline environment variables:
export WS_APIKEY=my<your-api-apiKeykey>
export WS_USERKEY=my<your-user-userKeykey>
WS_PRODUCTNAME=my<your-product-name> WS_PROJECTNAME=my<your-project-name> java -jar ./wss-unified-agent.jar
...
Executing the Unified Agent on multiple folders or files:
export WS_APIKEY=my<your-api-apiKeykey>
export WS_USERKEY=my<your-user-userKeykey>
export WS_PRODUCTNAME=my<your-product-name>
export WS_PROJECTNAME=my<your-project-name>
java -jar ./wss-unified-agent.jar -d /directory/to/scan,/directory/to/scan2,/file/to/scan
Executing the Unified Agent with a policy check to return an error code in order to break a CI/CD pipeline:
export WS_APIKEY=my<your-api-apiKeykey>
export WS_USERKEY=my<your-user-userKeykey>
export WS_PRODUCTNAME=my<your-product-name>
export WS_PROJECTNAME=my<your-project-name>
export WS_CHECKPOLICIES=true
export WS_FORCECHECKALLDEPENDENCIES=true
export WS_FORCEUPDATE=true
export WS_FORCEUPDATE_FAILBUILDONPOLICYVIOLATION=true
java -jar ./wss-unified-agent.jar
Executing the Unified Agent with a proxy:
export WS_APIKEY=my<your-api-apiKeykey>
export WS_USERKEY=my<your-user-userKeykey>
export WS_PRODUCTNAME=my<your-product-name>
export WS_PROJECTNAME=my<your-project-name>
export WS_PROXY_HOST=my<your-proxy-host-namename>
export WS_PROXY_PORT=my<your-proxy-port-numbernumber>
export WS_PROXY_USER=my<your-proxy-usernameusername>
export WS_PROXY_PASS=my<your-proxy-passwordpassword>
java -jar ./wss-unified-agent.jar
...