Bitbucket Pipeline
Last updated
Was this helpful?
Last updated
Was this helpful?
Mobb can be integrated into any CI/CD platform of your choice. This guide will demonstrate the integration process with Bitbucket Pipeline.
In your bitbucket environment, first go to your repository, followed by Repository Settings -> Repository Variables.
In this sample integration, we are using Snyk as our SAST tool, however, you may use any SAST report that Mobb supports. See system requirements for more details on the SAST tools Mobb support today.
The next step is to configure your Bitbucket Pipeline. To create a new pipeline, go to your repository and select Pipelines. Click Click Create your first pipeline to scroll down to the template section.
Click on Starter pipeline.
Insert the following YAML:
You are now fully configured to run Snyk on every pull request and provide the SAST report to Mobb to generate fixes.
The YAML is configured to publish the Mobb report link to the Report section of your pipeline. To view your Mobb report link, first go to Pipelines. Look for the Reports link as shown:
After the Report list opens, look for Mobb report on the left hand side, then click on the Mobb Report link.
This will effectively take you to the relevant Mobb report which you can proceed to commit the fixes back into your Bitbucket repository.
SNYK_API_TOKEN
- Snyk's API token. Click to find out how to generate one.
MOBB_API_TOKEN
- Mobb's API Token. Click to find out how to generate one.
BITBUCKET_ACCESS_TOKEN
- Your Bitbucket's Access Token. Click to find out how to generate one. Ensure you have at least repository: write
access.