@@ -15,85 +15,6 @@ permissions:
1515 id-token : write # Required for OIDC
1616
1717jobs :
18- azure-devops-pipelines :
19- name : Azure DevOps Pipelines
20- runs-on : ubuntu-latest
21- # Run on pull_request for same-repo PRs, pull_request_target for fork PRs
22- if : |
23- (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
24- (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository)
25- steps :
26- - name : Azure Login (OIDC)
27- uses : azure/login@v2
28- with :
29- client-id : ${{ secrets.BOOST_SCAN_RUNNER_ADO_CLIENT_ID }}
30- tenant-id : ${{ secrets.BOOST_SCAN_RUNNER_ADO_TENANT_ID }}
31- allow-no-subscriptions : true
32- - name : Get Azure DevOps Token
33- id : azure-token
34- run : |
35- token=$(az account get-access-token \
36- --resource 499b84ac-1321-427f-aa17-267ca6975798 \
37- --query accessToken -o tsv)
38- echo "token=$token" >> $GITHUB_OUTPUT
39- echo "::add-mask::$token"
40- - name : Checkout scanner registry
41- uses : actions/checkout@v4
42- with :
43- fetch-depth : 0 # Need full history to detect changes
44- ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }}
45- - name : Run Tests
46- uses : boostsecurityio/scan-test-action@b61411c3651a93be06e3f31490ff6a94e901ae00
47- with :
48- provider : azure-devops
49- provider-config : |
50- {
51- "token": "${{ steps.azure-token.outputs.token }}",
52- "organization": "BoostSecurity",
53- "project": "cicd-tools",
54- "pipeline_id": 1
55- }
56- registry-repo : " ${{ github.repository_owner }}/${{ github.event.repository.name }}"
57- base-ref : " ${{ github.base_ref }}"
58- fallback-scanners : " boostsecurityio/trivy-fs,boostsecurityio/trivy-image"
59- bitbucket-action :
60- name : Bitbucket Pipelines
61- runs-on : ubuntu-latest
62- # Run on pull_request for same-repo PRs, pull_request_target for fork PRs
63- if : |
64- (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
65- (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository)
66- steps :
67- - name : Generate Bitbucket OAuth Token
68- id : bitbucket-token
69- run : |
70- response=$(curl -s -X POST \
71- "https://bitbucket.org/site/oauth2/access_token" \
72- -u "${{ secrets.BOOST_SCAN_RUNNER_BITBUCKET_CLIENT_ID }}:${{ secrets.BOOST_SCAN_RUNNER_BITBUCKET_CLIENT_SECRET }}" \
73- -d "grant_type=client_credentials")
74-
75- token=$(echo "$response" | jq -r '.access_token')
76- echo "token=$token" >> $GITHUB_OUTPUT
77- echo "::add-mask::$token"
78- - name : Checkout scanner registry
79- uses : actions/checkout@v4
80- with :
81- fetch-depth : 0 # Need full history to detect changes
82- ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }}
83- - name : Run Tests
84- uses : boostsecurityio/scan-test-action@b61411c3651a93be06e3f31490ff6a94e901ae00
85- with :
86- provider : bitbucket
87- provider-config : |
88- {
89- "token": "${{ steps.bitbucket-token.outputs.token }}",
90- "workspace": "boostsecurityio",
91- "repo_slug": "scan-test-runner-bitbucket-pipelines"
92- }
93- registry-repo : " ${{ github.repository_owner }}/${{ github.event.repository.name }}"
94- base-ref : " ${{ github.base_ref }}"
95- fallback-scanners : " boostsecurityio/trivy-fs,boostsecurityio/trivy-image"
96-
9718 github-action :
9819 name : Github Actions
9920 runs-on : ubuntu-latest
@@ -130,30 +51,3 @@ jobs:
13051 registry-repo : " ${{ github.repository_owner }}/${{ github.event.repository.name }}"
13152 base-ref : " ${{ github.base_ref }}"
13253 fallback-scanners : " boostsecurityio/trivy-fs,boostsecurityio/trivy-image"
133-
134- gitlab-ci :
135- name : Gitlab-CI
136- runs-on : ubuntu-latest
137- # Run on pull_request for same-repo PRs, pull_request_target for fork PRs
138- if : |
139- (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
140- (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository)
141- steps :
142- - name : Checkout scanner registry
143- uses : actions/checkout@v4
144- with :
145- fetch-depth : 0 # Need full history to detect changes
146- ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || '' }}
147- - name : Run Tests
148- uses : boostsecurityio/scan-test-action@b61411c3651a93be06e3f31490ff6a94e901ae00
149- with :
150- provider : gitlab-ci
151- provider-config : |
152- {
153- "trigger_token": "${{ secrets.BOOST_SCAN_RUNNER_GITLAB_TRIGGER_TOKEN }}",
154- "api_token": "${{ secrets.BOOST_SCAN_RUNNER_GITLAB_READ_TOKEN }}",
155- "project_id": "boostsecurityio/scan-test-runner-gitlab-ci"
156- }
157- registry-repo : " ${{ github.repository_owner }}/${{ github.event.repository.name }}"
158- base-ref : " ${{ github.base_ref }}"
159- fallback-scanners : " boostsecurityio/trivy-fs,boostsecurityio/trivy-image"
0 commit comments