Skip to content

BST-18006 Add the bitbucket pipelines scan tests #11

BST-18006 Add the bitbucket pipelines scan tests

BST-18006 Add the bitbucket pipelines scan tests #11

Workflow file for this run

name: Scan Tests
on:
pull_request:
types: [opened, synchronize, reopened]
paths: ['scanners/**']
jobs:
github-action:
name: Bitbucket Pipelines
runs-on: ubuntu-latest
steps:
- name: Generate Bitbucket OAuth Token
id: bitbucket-token
run: |
response=$(curl -s -X POST \
"https://bitbucket.org/site/oauth2/access_token" \
-u "${{ secrets.BOOST_SCAN_RUNNER_BITBUCKET_CLIENT_ID }}:${{ secrets.BOOST_SCAN_RUNNER_BITBUCKET_CLIENT_SECRET }}" \
-d "grant_type=client_credentials")
token=$(echo "$response" | jq -r '.access_token')
echo "token=$token" >> $GITHUB_OUTPUT
echo "::add-mask::$token"
- name: Checkout scanner registry
uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history to detect changes
- name: Run Tests
uses: boostsecurityio/scan-test-action@91e132c98d9cc03c0a4014ad40932dc84ed1144d
with:
provider: bitbucket
provider-config: |
{
"token": "${{ steps.bitbucket-token.outputs.token }}",
"workspace": "boostsecurityio",
"repo_slug": "scan-test-runner-bitbucket-pipelines"
}
registry-repo: "${{ github.repository_owner }}/${{ github.event.repository.name }}"
base-ref: "${{ github.base_ref }}"