Skip to content

Commit d5eff10

Browse files
committed
chore(ci): update Codacy Security Scan workflow
1 parent f42247c commit d5eff10

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.github/workflows/codacy.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,29 @@ on:
1717
schedule:
1818
- cron: '0 21 * * 5' # Runs at 21:00, only on Friday
1919

20-
permissions:
21-
contents: read
22-
2320
jobs:
2421
codacy-security-scan:
25-
permissions:
26-
contents: read
27-
security-events: write
28-
actions: read
2922
name: Codacy Security Scan
3023
runs-on: ubuntu-latest
3124
steps:
3225
- name: Checkout code
33-
uses: actions/checkout@v4
34-
# Execute Codacy Analysis CLI and generate a SARIF output with the security
35-
# issues identified during the analysis
26+
uses: actions/checkout@main
27+
3628
- name: Run Codacy Analysis CLI
3729
uses: codacy/codacy-analysis-cli-action@master
3830
with:
3931
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
4032
verbose: true
4133
output: results.sarif
4234
format: sarif
35+
# Adjust severity of non-security issues
4336
gh-code-scanning-compat: true
37+
# Force 0 exit code to allow SARIF file generation
38+
# This will hand over control about PR rejection to the GitHub side
4439
max-allowed-issues: 2147483647
40+
4541
# Upload the SARIF file generated in the previous step
4642
- name: Upload SARIF results file
47-
uses: github/codeql-action/upload-sarif@v3
43+
uses: github/codeql-action/upload-sarif@main
4844
with:
4945
sarif_file: results.sarif

0 commit comments

Comments
 (0)