1
- # This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by separate
2
- # terms of service, privacy policy, and support documentation.
3
- # This workflow checks out code, performs a Codacy security scan and integrates the results with the GitHub Advanced Security
4
- # code scanning feature. For more information on the Codacy security scan action usage and parameters, see
5
- # https://github.com/codacy/codacy-analysis-cli-action.
6
- # For more information on Codacy Analysis CLI in general, see https://github.com/codacy/codacy-analysis-cli.
1
+ # This workflow uses actions not certified by GitHub. They are provided by a
2
+ # third-party and governed by separate terms of service, privacy policy, and
3
+ # support documentation. This workflow checks out code, performs a Codacy
4
+ # security scan, and integrates the results with GitHub Advanced Security code
5
+ # scanning feature. For more info on the Codacy Security Scan action usage and
6
+ # parameters, see: https://github.com/codacy/codacy-analysis-cli-action.
7
+ # For more info on Codacy Analysis CLI in general, see:
8
+ # https://github.com/codacy/codacy-analysis-cli.
7
9
8
10
name : Codacy Security Scan
9
11
10
12
on :
11
13
push :
12
14
branches : [ "master" ]
13
15
pull_request :
14
- # The branches below must be a subset of the branches above
15
16
branches : [ "master" ]
16
17
schedule :
17
18
- cron : ' 0 21 * * 5' # Runs at 21:00, only on Friday
@@ -22,33 +23,25 @@ permissions:
22
23
jobs :
23
24
codacy-security-scan :
24
25
permissions :
25
- contents : read # for actions/checkout to fetch code
26
- security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
27
- actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
26
+ contents : read
27
+ security-events : write
28
+ actions : read
28
29
name : Codacy Security Scan
29
30
runs-on : ubuntu-latest
30
31
steps :
31
- # Checkout the repository to the GitHub Actions runner
32
32
- name : Checkout code
33
33
uses : actions/checkout@v4
34
-
35
- # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
34
+ # Execute Codacy Analysis CLI and generate a SARIF output with the security
35
+ # issues identified during the analysis
36
36
- name : Run Codacy Analysis CLI
37
- uses : codacy/codacy-analysis-cli-action@33d455949345bddfdb845fba76b57b70cc83754b
37
+ uses : codacy/codacy-analysis-cli-action@v4
38
38
with :
39
- # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy
40
- # repository
41
- # You can also omit the token and run the tools that support default configurations
42
39
project-token : ${{ secrets.CODACY_PROJECT_TOKEN }}
43
40
verbose : true
44
41
output : results.sarif
45
42
format : sarif
46
- # Adjust severity of non-security issues
47
43
gh-code-scanning-compat : true
48
- # Force 0 exit code to allow SARIF file generation
49
- # This will handover control about PR rejection to the GitHub side
50
44
max-allowed-issues : 2147483647
51
-
52
45
# Upload the SARIF file generated in the previous step
53
46
- name : Upload SARIF results file
54
47
uses : github/codeql-action/upload-sarif@v3
0 commit comments