Skip to content

Commit 3b6fe86

Browse files
committed
ci: Add codeql workflow for python, actions, js
Integrate codeql code scanning from github to do basic static code analysis on python, actions, js. c/cpp to be added later. Signed-off-by: Anas Nashif <[email protected]>
1 parent 911d803 commit 3b6fe86

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

Diff for: .github/codeql/codeql-actions-config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paths:
2+
- .github

Diff for: .github/codeql/codeql-js-config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paths:
2+
- doc

Diff for: .github/workflows/codeql.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
schedule:
7+
- cron: '34 16 * * 3'
8+
permissions:
9+
contents: read
10+
jobs:
11+
analyze:
12+
name: Analyze (${{ matrix.language }})
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
security-events: write
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- language: python
21+
build-mode: none
22+
- language: actions
23+
build-mode: none
24+
config: ./.github/codeql/codeql-actions-config.yml
25+
- language: javascript-typescript
26+
build-mode: none
27+
config: ./.github/codeql/codeql-js-config.yml
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
32+
- name: Initialize CodeQL
33+
uses: github/codeql-action/init@5f8171a638ada777af81d42b55959a643bb29017 # v3.28.12
34+
with:
35+
languages: ${{ matrix.language }}
36+
build-mode: ${{ matrix.build-mode }}
37+
queries: security-extended
38+
config-file: ${{ matrix.config }}
39+
40+
- if: matrix.build-mode == 'manual'
41+
shell: bash
42+
run: |
43+
echo "nothing yet"
44+
exit 0
45+
46+
- name: Perform CodeQL Analysis
47+
uses: github/codeql-action/analyze@5f8171a638ada777af81d42b55959a643bb29017 # v3.28.12
48+
with:
49+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)