-
Notifications
You must be signed in to change notification settings - Fork 27
43 lines (33 loc) · 969 Bytes
/
auto-sec-scan.yml
File metadata and controls
43 lines (33 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: "Security Scan on PR"
on:
pull_request:
types: [opened, synchronize, reopened]
schedule:
- cron: '0 0 * * 1' # Weekly on Monday
workflow_dispatch:
jobs:
security_scan:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install --with dev
- name: Run Bandit Security Scan
run: poetry run bandit -r cdp/ generator/ -f txt
- name: Run CodeQL Scan
uses: github/codeql-action/init@main
with:
languages: 'python'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@main