Configure Your GitLab CI Environment Variable

Veracode Software Composition Analysis

Setting an environment variable in GitLab CI occurs on a per repository basis. This example demonstrates how to create a variable for your API token.

  1. In your GitLab environment select the project you want to scan.
  2. Go to Settings > CI/CD.
  3. Click Expand in the Variables section.
  4. In the Key field, enter SRCCLR_API_TOKEN.
  5. In the Value field, enter your SourceClear API token.
  6. Select the State and Masked values you want for your variable.
    Note: Veracode recommends masking the variable and, if you use protected variables, protecting it.

    GitLab Variables section
  7. Click Save variables.
You can create an environment variable for your project URL to allow the enabling of automatic pull requests.