Skip to content

Bitbucket Pipelines Integration

Basic example

image: node:alpine

pipelines:
  default:
    - step:
        name: Deploy
        script:
          # Your deployment scripts here

    - step:
        name: Escape
        trigger: manual  # Set to manual if you wish to run this step manually
        after-script:   # Similar to post-deploy in GitLab
          - npm install -g @escape.tech/action
          - npm show @escape.tech/action version
          - escape-action
        deployment: staging  # Assuming staging environment for deployment
        script:
          - echo "Starting Escape scan..."
        services:
          - docker
        caches:
          - node
        size: 2x
        max-time: 10
        variables:
          ESCAPE_APPLICATION_ID: $ESCAPE_APPLICATION_ID
          ESCAPE_API_KEY: $ESCAPE_API_KEY

Configuration Options

Environment Variables

  • ESCAPE_APPLICATION_ID: Your Escape application identifier
  • ESCAPE_API_KEY: Your Escape API key

Pipeline Settings

  • trigger: Control when the scan runs (manual or automatic)
  • after-script: Run scan after deployment
  • deployment: Specify target environment
  • size: Adjust compute resources (2x recommended)
  • max-time: Set maximum execution time

Failure behavior

The Escape CLI will:

  • Exit with code 1 if high-severity issues are found
  • Can be configured to fail on different severity levels

Available variables and options

See CLI documentation for complete configuration options.