File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow integrates Brakeman with GitHub's Code Scanning feature
2
+ # Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications
3
+
4
+ name : Brakeman Scan
5
+
6
+ on :
7
+ push :
8
+ branches : [ main ]
9
+ pull_request :
10
+ # The branches below must be a subset of the branches above
11
+ branches : [ main ]
12
+ schedule :
13
+ - cron : ' 36 16 * * 0'
14
+
15
+ jobs :
16
+ brakeman-scan :
17
+ name : Brakeman Scan
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+ # Checkout the repository to the GitHub Actions runner
21
+ - name : Checkout
22
+ uses : actions/checkout@v2
23
+
24
+ # Customize the ruby version depending on your needs
25
+ - name : Setup Ruby
26
+ uses : actions/setup-ruby@v1
27
+ with :
28
+ ruby-version : ' 2.7'
29
+
30
+ - name : Setup Brakeman
31
+ env :
32
+ BRAKEMAN_VERSION : ' 4.10' # SARIF support is provided in Brakeman version 4.10+
33
+ run : |
34
+ gem install brakeman --version $BRAKEMAN_VERSION
35
+
36
+ # Execute Brakeman CLI and generate a SARIF output with the security issues identified during the analysis
37
+ - name : Scan
38
+ continue-on-error : true
39
+ run : |
40
+ brakeman -f sarif -o output.sarif.json .
41
+
42
+ # Upload the SARIF file generated in the previous step
43
+ - name : Upload SARIF
44
+ uses : github/codeql-action/upload-sarif@v1
45
+ with :
46
+ sarif_file : output.sarif.json
You can’t perform that action at this time.
0 commit comments