Skip to content

Commit b8d0441

Browse files
committed
Add CodeQL and Bandit Static Analysis Scans
1 parent 37b401a commit b8d0441

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/bandit.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Static Analysis: Bandit Scan"
2+
3+
on:
4+
push:
5+
branches:
6+
- "pull-request/[0-9]+"
7+
- "main"
8+
9+
jobs:
10+
analyze:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
security-events: write
14+
steps:
15+
- name: Perform Bandit Analysis
16+
uses: PyCQA/bandit-action@8a1b30610f61f3f792fe7556e888c9d7dffa52de # v1.0.0

.github/workflows/codeql.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Static Analysis: CodeQL Scan"
2+
3+
on:
4+
push:
5+
branches:
6+
- "pull-request/[0-9]+"
7+
- "main"
8+
9+
jobs:
10+
analyze:
11+
name: Analyze (${{ matrix.language }})
12+
runs-on: ubuntu-latest
13+
permissions:
14+
security-events: write
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- language: python
21+
build-mode: none
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Initialize CodeQL
27+
uses: github/codeql-action/init@v3
28+
with:
29+
languages: ${{ matrix.language }}
30+
build-mode: ${{ matrix.build-mode }}
31+
queries: security-extended
32+
33+
- name: Perform CodeQL Analysis
34+
uses: github/codeql-action/analyze@v3
35+
with:
36+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)