File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CodeGuru Security Example
2
+ on :
3
+ push :
4
+ branches :
5
+ - ' main'
6
+
7
+ permissions :
8
+ id-token : write
9
+ # for writing security events.
10
+ security-events : write
11
+ # only required for workflows in private repositories
12
+ actions : read
13
+ contents : read
14
+
15
+ jobs :
16
+ build :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - name : Checkout Respository
20
+ uses : actions/checkout@v3
21
+ with :
22
+ fetch-depth : 0
23
+
24
+ - name : Configure aws credentials
25
+ uses : aws-actions/configure-aws-credentials@v2
26
+ with :
27
+ role-to-assume : arn:aws:iam::619071313866:role/CodeGuruSecurityGitHubAccessRole
28
+ aws-region : eu-north-1
29
+ role-session-name : GitHubActionScript
30
+
31
+ - name : CodeGuru Security
32
+ uses : aws-actions/codeguru-security@v1
33
+ with :
34
+ source_path : .
35
+ aws_region : eu-north-1
36
+ fail_on_severity : Critical
37
+ - name : Print findings
38
+ run : |
39
+ ls -l
40
+ cat codeguru-security-results.sarif.json
41
+
42
+ # If you want content in security scanning, you’ll need to enable codescanning by going into github.
43
+ # https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository
44
+ - name : Upload result
45
+ uses : github/codeql-action/upload-sarif@v2
46
+ with :
47
+ sarif_file : codeguru-security-results.sarif.json
You can’t perform that action at this time.
0 commit comments