File tree Expand file tree Collapse file tree 2 files changed +62
-8
lines changed Expand file tree Collapse file tree 2 files changed +62
-8
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@b74e8d514feae4ad5ad2b43e72590935bd2daf5f # 2.0.39
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@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
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
- - " rc"
9
- - " hotfix-rc"
10
5
pull_request_target :
11
6
types : [opened, synchronize]
12
7
merge_group :
68
63
ref : ${{ github.event.pull_request.head.sha }}
69
64
70
65
- name : Scan with SonarCloud
71
- uses : sonarsource/sonarcloud-github -action@02ef91109b2d589e757aefcfb2854c2783fd7b19 # v4.0.0
66
+ uses : sonarsource/sonarqube-scan -action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1
72
67
env :
73
68
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
74
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
75
69
with :
76
70
args : >
77
71
-Dsonar.organization=${{ github.repository_owner }}
You can’t perform that action at this time.
0 commit comments