-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (54 loc) · 1.58 KB
/
Copy pathbandit.yml
File metadata and controls
62 lines (54 loc) · 1.58 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Bandit
on:
push:
branches: [main]
pull_request:
paths:
- "src/**"
- "pyproject.toml"
- "justfile"
- ".github/workflows/bandit.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: bandit-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
bandit-analysis:
name: Run Bandit
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write # allow uploading code scanning results
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
id: sp
with:
python-version: "3.x"
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990
with:
enable-cache: false
- name: Install Just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3
- name: Run Bandit
run: |
just bandit
- name: Upload analysis results
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: bandit-results
path: bandit.sarif
retention-days: 7
- name: Upload to code-scanning
if: ${{ always() }}
uses: github/codeql-action/upload-sarif@7188fc363630916deb702c7fdcf4e481b751f97a
with:
sarif_file: bandit.sarif