File tree 2 files changed +63
-9
lines changed
2 files changed +63
-9
lines changed Original file line number Diff line number Diff line change
1
+ name : Scan Protected Branches On Push
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - " main"
8
+
9
+ jobs :
10
+ sast :
11
+ name : SAST scan
12
+ runs-on : ubuntu-24.04
13
+ permissions :
14
+ contents : read
15
+ security-events : write
16
+
17
+ steps :
18
+ - name : Check out repo
19
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
+ with :
21
+ fetch-depth : 0
22
+
23
+ - name : Scan with Checkmarx
24
+ uses : checkmarx/ast-github-action@184bf2f64f55d1c93fd6636d539edf274703e434 # 2.0.41
25
+ with :
26
+ project_name : ${{ github.repository }}
27
+ cx_tenant : ${{ secrets.CHECKMARX_TENANT }}
28
+ base_uri : https://ast.checkmarx.net/
29
+ cx_client_id : ${{ secrets.CHECKMARX_CLIENT_ID }}
30
+ cx_client_secret : ${{ secrets.CHECKMARX_SECRET }}
31
+ additional_params : |
32
+ --report-format sarif \
33
+ --filter "state=TO_VERIFY;PROPOSED_NOT_EXPLOITABLE;CONFIRMED;URGENT" \
34
+ --output-path .
35
+
36
+ - name : Upload Checkmarx results to GitHub
37
+ uses : github/codeql-action/upload-sarif@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
38
+ with :
39
+ sarif_file : cx_result.sarif
40
+
41
+ quality :
42
+ name : Quality scan
43
+ runs-on : ubuntu-24.04
44
+ permissions :
45
+ contents : read
46
+
47
+ steps :
48
+ - name : Check out repo
49
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50
+ with :
51
+ fetch-depth : 0
52
+
53
+ - name : Scan with SonarCloud
54
+ uses : sonarsource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
55
+ env :
56
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
57
+ with :
58
+ args : >
59
+ -Dsonar.organization=${{ github.repository_owner }}
60
+ -Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}
Original file line number Diff line number Diff line change 1
- name : Scan
1
+ name : Scan Pull Requests
2
2
3
3
on :
4
4
workflow_dispatch :
5
- push :
6
- branches :
7
- - " main"
8
- - " release/**"
9
- - " rc"
10
- - " hotfix-rc"
11
5
pull_request_target :
12
6
types : [opened, synchronize]
13
7
29
23
- name : Check out repo
30
24
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31
25
with :
32
- ref : ${{ github.event.pull_request.head.sha }}
26
+ ref : ${{ github.event.pull_request.head.sha }}
33
27
34
28
- name : Scan with Checkmarx
35
29
uses : checkmarx/ast-github-action@184bf2f64f55d1c93fd6636d539edf274703e434 # 2.0.41
66
60
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67
61
with :
68
62
fetch-depth : 0
69
- ref : ${{ github.event.pull_request.head.sha }}
63
+ ref : ${{ github.event.pull_request.head.sha }}
70
64
71
65
- name : Scan with SonarCloud
72
66
uses : sonarsource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
You can’t perform that action at this time.
0 commit comments