Whitesource scan (MVP) (#1658)
* Whitesource MVP for Gradle, Golang, and NPM/Yarn
* Refactoring
* Refactor and cleanup, better error checking
* publish stepResults, use pkg/versioning, bubble up errors, add gomod versioning support
* Run gofmt and cleanup comments
* Resolve PR comments
* Update resources/metadata/whitesource.yaml
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Only determine project coordinates if they are missing
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Gradle versioning artifact
* fix gradle artifact version regexp and refactor
* Fix token extraction from output buffer
* Fix some issues with pip and jsonfile versioning logic
* Remove useless spacing
* Remove unnecessary test file and fix naming style for JSONDescriptor
* Automatically download wss-unified-agent if file does not exist
* adds downloadVulnerabilityReport, checkSecurityViolations, minor refactoring
* adds config.ReportDirectoryName, improves readability
* Version-wide reporting for vulnerabilities and list of libraries.
* Refactor and improve build accuracy
* fix sed command
* Add includes file pattern config option
* Adds --exclude command line flag
* run go mod tidy and regenerate step framework
* Fix unit tests
* revert changes
* poll project status before downloading reports
* merge with master
* go mod tidy, go fmt, and fix whitesource unit test
* sync go.mod
* sync go.mod again
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-01 07:54:13 +02:00
metadata :
2020-08-31 16:10:28 +02:00
name : whitesourceExecuteScan
2022-11-09 13:04:10 +02:00
description : Execute a Mend (formerly known as WhiteSource) scan
2020-08-31 16:10:28 +02:00
longDescription : |-
2022-11-09 13:04:10 +02:00
With this step [Mend](https://www.mend.io/) (formerly known as Whitesource) security and license compliance scans can be executed and assessed.
Mend is a Software as a Service offering based on a so called unified agent that locally determines the dependency
2020-08-31 16:10:28 +02:00
tree of a node.js, Java, Python, Ruby, or Scala based solution and sends it to the WhiteSource server for a policy based license compliance
check and additional Free and Open Source Software Publicly Known Vulnerabilities detection.
2021-02-03 15:52:48 +02:00
2022-11-09 13:04:10 +02:00
The step uses the so-called Mend Unified Agent. For details please refer to the [Mend Unified Agent Documentation](https://docs.mend.io/bundle/unified_agent/page/overview_of_the_unified_agent.html).
2021-02-03 15:52:48 +02:00
2020-08-31 16:10:28 +02:00
!!! note "Docker Images"
The underlying Docker images are public and specific to the solution's programming language(s) and therefore may have to be exchanged
to fit to and support the relevant scenario. The default Python environment used is i.e. Python 3 based.
Whitesource scan (MVP) (#1658)
* Whitesource MVP for Gradle, Golang, and NPM/Yarn
* Refactoring
* Refactor and cleanup, better error checking
* publish stepResults, use pkg/versioning, bubble up errors, add gomod versioning support
* Run gofmt and cleanup comments
* Resolve PR comments
* Update resources/metadata/whitesource.yaml
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Only determine project coordinates if they are missing
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Gradle versioning artifact
* fix gradle artifact version regexp and refactor
* Fix token extraction from output buffer
* Fix some issues with pip and jsonfile versioning logic
* Remove useless spacing
* Remove unnecessary test file and fix naming style for JSONDescriptor
* Automatically download wss-unified-agent if file does not exist
* adds downloadVulnerabilityReport, checkSecurityViolations, minor refactoring
* adds config.ReportDirectoryName, improves readability
* Version-wide reporting for vulnerabilities and list of libraries.
* Refactor and improve build accuracy
* fix sed command
* Add includes file pattern config option
* Adds --exclude command line flag
* run go mod tidy and regenerate step framework
* Fix unit tests
* revert changes
* poll project status before downloading reports
* merge with master
* go mod tidy, go fmt, and fix whitesource unit test
* sync go.mod
* sync go.mod again
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-01 07:54:13 +02:00
spec :
inputs :
2020-09-23 13:22:51 +02:00
secrets :
- name : userTokenCredentialsId
2020-11-02 09:51:58 +02:00
aliases :
- name : whitesourceUserTokenCredentialsId
2021-02-03 15:52:48 +02:00
- name : whitesource/userTokenCredentialsId
deprecated : true
2020-09-23 13:22:51 +02:00
description : Jenkins 'Secret text' credentials ID containing Whitesource user token.
type : jenkins
- name : orgAdminUserTokenCredentialsId
2020-11-02 09:51:58 +02:00
aliases :
- name : whitesourceOrgAdminUserTokenCredentialsId
2021-02-03 15:52:48 +02:00
- name : whitesource/orgAdminUserTokenCredentialsId
deprecated : true
2020-09-23 13:22:51 +02:00
description : Jenkins 'Secret text' credentials ID containing Whitesource org admin token.
type : jenkins
2021-10-25 09:07:46 +02:00
- name : dockerConfigJsonCredentialsId
description : Jenkins 'Secret file' credentials ID containing Docker config.json (with registry credential(s)). You can find more details about the Docker credentials in the [Docker documentation](https://docs.docker.com/engine/reference/commandline/login/).
type : jenkins
aliases :
- name : dockerCredentialsId
deprecated : true
2022-02-23 10:30:19 +02:00
- name : githubTokenCredentialsId
description : Jenkins 'Secret text' credentials ID containing token to authenticate to GitHub.
type : jenkins
Whitesource scan (MVP) (#1658)
* Whitesource MVP for Gradle, Golang, and NPM/Yarn
* Refactoring
* Refactor and cleanup, better error checking
* publish stepResults, use pkg/versioning, bubble up errors, add gomod versioning support
* Run gofmt and cleanup comments
* Resolve PR comments
* Update resources/metadata/whitesource.yaml
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Only determine project coordinates if they are missing
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Gradle versioning artifact
* fix gradle artifact version regexp and refactor
* Fix token extraction from output buffer
* Fix some issues with pip and jsonfile versioning logic
* Remove useless spacing
* Remove unnecessary test file and fix naming style for JSONDescriptor
* Automatically download wss-unified-agent if file does not exist
* adds downloadVulnerabilityReport, checkSecurityViolations, minor refactoring
* adds config.ReportDirectoryName, improves readability
* Version-wide reporting for vulnerabilities and list of libraries.
* Refactor and improve build accuracy
* fix sed command
* Add includes file pattern config option
* Adds --exclude command line flag
* run go mod tidy and regenerate step framework
* Fix unit tests
* revert changes
* poll project status before downloading reports
* merge with master
* go mod tidy, go fmt, and fix whitesource unit test
* sync go.mod
* sync go.mod again
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-01 07:54:13 +02:00
params :
2021-02-03 15:52:48 +02:00
- name : agentDownloadUrl
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "URL used to download the latest version of the WhiteSource Unified Agent."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
- name : agentFileName
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "Locally used name for the Unified Agent jar file after download."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : "wss-unified-agent.jar"
- name : agentParameters
type : "[]string"
description : "[NOT IMPLEMENTED] List of additional parameters passed to the Unified Agent command line."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : agentUrl
2021-12-03 13:16:31 +02:00
aliases :
2021-02-03 15:52:48 +02:00
- name : whitesourceAgentUrl
type : string
description : "URL to the WhiteSource agent endpoint."
2020-08-31 16:10:28 +02:00
scope :
2021-02-03 15:52:48 +02:00
- GENERAL
2020-08-31 16:10:28 +02:00
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : "https://saas.whitesourcesoftware.com/agent"
- name : aggregateVersionWideReport
2020-08-31 16:10:28 +02:00
type : bool
2022-10-18 09:48:07 +02:00
description :
"This does not run a scan, instead just generated a report for all projects with
2021-02-03 15:52:48 +02:00
projectVersion = config.ProductVersion"
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2022-08-09 13:56:01 +02:00
- name : assessmentFile
type : string
description : "Explicit path to the assessment YAML file."
scope :
- PARAMETERS
- STAGES
- STEPS
default : "hs-assessments.yaml"
2021-02-03 15:52:48 +02:00
- name : buildDescriptorExcludeList
type : "[]string"
description : "List of build descriptors and therefore modules to exclude from the scan and assessment activities."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-04-22 12:55:35 +02:00
default : [ "unit-tests/pom.xml" , "integration-tests/pom.xml" ]
2021-02-03 15:52:48 +02:00
- name : buildDescriptorFile
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "Explicit path to the build descriptor file."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : buildTool
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "Defines the tool which is used for building the artifact."
mandatory : true
2020-08-31 16:10:28 +02:00
scope :
2021-02-03 15:52:48 +02:00
- GENERAL
2020-08-31 16:10:28 +02:00
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
resourceRef :
- name : commonPipelineEnvironment
param : buildTool
- name : configFilePath
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "Explicit path to the WhiteSource Unified Agent configuration file."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : ./wss-unified-agent.config
2021-11-15 08:48:40 +02:00
- name : containerRegistryPassword
description : "For `buildTool: docker`: Password for container registry access - typically provided by the CI/CD environment."
type : string
scope :
- PARAMETERS
- STAGES
- STEPS
secret : true
resourceRef :
2022-03-17 09:01:00 +02:00
- name : commonPipelineEnvironment
param : container/repositoryPassword
2021-11-15 08:48:40 +02:00
- name : commonPipelineEnvironment
param : custom/repositoryPassword
- name : containerRegistryUser
description : "For `buildTool: docker`: Username for container registry access - typically provided by the CI/CD environment."
type : string
scope :
- PARAMETERS
- STAGES
- STEPS
secret : true
resourceRef :
2022-03-17 09:01:00 +02:00
- name : commonPipelineEnvironment
param : container/repositoryUsername
2021-11-15 08:48:40 +02:00
- name : commonPipelineEnvironment
param : custom/repositoryUsername
2021-02-03 15:52:48 +02:00
- name : createProductFromPipeline
2020-08-31 16:10:28 +02:00
type : bool
2022-10-18 09:48:07 +02:00
description :
"Whether to create the related WhiteSource product on the fly based on the supplied pipeline
2021-02-03 15:52:48 +02:00
configuration."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : true
2021-02-10 17:18:00 +02:00
- name : customScanVersion
type : string
description : Custom version of the WhiteSource project used as source.
longDescription : |-
2021-05-05 10:24:05 +02:00
Defines a custom version for the WhiteSource scan which deviates from the typical versioning pattern using [`version`](#version) and [`versioningModel`](#versioningModel).
2021-02-10 17:18:00 +02:00
It allows to set non-numeric versions as well and supersedes the value of [`version`](#version) which is calculated automatically.
2021-05-05 10:24:05 +02:00
The parameter is also used by other scan steps (e.g. Detect, Fortify, Sonar) and thus allows a common custom version across scan tools.
2021-02-10 17:18:00 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : cvssSeverityLimit
2020-08-31 16:10:28 +02:00
type : string
2021-04-15 19:15:59 +02:00
description : "Limit of tolerable CVSS v3 score upon assessment and in consequence fails the build."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : "-1"
2021-05-03 10:53:16 +02:00
- name : scanPath
type : string
description : "Directory where to start WhiteSource scan."
scope :
- PARAMETERS
- STAGES
- STEPS
default : "."
2021-10-25 09:07:46 +02:00
- name : dockerConfigJSON
type : string
description : Path to the file `.docker/config.json` - this is typically provided by your CI/CD system. You can find more details about the Docker credentials in the [Docker documentation](https://docs.docker.com/engine/reference/commandline/login/).
scope :
- PARAMETERS
- STAGES
- STEPS
secret : true
resourceRef :
- name : commonPipelineEnvironment
param : custom/dockerConfigJSON
- name : dockerConfigJsonCredentialsId
type : secret
- type : vaultSecretFile
name : dockerConfigFileVaultSecretName
default : docker-config
2021-02-03 15:52:48 +02:00
- name : emailAddressesOfInitialProductAdmins
type : "[]string"
description : "The list of email addresses to assign as product admins for newly created WhiteSource products."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : excludes
type : "[]string"
description : List of file path patterns to exclude in the scan.
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2022-07-12 11:43:24 +02:00
- name : failOnSevereVulnerabilities
type : bool
description : Whether to fail the step on severe vulnerabilties or not
scope :
- PARAMETERS
default : true
2021-02-03 15:52:48 +02:00
- name : includes
2020-08-31 16:10:28 +02:00
type : "[]string"
2021-02-03 15:52:48 +02:00
description : List of file path patterns to include in the scan.
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : installCommand
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "[NOT IMPLEMENTED] Install command that can be used to populate the default docker image for some scenarios."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : jreDownloadUrl
aliases :
- name : whitesource/jreDownloadUrl
deprecated : true
2020-08-31 16:10:28 +02:00
type : string
2022-10-18 09:48:07 +02:00
description :
"URL used for downloading the Java Runtime Environment (JRE) required to run the
2021-02-03 15:52:48 +02:00
WhiteSource Unified Agent."
2020-08-31 16:10:28 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jre-11.0.2_linux-x64_bin.tar.gz"
2020-08-31 16:10:28 +02:00
- name : licensingVulnerabilities
type : bool
2020-10-29 10:21:01 +02:00
description : "[NOT IMPLEMENTED] Whether license compliance is considered and reported as part of the assessment."
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
default : true
2021-02-03 15:52:48 +02:00
- name : orgToken
aliases :
- name : whitesourceOrgToken
- name : whitesource/orgToken
deprecated : true
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "WhiteSource token identifying your organization."
2020-08-31 16:10:28 +02:00
scope :
2021-02-03 15:52:48 +02:00
- GENERAL
2020-08-31 16:10:28 +02:00
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
secret : true
mandatory : true
resourceRef :
- name : orgAdminUserTokenCredentialsId
type : secret
2022-03-08 09:59:12 +02:00
- type : vaultSecret
name : whitesourceVaultSecret
default : whitesource
2021-02-03 15:52:48 +02:00
- name : productName
aliases :
- name : whitesourceProductName
- name : whitesource/productName
deprecated : true
2020-08-31 16:10:28 +02:00
type : string
2022-10-18 09:48:07 +02:00
description :
"Name of the WhiteSource product used for results aggregation.
2021-02-03 15:52:48 +02:00
This parameter is mandatory if the parameter `createProductFromPipeline` is set to `true`
and the WhiteSource product does not yet exist.
It is also mandatory if the parameter `productToken` is not provided."
2020-08-31 16:10:28 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : productToken
aliases :
- name : whitesourceProductToken
- name : whitesource/productToken
deprecated : true
2020-08-31 16:10:28 +02:00
type : string
2022-10-18 09:48:07 +02:00
description :
"Token of the WhiteSource product to be created and used for results aggregation,
2021-02-03 15:52:48 +02:00
usually determined automatically. Can optionally be provided as an alternative to `productName`."
2020-08-31 16:10:28 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
2021-02-10 17:18:00 +02:00
- name : version
2020-11-02 09:51:58 +02:00
aliases :
2021-02-10 17:18:00 +02:00
- name : productVersion
2021-02-03 15:52:48 +02:00
- name : whitesourceProductVersion
- name : whitesource/productVersion
deprecated : true
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : Version of the WhiteSource product to be created and used for results aggregation.
longDescription : |-
Version of the WhiteSource product to be created and used for results aggregation.
This is usually determined automatically based on the information in the buildTool specific build descriptor file.
2020-08-31 16:10:28 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
2021-02-10 17:18:00 +02:00
resourceRef :
- name : commonPipelineEnvironment
param : artifactVersion
2020-08-31 16:10:28 +02:00
- name : projectName
aliases :
- name : whitesourceProjectName
type : string
2022-10-18 09:48:07 +02:00
description :
"The project name used for reporting results in WhiteSource.
2020-10-29 10:21:01 +02:00
When provided, all source modules will be scanned into one aggregated WhiteSource project.
For scan types `maven`, `mta`, `npm`, the default is to generate one WhiteSource project per module,
whereas the project name is derived from the module's build descriptor.
For NPM modules, project aggregation is not supported, the last scanned NPM module will override all
previously aggregated scan results!"
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
- name : projectToken
type : string
2022-10-18 09:48:07 +02:00
description :
"Project token to execute scan on. Ignored for scan types `maven`, `mta` and `npm`.
2020-10-29 10:21:01 +02:00
Used for project aggregation when scanning with the Unified Agent and can be provided as an
alternative to `projectName`."
2020-08-31 16:10:28 +02:00
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : reporting
type : bool
description : "Whether assessment is being done at all, defaults to `true`"
scope :
- PARAMETERS
- STAGES
- STEPS
default : true
- name : scanImage
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "For `buildTool: docker`: Defines the docker image which should be scanned."
2021-07-23 11:03:39 +02:00
resourceRef :
- name : commonPipelineEnvironment
param : container/imageNameTag
2021-02-03 15:52:48 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
- name : scanImageRegistryUrl
type : string
description : "For `buildTool: docker`: Defines the registry where the scanImage is located."
2021-07-23 11:03:39 +02:00
resourceRef :
- name : commonPipelineEnvironment
param : container/registryUrl
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- name : securityVulnerabilities
type : bool
description : "Whether security compliance is considered and reported as part of the assessment."
scope :
- PARAMETERS
- STAGES
- STEPS
default : true
- name : serviceUrl
aliases :
- name : whitesourceServiceUrl
- name : whitesource/serviceUrl
deprecated : true
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "URL to the WhiteSource API endpoint."
2020-08-31 16:10:28 +02:00
scope :
2021-02-03 15:52:48 +02:00
- GENERAL
2020-08-31 16:10:28 +02:00
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : "https://saas.whitesourcesoftware.com/api"
- name : timeout
type : int
description : "Timeout in seconds until an HTTP call is forcefully terminated."
scope :
- PARAMETERS
- STAGES
- STEPS
default : 900
- name : userToken
2020-08-31 16:10:28 +02:00
type : string
2021-02-10 17:18:00 +02:00
description : User token to access WhiteSource. In Jenkins use case this is automatically filled through the credentials.
2020-08-31 16:10:28 +02:00
scope :
2021-02-03 15:52:48 +02:00
- GENERAL
2020-08-31 16:10:28 +02:00
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
secret : true
mandatory : true
resourceRef :
- name : userTokenCredentialsId
type : secret
2021-02-10 17:18:00 +02:00
- type : vaultSecret
2021-09-21 13:06:32 +02:00
name : whitesourceVaultSecret
default : whitesource
2021-02-03 15:52:48 +02:00
- name : versioningModel
2020-08-31 16:10:28 +02:00
type : string
2022-10-18 09:48:07 +02:00
description :
"The default project versioning model used in case `projectVersion` parameter is
2021-02-03 15:52:48 +02:00
empty for creating the version based on the build descriptor version to report results in
Whitesource, can be one of `'major'`, `'major-minor'`, `'semantic'`, `'full'`"
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
- GENERAL
default : "major"
2020-12-21 14:16:38 +02:00
aliases :
2021-02-03 15:52:48 +02:00
- name : defaultVersioningModel
- name : vulnerabilityReportFormat
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "Format of the file the vulnerability report is written to."
possibleValues : [ xlsx, json, xml]
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : xlsx
- name : vulnerabilityReportTitle
2020-08-31 16:10:28 +02:00
type : string
2021-02-03 15:52:48 +02:00
description : "Title of vulnerability report written during the assessment phase."
2020-09-18 11:54:45 +02:00
scope :
- PARAMETERS
- STAGES
- STEPS
2021-02-03 15:52:48 +02:00
default : "WhiteSource Security Vulnerability Report"
2020-09-18 11:54:45 +02:00
# Global maven settings, should be added to all maven steps
- name : projectSettingsFile
type : string
description : "Path to the mvn settings file that should be used as project settings file."
scope :
- GENERAL
- STEPS
- STAGES
- PARAMETERS
aliases :
- name : maven/projectSettingsFile
- name : globalSettingsFile
type : string
description : "Path to the mvn settings file that should be used as global settings file."
scope :
- GENERAL
- STEPS
- STAGES
- PARAMETERS
aliases :
- name : maven/globalSettingsFile
- name : m2Path
type : string
description : "Path to the location of the local repository that should be used."
scope :
- GENERAL
- STEPS
- STAGES
- PARAMETERS
aliases :
- name : maven/m2Path
2020-10-30 16:05:14 +02:00
- name : installArtifacts
type : bool
description :
"If enabled, it will install all artifacts to the local maven repository to make them available before running whitesource.
This is required if any maven module has dependencies to other modules in the repository and they were not installed before."
scope :
- GENERAL
- STEPS
- STAGES
- PARAMETERS
2020-09-18 11:54:45 +02:00
# Global npm settings, should be added to all npm steps
- name : defaultNpmRegistry
type : string
description : "URL of the npm registry to use. Defaults to https://registry.npmjs.org/"
2020-08-31 16:10:28 +02:00
scope :
- PARAMETERS
2020-09-18 11:54:45 +02:00
- GENERAL
2020-08-31 16:10:28 +02:00
- STAGES
- STEPS
2020-09-18 11:54:45 +02:00
aliases :
- name : npm/defaultNpmRegistry
2022-02-23 10:30:19 +02:00
- name : githubToken
description : "GitHub personal access token as per
https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line"
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type : string
secret : true
aliases :
- name : access_token
resourceRef :
- name : githubTokenCredentialsId
type : secret
- type : vaultSecret
default : github
name : githubVaultSecretName
- name : createResultIssue
type : bool
2022-03-17 09:01:00 +02:00
description : Activate creation of a result issue in GitHub.
longDescription : |
Whether the step creates a GitHub issue containing the scan results in the originating repo.
Since optimized pipelines are headless the creation is implicitly activated for scheduled runs.
2022-02-23 10:30:19 +02:00
resourceRef :
- name : commonPipelineEnvironment
2022-03-31 10:52:54 +02:00
param : custom/isOptimizedAndScheduled
2022-02-23 10:30:19 +02:00
scope :
2022-03-30 12:20:51 +02:00
- GENERAL
2022-02-23 10:30:19 +02:00
- PARAMETERS
- STAGES
- STEPS
default : false
- name : githubApiUrl
description : "Set the GitHub API URL."
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
type : string
default : "https://api.github.com"
- name : owner
aliases :
- name : githubOrg
description : "Set the GitHub organization."
resourceRef :
- name : commonPipelineEnvironment
param : github/owner
scope :
2022-03-30 12:20:51 +02:00
- GENERAL
2022-02-23 10:30:19 +02:00
- PARAMETERS
- STAGES
- STEPS
type : string
- name : repository
aliases :
- name : githubRepo
description : "Set the GitHub repository."
resourceRef :
- name : commonPipelineEnvironment
param : github/repository
scope :
2022-03-30 12:20:51 +02:00
- GENERAL
2022-02-23 10:30:19 +02:00
- PARAMETERS
- STAGES
- STEPS
type : string
- name : assignees
description : Defines the assignees for the Github Issue created/updated with the results of the scan as a list of login names.
scope :
- PARAMETERS
- STAGES
- STEPS
type : "[]string"
default : [ ]
mandatory : false
- name : customTlsCertificateLinks
type : "[]string"
description : "List of download links to custom TLS certificates. This is required to ensure trusted connections to instances with repositories (like nexus) when publish flag is set to true."
scope :
- GENERAL
- PARAMETERS
- STAGES
- STEPS
Whitesource scan (MVP) (#1658)
* Whitesource MVP for Gradle, Golang, and NPM/Yarn
* Refactoring
* Refactor and cleanup, better error checking
* publish stepResults, use pkg/versioning, bubble up errors, add gomod versioning support
* Run gofmt and cleanup comments
* Resolve PR comments
* Update resources/metadata/whitesource.yaml
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Only determine project coordinates if they are missing
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Gradle versioning artifact
* fix gradle artifact version regexp and refactor
* Fix token extraction from output buffer
* Fix some issues with pip and jsonfile versioning logic
* Remove useless spacing
* Remove unnecessary test file and fix naming style for JSONDescriptor
* Automatically download wss-unified-agent if file does not exist
* adds downloadVulnerabilityReport, checkSecurityViolations, minor refactoring
* adds config.ReportDirectoryName, improves readability
* Version-wide reporting for vulnerabilities and list of libraries.
* Refactor and improve build accuracy
* fix sed command
* Add includes file pattern config option
* Adds --exclude command line flag
* run go mod tidy and regenerate step framework
* Fix unit tests
* revert changes
* poll project status before downloading reports
* merge with master
* go mod tidy, go fmt, and fix whitesource unit test
* sync go.mod
* sync go.mod again
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-01 07:54:13 +02:00
resources :
2020-08-31 16:10:28 +02:00
- name : buildDescriptor
type : stash
- name : opensourceConfiguration
type : stash
- name : checkmarx
type : stash
2020-11-02 09:51:58 +02:00
outputs :
resources :
- name : commonPipelineEnvironment
type : piperEnvironment
params :
- name : custom/whitesourceProjectNames
type : "[]string"
2021-03-10 17:00:53 +02:00
- name : influx
type : influx
params :
2021-03-18 11:32:03 +02:00
- name : step_data
fields :
- name : whitesource
type : bool
2021-03-10 17:00:53 +02:00
- name : whitesource_data
fields :
- name : vulnerabilities
type : int
- name : major_vulnerabilities
type : int
- name : minor_vulnerabilities
type : int
- name : policy_violations
type : int
2022-02-21 10:51:52 +02:00
- name : reports
type : reports
params :
- filePattern : "**/whitesource-ip.json"
type : whitesource-ip
2023-01-05 14:37:03 +02:00
- filePattern : "**/*risk-report.pdf"
2022-02-21 10:51:52 +02:00
type : whitesource-ip
- filePattern : "**/toolrun_whitesource_*.json"
type : whitesource-ip
- filePattern : "**/piper_whitesource_vulnerability_report.html"
type : whitesource-security
2023-01-05 14:37:03 +02:00
- filePattern : "**/*risk-report.pdf"
2022-02-21 10:51:52 +02:00
type : whitesource-security
- filePattern : "**/toolrun_whitesource_*.json"
type : whitesource-security
2022-10-18 09:48:07 +02:00
- filePattern : "**/piper_whitesource_vulnerability.sarif"
type : whitesource-security
2022-11-17 12:05:27 +02:00
- filePattern : "**/piper_whitesource_sbom.xml"
type : whitesource-security
2020-08-31 16:10:28 +02:00
containers :
2021-02-03 15:52:48 +02:00
- image : buildpack-deps:stretch-curl
workingDir : /tmp
env : [ ]
conditions :
- conditionRef : strings-equal
params :
- name : buildTool
value : dub
- name : buildTool
value : docker
2021-11-15 15:04:16 +02:00
- image : devxci/mbtci-java11-node14
2020-11-27 12:39:21 +02:00
workingDir : /home/mta
2021-04-22 12:55:35 +02:00
env : [ ]
2020-11-26 11:45:47 +02:00
conditions :
2021-02-03 15:52:48 +02:00
- conditionRef : strings-equal
params :
- name : buildTool
value : mta
- image : golang:1
workingDir : /go
env : [ ]
2022-03-22 11:40:33 +02:00
options :
- name : -u
value : "0"
2021-02-03 15:52:48 +02:00
conditions :
- conditionRef : strings-equal
params :
- name : buildTool
2021-02-10 17:18:00 +02:00
value : golang
2022-03-11 09:18:21 +02:00
- image : gradle
workingDir : /home/gradle
env : [ ]
conditions :
- conditionRef : strings-equal
params :
- name : buildTool
value : gradle
2021-02-03 15:52:48 +02:00
- image : hseeberger/scala-sbt:8u181_2.12.8_1.2.8
workingDir : /tmp
env : [ ]
conditions :
- conditionRef : strings-equal
params :
- name : buildTool
value : sbt
2020-08-31 16:10:28 +02:00
- image : maven:3.5-jdk-8
2021-02-03 15:52:48 +02:00
workingDir : /tmp
2020-08-31 16:10:28 +02:00
env : [ ]
Whitesource scan (MVP) (#1658)
* Whitesource MVP for Gradle, Golang, and NPM/Yarn
* Refactoring
* Refactor and cleanup, better error checking
* publish stepResults, use pkg/versioning, bubble up errors, add gomod versioning support
* Run gofmt and cleanup comments
* Resolve PR comments
* Update resources/metadata/whitesource.yaml
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Only determine project coordinates if they are missing
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Gradle versioning artifact
* fix gradle artifact version regexp and refactor
* Fix token extraction from output buffer
* Fix some issues with pip and jsonfile versioning logic
* Remove useless spacing
* Remove unnecessary test file and fix naming style for JSONDescriptor
* Automatically download wss-unified-agent if file does not exist
* adds downloadVulnerabilityReport, checkSecurityViolations, minor refactoring
* adds config.ReportDirectoryName, improves readability
* Version-wide reporting for vulnerabilities and list of libraries.
* Refactor and improve build accuracy
* fix sed command
* Add includes file pattern config option
* Adds --exclude command line flag
* run go mod tidy and regenerate step framework
* Fix unit tests
* revert changes
* poll project status before downloading reports
* merge with master
* go mod tidy, go fmt, and fix whitesource unit test
* sync go.mod
* sync go.mod again
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-01 07:54:13 +02:00
conditions :
2021-02-03 15:52:48 +02:00
- conditionRef : strings-equal
params :
- name : buildTool
value : maven
2022-09-26 14:40:55 +02:00
- image : node:lts-buster
2020-08-31 16:10:28 +02:00
workingDir : /home/node
env : [ ]
Whitesource scan (MVP) (#1658)
* Whitesource MVP for Gradle, Golang, and NPM/Yarn
* Refactoring
* Refactor and cleanup, better error checking
* publish stepResults, use pkg/versioning, bubble up errors, add gomod versioning support
* Run gofmt and cleanup comments
* Resolve PR comments
* Update resources/metadata/whitesource.yaml
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Only determine project coordinates if they are missing
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Gradle versioning artifact
* fix gradle artifact version regexp and refactor
* Fix token extraction from output buffer
* Fix some issues with pip and jsonfile versioning logic
* Remove useless spacing
* Remove unnecessary test file and fix naming style for JSONDescriptor
* Automatically download wss-unified-agent if file does not exist
* adds downloadVulnerabilityReport, checkSecurityViolations, minor refactoring
* adds config.ReportDirectoryName, improves readability
* Version-wide reporting for vulnerabilities and list of libraries.
* Refactor and improve build accuracy
* fix sed command
* Add includes file pattern config option
* Adds --exclude command line flag
* run go mod tidy and regenerate step framework
* Fix unit tests
* revert changes
* poll project status before downloading reports
* merge with master
* go mod tidy, go fmt, and fix whitesource unit test
* sync go.mod
* sync go.mod again
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-01 07:54:13 +02:00
conditions :
2020-08-31 16:10:28 +02:00
- conditionRef : strings-equal
params :
2021-02-03 15:52:48 +02:00
- name : buildTool
2020-08-31 16:10:28 +02:00
value : npm
2021-02-03 15:52:48 +02:00
- image : python:3.6-stretch
workingDir : /tmp
2020-08-31 16:10:28 +02:00
env : [ ]
Whitesource scan (MVP) (#1658)
* Whitesource MVP for Gradle, Golang, and NPM/Yarn
* Refactoring
* Refactor and cleanup, better error checking
* publish stepResults, use pkg/versioning, bubble up errors, add gomod versioning support
* Run gofmt and cleanup comments
* Resolve PR comments
* Update resources/metadata/whitesource.yaml
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* Only determine project coordinates if they are missing
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
* Gradle versioning artifact
* fix gradle artifact version regexp and refactor
* Fix token extraction from output buffer
* Fix some issues with pip and jsonfile versioning logic
* Remove useless spacing
* Remove unnecessary test file and fix naming style for JSONDescriptor
* Automatically download wss-unified-agent if file does not exist
* adds downloadVulnerabilityReport, checkSecurityViolations, minor refactoring
* adds config.ReportDirectoryName, improves readability
* Version-wide reporting for vulnerabilities and list of libraries.
* Refactor and improve build accuracy
* fix sed command
* Add includes file pattern config option
* Adds --exclude command line flag
* run go mod tidy and regenerate step framework
* Fix unit tests
* revert changes
* poll project status before downloading reports
* merge with master
* go mod tidy, go fmt, and fix whitesource unit test
* sync go.mod
* sync go.mod again
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-07-01 07:54:13 +02:00
conditions :
2020-08-31 16:10:28 +02:00
- conditionRef : strings-equal
params :
2021-02-03 15:52:48 +02:00
- name : buildTool
value : pip
2022-09-26 14:40:55 +02:00
- image : node:lts-buster
2021-03-24 17:33:32 +02:00
workingDir : /home/node
env : [ ]
conditions :
- conditionRef : strings-equal
params :
- name : buildTool
value : yarn