Skip to content

Commit 077b8da

Browse files
Create codacy-analysis.yml
1 parent b8d8507 commit 077b8da

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/codacy-analysis.yml

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

0 commit comments

Comments
 (0)