Versions Compared

Key

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

...

Ensure that you have already integrated the relevant repository platform with WhiteSource. If needed, refer to the installation sections of the relevant platform below:

Enabling the Global Configuration

  1. (Only for Self-Managed integrations) Create a new organization (GitHub Enterprise), Group (Gitlab Server), or Project (Bitbucket Server/Data Center) named whitesource-config (the name must be exactly as specified here) in your integrated repository platform.

  2. Create a new repository named whitesource-config (the name must be exactly as specified here). In Self-Managed integrations, this repository needs to be inside the whitesource-config entity you created in the previous step.

  3. Add the new whitesource-config repository to your integration. Based on your relevant platform, refer to the correct section:

  4. The whitesource-config repository will now contain a README file and two new configuration files (automatically created by the integration), repo-config.json and global-config.json. Configure these files by referring to the following sections and then continue in this procedure.

  5. Add repositories you want WhiteSource to scan, to your integration.

...

This configuration template file is a JSON formatted file that will be applied globally to each newly selected integrated repository. It provides configurable parameters for a WhiteSource scan. All new integrated repositories will inherit the configuration set in this file, unless explicitly overridden by a local .whitesource file in the relevant repository. Refer to the following sections for information on which parameters can be added to the repo-config.json file:

...

This global configuration file is a JSON-formatted file where you can define global configurations for the integration. The following parameters can be provided:

General Parameters

Parameter 

Type

Description

Required 

Default

repoConfigMode

String

The configuration mode to be used on all integrated repositories. There are three options:

  • createOnboardingPR - Create an onboarding PR/MR containing a .whitesource file with inherited configuration. The integrated repositories will inherit the configuration from the repo-config.json file located inside the whitesource-config repository. The .whitesource configuration file generated in each repository will contain a single parameter settingsInheritedFrom with a value pointing to the repo name and branch in which the repo-config.json file is located.

  • pushWhitesourceFile - A .whitesource configuration file with inherited configuration will immediately be pushed to the default branch of all integrated repositories without creating any onboarding PRs/MRs. The .whitesource configuration file generated in each repository will contain a single parameter settingsInheritedFrom with a value pointing to the repo name and branch in which the repo-config.json file is located.

  • noWhitesourceFile - Integrated repositories will be scanned without creating a .whitesource file or onboarding PR/MR. The integrated repositories will inherit the configuration from the repo-config.json file located inside the whitesource-config repository.

Yes

createOnboardingPR

repoConfigFileName

String

It is possible to rename the .whitesource configuration file added to an integrated repository.

NOTES:

  • This is currently only supported for newly-integrated repositories. If a repository already includes a .whitesource file, the integration will continue using it.

  • This parameter is ignored when the repoConfigMode is set to noWhitesourceFile.

No

.whitesource

Ignored Repos (ignoredRepos)

Parameter 

Type

Description

Required 

Default

exactNames

Array

Provide a list of specific repositories to ignore from the integration. For example:

Code Block
"ignoredRepos": {
  "exactNames": ["user/myrepo", "user/testrepo"]
}

No

Empty

...