Skip to content

Commit dbddd1a

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 b290506 commit dbddd1a

File tree

4 files changed

+62
-1
lines changed

4 files changed

+62
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paths:
2+
- .github
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paths:
2+
- doc

.github/workflows/codeql.yml

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

.github/workflows/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
1818
path: zephyrproject/zephyr
19-
ref: ${{ github.event.pull_request.head.sha }}
19+
#ref: ${{ github.event.pull_request.head.sha }}
2020
fetch-depth: 0
2121
persist-credentials: false
2222

0 commit comments

Comments
 (0)