File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Codacy Security Scan
2+
3+ on :
4+ push :
5+
6+ jobs :
7+ codacy-security-scan :
8+ permissions :
9+ contents : read # for actions/checkout to fetch code
10+ security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
11+ actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
12+ name : Codacy Security Scan
13+ runs-on : ubuntu-latest
14+ steps :
15+ # Checkout the repository to the GitHub Actions runner
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
20+ - name : Run Codacy Analysis CLI
21+ uses : codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
22+ with :
23+ # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
24+ # You can also omit the token and run the tools that support default configurations
25+ project-token : ${{ secrets.CODACY_PROJECT_TOKEN }}
26+ verbose : true
27+ output : results.sarif
28+ format : sarif
29+ # Adjust severity of non-security issues
30+ gh-code-scanning-compat : true
31+ # Force 0 exit code to allow SARIF file generation
32+ # This will handover control about PR rejection to the GitHub side
33+ max-allowed-issues : 2147483647
34+
35+ # Upload the SARIF file generated in the previous step
36+ - name : Upload SARIF results file
37+ uses : github/codeql-action/upload-sarif@v3
38+ with :
39+ sarif_file : results.sarif
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments