Skip to content

Commit e9c136a

Browse files
authored
BST-18006 Add the bitbucket pipelines scan tests (#271)
Test changes was only to trigger tests
1 parent 9c021ee commit e9c136a

File tree

4 files changed

+39
-7
lines changed

4 files changed

+39
-7
lines changed

.github/workflows/scan-test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@ on:
66
paths: ['scanners/**']
77

88
jobs:
9+
bitbucket-action:
10+
name: Bitbucket Pipelines
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Generate Bitbucket OAuth Token
14+
id: bitbucket-token
15+
run: |
16+
response=$(curl -s -X POST \
17+
"https://bitbucket.org/site/oauth2/access_token" \
18+
-u "${{ secrets.BOOST_SCAN_RUNNER_BITBUCKET_CLIENT_ID }}:${{ secrets.BOOST_SCAN_RUNNER_BITBUCKET_CLIENT_SECRET }}" \
19+
-d "grant_type=client_credentials")
20+
21+
token=$(echo "$response" | jq -r '.access_token')
22+
echo "token=$token" >> $GITHUB_OUTPUT
23+
echo "::add-mask::$token"
24+
- name: Checkout scanner registry
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0 # Need full history to detect changes
28+
- name: Run Tests
29+
uses: boostsecurityio/scan-test-action@53e2f687ab93ac5d150b88abd7341b72f6fbf384
30+
with:
31+
provider: bitbucket
32+
provider-config: |
33+
{
34+
"token": "${{ steps.bitbucket-token.outputs.token }}",
35+
"workspace": "boostsecurityio",
36+
"repo_slug": "scan-test-runner-bitbucket-pipelines"
37+
}
38+
registry-repo: "${{ github.repository_owner }}/${{ github.event.repository.name }}"
39+
base-ref: "${{ github.base_ref }}"
40+
941
github-action:
1042
name: Github Actions
1143
runs-on: ubuntu-latest

docs/setup-bitbucket.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Navigate to the scanner registry repository (GitHub):
5858
run: |
5959
response=$(curl -s -X POST \
6060
"https://bitbucket.org/site/oauth2/access_token" \
61-
-u "${{ secrets.BITBUCKET_CLIENT_ID }}:${{ secrets.BITBUCKET_CLIENT_SECRET }}" \
61+
-u "${{ secrets.BOOST_SCAN_RUNNER_BITBUCKET_CLIENT_ID }}:${{ secrets.BOOST_SCAN_RUNNER_BITBUCKET_CLIENT_SECRET }}" \
6262
-d "grant_type=client_credentials")
6363
6464
token=$(echo "$response" | jq -r '.access_token')
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: "1.0"
22
tests:
3-
- name: "osv-scanner"
4-
type: "source-code"
5-
source:
6-
url: "git@github.com:google/osv-scanner.git"
7-
ref: "main"
83
- name: "gitleaks"
94
type: "source-code"
105
source:
116
url: "git@github.com:gitleaks/gitleaks.git"
127
ref: "v8.15.2"
8+
- name: "osv-scanner"
9+
type: "source-code"
10+
source:
11+
url: "git@github.com:google/osv-scanner.git"
12+
ref: "main"

scanners/boostsecurityio/trivy-image/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ tests:
66
url: "https://github.com/martin-boost-dev/boost-poc-registry-testing-trivy"
77
ref: "main"
88
scan_paths:
9-
- "osv-scanner"
109
- "rclone"
10+
- "osv-scanner"

0 commit comments

Comments
 (0)