Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

1. Bamboo plan.

A dedicated Bamboo plan has been created to launch WS scans of NMaaS components at will.

...

Typical content of the run_ws.sh script in provided below. Please note the main scanning script (jar) is run with a number of arguments that are obtained from environment variables that are being set based on the Bamboo plan variables mentioned earlier.

#!/bin/sh

echo "Downloading WhiteSource agent..."

curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar



echo "Running WhiteSource scan..."

java -jar wss-unified-agent.jar -apiKey ${API_KEY} -projectVersion ${PROJECT_VERSION} -projectToken ${PROJECT_TOKEN} -productVersion ${PRODUCT_VERSION} -productToken ${PRODUCT_TOKEN} -c ws.config -d ../

The ws.config file contains the configuration of the scanning process specific to particular software component. Below only few first line are included. Please note that the variables are left blank and the ones provided from the command line are being used.

###############################################################

# WhiteSource Unified-Agent configuration file

###############################################################

# GENERAL SCAN MODE: Files and Package Managers

###############################################################

# Organization vitals

######################



# TO BE PROVIDED AS COMMAND PARAMETER

#apiKey=

#userKey is required if WhiteSource administrator has enabled "Enforce user level access" option

#userKey=

#requesterEmail=user@provider.com



#projectName=

# TO BE PROVIDED AS COMMAND PARAMETER

#projectVersion=

# TO BE PROVIDED AS COMMAND PARAMETER

#projectToken=

#projectTag= key:value



#productName=

# TO BE PROVIDED AS COMMAND PARAMETER

#productVersion=

# TO BE PROVIDED AS COMMAND PARAMETER

#productToken=

3. Running the Bamboo plan.

...