Skip to content

Commit db6118f

Browse files
committed
2 parents cf5c995 + 2c9daf1 commit db6118f

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed

.github/workflows/codacy-analysis.yml

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

.github/workflows/codeql-analysis.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '27 21 * * 2'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'csharp' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)