Skip to content

Commit

Permalink
👷 Update Codacy Security Scan
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Fihlon <marcus@fihlon.swiss>
  • Loading branch information
McPringle committed Apr 29, 2023
1 parent 6948932 commit 6f2ff32
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,34 @@ name: Codacy Security Scan

on:
push:
branches: [ main ]
branches: [ "master", "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '15 18 * * 1'
branches: [ "master", "main" ]
schedule: # Run workflow automatically
- cron: '15 18 * * 1' # Runs every monday at a quarter past six in the afternoon
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly

jobs:
codacy-security-scan:
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@main

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@dedc49c0a2afe65e87156488a5fcd813d38311d8
uses: codacy/codacy-analysis-cli-action@master
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
# This will hand over control about PR rejection to the GitHub side
max-allowed-issues: 2147483647

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@main
with:
sarif_file: results.sarif

0 comments on commit 6f2ff32

Please sign in to comment.