Bitbucket Pipelines Integration
EasyAudit integrates with Bitbucket Pipelines for automated code scanning. Results are available as downloadable pipeline artifacts.
Quick Start
Create bitbucket-pipelines.yml in your repository root:
image: ghcr.io/crealoz/easyaudit:latest
pipelines:
default:
- step:
name: EasyAudit Scan
script:
- mkdir -p report
- easyaudit scan
--format=sarif
--output=report/easyaudit.sarif
--exclude="vendor,generated,var,pub/static,pub/media"
"$BITBUCKET_CLONE_DIR"
artifacts:
- report/easyaudit.sarif
Workflow Variants
Scan on Pull Requests Only
image: ghcr.io/crealoz/easyaudit:latest
pipelines:
pull-requests:
'**':
- step:
name: EasyAudit Scan
script:
- mkdir -p report
- easyaudit scan
--format=sarif
--output=report/easyaudit.sarif
"$BITBUCKET_CLONE_DIR/app/code"
artifacts:
- report/easyaudit.sarif
Fail on Errors
image: ghcr.io/crealoz/easyaudit:latest
pipelines:
default:
- step:
name: EasyAudit Scan
script:
- mkdir -p report
- |
EXIT_CODE=0
easyaudit scan \
--format=sarif \
--output=report/easyaudit.sarif \
--exclude="vendor,generated,var" \
"$BITBUCKET_CLONE_DIR" || EXIT_CODE=$?
if [ $EXIT_CODE -eq 2 ]; then
echo "EasyAudit found critical issues"
exit 1
fi
artifacts:
- report/easyaudit.sarif
JSON Artifact
image: ghcr.io/crealoz/easyaudit:latest
pipelines:
default:
- step:
name: EasyAudit Scan
script:
- mkdir -p report
- easyaudit scan
--format=json
--output=report/easyaudit.json
"$BITBUCKET_CLONE_DIR"
artifacts:
- report/easyaudit.json
Branch-Specific Scanning
image: ghcr.io/crealoz/easyaudit:latest
pipelines:
branches:
main:
- step:
name: Full EasyAudit Scan
script:
- mkdir -p report
- easyaudit scan
--format=sarif
--output=report/easyaudit.sarif
--exclude="vendor,generated,var,pub/static,pub/media,dev,setup"
"$BITBUCKET_CLONE_DIR"
artifacts:
- report/easyaudit.sarif
develop:
- step:
name: EasyAudit Scan
script:
- mkdir -p report
- easyaudit scan
--format=sarif
--output=report/easyaudit.sarif
"$BITBUCKET_CLONE_DIR/app/code"
artifacts:
- report/easyaudit.sarif
Environment Variables
| Variable | Description |
|---|---|
BITBUCKET_CLONE_DIR |
Repository root (auto-set) |
BITBUCKET_PIPELINE_UUID |
Unique pipeline identifier (auto-detected) |
BITBUCKET_REPO_FULL_NAME |
Repository full name (workspace/repo) |
EASYAUDIT_AUTH |
API credentials for paid features (optional) |
Viewing Results
- Go to your repository in Bitbucket
- Navigate to Pipelines
- Click on the completed pipeline
- Click on the step name
- Click Artifacts tab
- Download
report/easyaudit.sariforreport/easyaudit.json
See Also
- Automated PR (paid) - Auto-fix issues via API
- CLI Usage - Local usage
- Processors - Available checks
| Back to CI/CD Overview | Back to README |