Prerequisites
- Personal Access Token (PAT): Create it and store in Bitbucket’s Repository Settings → Pipelines → Repository Variables (e.g.,
CYBEDEFEND_PAT). - Bitbucket Pipelines: Enable pipelines in your repository.
Example bitbucket-pipelines.yml
Explanation
- image
ubuntu:latestis sufficient for installing cURL and the CLI. - Install CLI
Similar approach as other platforms. - Run the Scan
Use environment variables$CYBEDEFEND_PATand$CYBEDEFEND_PROJECT_IDdefined in Bitbucket’s pipeline settings.
You can add advanced steps, such as storing results in artifacts or gating merges based on severity thresholds.
Where to Check Results
- Pipeline Logs: The CLI’s console output shows a summary.
- Local Results: Optionally fetch
sariforhtmloutputs in subsequent steps: - CybeDefend Dashboard: Provides a deeper analysis of all vulnerabilities discovered.