Skip to content

Commit def43aa

Browse files
committed
Add CodeQL analysis workflow configuration
1 parent 472e76d commit def43aa

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/codeql/codeql-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
paths:
2+
- src
3+
paths-ignore:
4+
- '**/*Tests/*.cs'

.github/workflows/codeql.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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 Advanced"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '35 20 * * 0'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
26+
permissions:
27+
# required for all workflows
28+
security-events: write
29+
30+
# required to fetch internal or private CodeQL packs
31+
packages: read
32+
33+
# only required for workflows in private repositories
34+
actions: read
35+
contents: read
36+
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
include:
41+
- language: actions
42+
build-mode: none
43+
- language: c-cpp
44+
build-mode: none
45+
- language: csharp
46+
build-mode: none
47+
- language: javascript-typescript
48+
build-mode: none
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v5
52+
53+
# Initializes the CodeQL tools for scanning.
54+
- name: Initialize CodeQL
55+
uses: github/codeql-action/init@v4
56+
with:
57+
languages: ${{ matrix.language }}
58+
build-mode: ${{ matrix.build-mode }}
59+
config-file: ./.github/codeql/codeql-config.yml
60+
61+
- name: Perform CodeQL Analysis
62+
uses: github/codeql-action/analyze@v4
63+
with:
64+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)