Skip to content

Commit 74eab4d

Browse files
chore(NODE-6178): enable codeql scans (#2)
1 parent 7681940 commit 74eab4d

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
analyze:
11+
name: Analyze (${{ matrix.language }})
12+
runs-on: 'ubuntu-latest'
13+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
14+
permissions:
15+
# required for all workflows
16+
security-events: write
17+
18+
# required to fetch internal or private CodeQL packs
19+
packages: read
20+
21+
# only required for workflows in private repositories
22+
actions: read
23+
contents: read
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
include:
29+
- language: 'c-cpp'
30+
build-mode: 'manual'
31+
sourceDirectory: './addon'
32+
- language: 'javascript-typescript'
33+
build-mode: 'none'
34+
sourceDirectory: "./src"
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
39+
# Initializes the CodeQL tools for scanning.
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@v3
42+
with:
43+
languages: ${{ matrix.language }}
44+
build-mode: ${{ matrix.build-mode }}
45+
source-root: ${{ matrix.sourceDirectory }}
46+
47+
- if: matrix.build-mode == 'manual'
48+
shell: bash
49+
run: node .github/scripts/libmongocrypt.mjs
50+
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@v3
53+
with:
54+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)