Integrate agents with CircleCI
You can create a Veracode SCA agent that scans your repositories as an automated task in your CircleCI pipeline.
This config.yml file includes a sample command for running an agent-based scan in a CircleCI pipeline.
Prerequisites
Depending on the build and package managers your repositories use, your agent host has specific requirements depending on the language scanned. To view the requirements, see the code language in Finding and fixing vulnerabilities.
Create your authentication token
By default, the agent you create is only visible to members of the workspace in which you created the agent. To allow visibility, invite teams to your workspace.
To complete this task:
- In the Veracode Platform, select Scans & Analysis > Software Composition Analysis.
- Select Agent-Based Scan.
- Select a workspace.
- Select Agents > Actions > Create > Circle CI.
- Select Create Agent & Generate Token.
- Copy the value in the token field. You use the token to authenticate with Veracode SCA during scans.
Configure your environment variable
You can set an environment variable for each repository you want to scan.
To complete this task:
- Select the repository where you want to scan your CircleCI environment.
- Go to Project Settings > Environment Variables.
- Select Add Variable.
- For Name, enter
SRCCLR_API_TOKEN. - For Value, enter your agent token value.
- Verify the Display value in build log is set to OFF to ensure your token is hidden.
- Select Add Variable.