Skip to content

Commit 879ac8c

Browse files
committed
BST-18043 Add the Azure Devops pipelines scan tests
1 parent e9c136a commit 879ac8c

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.github/workflows/scan-test.yml

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

88
jobs:
9+
azure-devops-pipelines:
10+
name: Azure DevOps Pipelines
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Azure Login (OIDC)
14+
uses: azure/login@v2
15+
with:
16+
client-id: ${{ secrets.BOOST_SCAN_RUNNER_ADO_CLIENT_ID }}
17+
tenant-id: ${{ secrets.BOOST_SCAN_RUNNER_ADO_TENANT_ID }}
18+
allow-no-subscriptions: true
19+
- name: Get Azure DevOps Token
20+
id: azure-token
21+
run: |
22+
token=$(az account get-access-token \
23+
--resource 499b84ac-1321-427f-aa17-267ca6975798 \
24+
--query accessToken -o tsv)
25+
echo "token=$token" >> $GITHUB_OUTPUT
26+
echo "::add-mask::$token"
27+
- name: Checkout scanner registry
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0 # Need full history to detect changes
31+
- name: Run Tests
32+
uses: boostsecurityio/scan-test-action@53e2f687ab93ac5d150b88abd7341b72f6fbf384
33+
with:
34+
provider: github-actions
35+
provider-config: |
36+
{
37+
"token": "${{ steps.azure-token.outputs.token }}",
38+
"organization": "BoostSecurity",
39+
"project": "cicd-tools",
40+
"pipeline_id": 1
41+
}
42+
registry-repo: "${{ github.repository_owner }}/${{ github.event.repository.name }}"
43+
base-ref: "${{ github.base_ref }}"
944
bitbucket-action:
1045
name: Bitbucket Pipelines
1146
runs-on: ubuntu-latest

docs/setup-azure-devops.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ jobs:
9898
- name: Azure Login (OIDC)
9999
uses: azure/login@v2
100100
with:
101-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
102-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
101+
client-id: ${{ secrets.BOOST_SCAN_RUNNER_ADO_CLIENT_ID }}
102+
tenant-id: ${{ secrets.BOOST_SCAN_RUNNER_ADO_TENANT_ID }}
103103
allow-no-subscriptions: true
104104

105105
- name: Get Azure DevOps Token

0 commit comments

Comments
 (0)