Skip to content

Commit f7769e6

Browse files
Merge pull request #1 from codeplaysoftware/adding-codeql-scanning
Adding CodeQL Scanning
2 parents 7d8cc45 + bfc585e commit f7769e6

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: 'CodeQL'
2+
3+
on:
4+
push:
5+
branches: [ 'main' ]
6+
pull_request:
7+
branches: [ 'main' ]
8+
schedule:
9+
- cron: '31 11 * * 2'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: 'ubuntu-latest'
15+
timeout-minutes: 360
16+
permissions:
17+
# required for all workflows
18+
security-events: write
19+
20+
# required to fetch internal or private CodeQL packs
21+
packages: read
22+
23+
# only required for workflows in private repositories
24+
actions: read
25+
contents: read
26+
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
include:
31+
- language: javascript-typescript
32+
build-mode: none
33+
- language: python
34+
build-mode: none
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+
46+
- if: matrix.build-mode == 'manual'
47+
shell: bash
48+
run: |
49+
echo 'If you are using a "manual" build mode for one or more of the' \
50+
'languages you are analyzing, replace this with the commands to build' \
51+
'your code, for example:'
52+
echo ' make bootstrap'
53+
echo ' make release'
54+
exit 1
55+
56+
- name: Perform CodeQL Analysis
57+
uses: github/codeql-action/analyze@v3
58+
with:
59+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)