1
# For most projects, this workflow file will not need changing; you simply need
2
# to commit it to your repository.
4
# You may wish to alter this file to override the set of languages analyzed,
5
# or to provide custom queries or build logic.
10
branches: [dev, rel-*]
18
# The branches below must be a subset of the branches above
37
if: ${{ !github.event.pull_request.draft }}
39
actions: read # for github/codeql-action/init to get workflow details
40
contents: read # for actions/checkout to fetch code
41
security-events: write # for github/codeql-action/autobuild to send a status report
43
runs-on: ubuntu-latest
48
# Override automatic language detection by changing the below list
49
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
50
language: ["csharp", "javascript"]
52
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
55
- name: Checkout repository
56
uses: actions/checkout@v2
58
# We must fetch at least the immediate parents so that if this is
59
# a pull request then we can checkout the head.
62
# If this run was triggered by a pull request event, then checkout
63
# the head of the pull request instead of the merge commit.
64
- run: git checkout HEAD^2
65
if: ${{ github.event_name == 'pull_request' }}
67
# Initializes the CodeQL tools for scanning.
68
- name: Initialize CodeQL
69
uses: github/codeql-action/init@v1
71
languages: ${{ matrix.language }}
72
# If you wish to specify custom queries, you can do so here or in a config file.
73
# By default, queries listed here will override any specified in a config file.
74
# Prefix the list here with "+" to use these queries and those in the config file.
75
# queries: ./path/to/local/query, your-org/your-repo/queries@main
77
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
78
# If this step fails, then you should remove it and run the build manually (see below)
80
uses: github/codeql-action/autobuild@v1
82
# ℹ️ Command-line programs to run using the OS shell.
83
# 📚 https://git.io/JvXDl
85
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
86
# and modify them (or add more) to build your code if your project
87
# uses a compiled language
93
- name: Perform CodeQL Analysis
94
uses: github/codeql-action/analyze@v1