Bitbucket Pipelines Integration

February 8, 2026 ยท View on GitHub

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

VariableDescription
BITBUCKET_CLONE_DIRRepository root (auto-set)
BITBUCKET_PIPELINE_UUIDUnique pipeline identifier (auto-detected)
BITBUCKET_REPO_FULL_NAMERepository full name (workspace/repo)
EASYAUDIT_AUTHAPI credentials for paid features (optional)

Viewing Results

  1. Go to your repository in Bitbucket
  2. Navigate to Pipelines
  3. Click on the completed pipeline
  4. Click on the step name
  5. Click Artifacts tab
  6. Download report/easyaudit.sarif or report/easyaudit.json

See Also


Back to CI/CD Overview | Back to README