88 pull_request :
99 types : [opened, synchronize, reopened]
1010 branches-ignore :
11- - main
11+ - " main"
1212 pull_request_target :
1313 types : [opened, synchronize, reopened]
1414 branches :
@@ -24,68 +24,28 @@ jobs:
2424 contents : read
2525
2626 sast :
27- name : SAST scan
28- runs-on : ubuntu-22.04
27+ name : Checkmarx
28+ uses : bitwarden/gh-actions/.github/workflows/_checkmarx.yml@main
2929 needs : check-run
30+ secrets :
31+ AZURE_SUBSCRIPTION_ID : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
32+ AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
33+ AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
3034 permissions :
3135 contents : read
3236 pull-requests : write
3337 security-events : write
34-
35- steps :
36- - name : Check out repo
37- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38- with :
39- ref : ${{ github.event.pull_request.head.sha }}
40-
41- - name : Scan with Checkmarx
42- uses : checkmarx/ast-github-action@ef93013c95adc60160bc22060875e90800d3ecfc # 2.3.19
43- env :
44- INCREMENTAL :
45- " ${{ contains(github.event_name, 'pull_request') && '--sast-incremental' || '' }}"
46- with :
47- project_name : ${{ github.repository }}
48- cx_tenant : ${{ secrets.CHECKMARX_TENANT }}
49- base_uri : https://ast.checkmarx.net/
50- cx_client_id : ${{ secrets.CHECKMARX_CLIENT_ID }}
51- cx_client_secret : ${{ secrets.CHECKMARX_SECRET }}
52- additional_params : |
53- --report-format sarif \
54- --filter "state=TO_VERIFY;PROPOSED_NOT_EXPLOITABLE;CONFIRMED;URGENT" \
55- --output-path . ${{ env.INCREMENTAL }}
56-
57- - name : Upload Checkmarx results to GitHub
58- uses : github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0
59- with :
60- sarif_file : cx_result.sarif
61- sha :
62- ${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.sha ||
63- github.sha }}
64- ref :
65- ${{ contains(github.event_name, 'pull_request') && format('refs/pull/{0}/head',
66- github.event.pull_request.number) || github.ref }}
38+ id-token : write
6739
6840 quality :
69- name : Quality scan
70- runs-on : ubuntu-22.04
41+ name : Sonar
42+ uses : bitwarden/gh-actions/.github/workflows/_sonar.yml@main
7143 needs : check-run
44+ secrets :
45+ AZURE_SUBSCRIPTION_ID : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
46+ AZURE_TENANT_ID : ${{ secrets.AZURE_TENANT_ID }}
47+ AZURE_CLIENT_ID : ${{ secrets.AZURE_CLIENT_ID }}
7248 permissions :
7349 contents : read
7450 pull-requests : write
75-
76- steps :
77- - name : Check out repo
78- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
79- with :
80- fetch-depth : 0
81- ref : ${{ github.event.pull_request.head.sha }}
82-
83- - name : Scan with SonarCloud
84- uses : sonarsource/sonarqube-scan-action@2500896589ef8f7247069a56136f8dc177c27ccf # v5.2.0
85- env :
86- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
87- with :
88- args : >
89- -Dsonar.organization=${{ github.repository_owner }} -Dsonar.projectKey=${{
90- github.repository_owner }}_${{ github.event.repository.name }}
91- -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
51+ id-token : write
0 commit comments