Use Bitbucket Pipelines to automate local scanning with the CybeDefend CLI. This approach is ideal if you want to keep direct repository access closed and rely on your pipeline to handle code uploads.Documentation Index
Fetch the complete documentation index at: https://docs.cybedefend.com/llms.txt
Use this file to discover all available pages before exploring further.
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.