Skip to content

Commit d7232c4

Browse files
authored
Merge branch 'main' into DB
2 parents fffe1ca + 0a57e99 commit d7232c4

File tree

2 files changed

+73
-7
lines changed

2 files changed

+73
-7
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
bandit-scan:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
security-events: write
15+
actions: read
16+
contents: read
17+
checks: write
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
cache: "pip"
27+
28+
- name: Create virtual environment
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install uv
32+
python -m venv .venv
33+
34+
- name: Install dependencies
35+
run: |
36+
source .venv/bin/activate
37+
if [ -f pyproject.toml ]; then
38+
uv pip install -e ".[dev]"
39+
fi
40+
41+
- name: Install Bandit
42+
run: |
43+
source .venv/bin/activate
44+
python -m pip install bandit[toml]
45+
46+
- name: Run Bandit Security Scan
47+
uses: PyCQA/bandit-action@v1
48+
with:
49+
targets: "src/"
50+
51+
- name: Upload SARIF results to GitHub Security tab
52+
if: github.ref == 'refs/heads/main'
53+
uses: github/codeql-action/upload-sarif@v3
54+
with:
55+
sarif_file: results.sarif
56+
category: bandit-security-scan
57+
continue-on-error: true
58+
59+
- name: Upload SARIF as artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: bandit-sarif-results
63+
path: results.sarif
64+
retention-days: 30
65+
continue-on-error: true

pyproject.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,29 @@ readme = "README.md"
88
dependencies = [
99
"fastapi>=0.115.9,<0.116",
1010
"pandas>=2.2.3,<3",
11-
"prometheus-client>=0.21.1,<0.22",
11+
"prometheus-client>=0.21.1,<0.23",
1212
"pydantic>=2.4.2,<3",
1313
"uvicorn>=0.34.0,<0.35",
1414
"protobuf>=4.24.4,<7",
1515
"requests>=2.31.0,<3",
16-
"cryptography>=44.0.2,<45",
16+
"cryptography>=44.0.2,<46",
1717
"h5py>=3.13.0,<4",
1818
]
1919

2020
[project.optional-dependencies]
2121
dev = [
2222
"pytest>=7.4.2,<9",
23-
"isort>=5.12.0,<6",
24-
"flake8>=6.1.0,<7",
23+
"isort>=5.12.0,<7",
24+
"flake8>=6.1.0,<8",
2525
"mypy>=1.5.1,<2",
26-
"pytest-cov>=4.1.0,<5",
27-
"httpx>=0.25.0,<0.26",
26+
"pytest-cov>=4.1.0,<7",
27+
"httpx>=0.25.0,<0.29",
2828
]
2929
eval = ["lm-eval[api]==0.4.4", "fastapi-utils>=0.8.0", "typing-inspect==0.9.0"]
30-
protobuf = ["numpy>=1.24.0,<2", "grpcio>=1.62.1,<2", "grpcio-tools>=1.62.1,<2"]
30+
protobuf = ["numpy>=1.24.0,<3", "grpcio>=1.62.1,<2", "grpcio-tools>=1.62.1,<2"]
3131
mariadb = ["mariadb>=1.1.12", "javaobj-py3==0.4.4"]
3232

33+
3334
[tool.hatch.build.targets.sdist]
3435
include = ["src"]
3536

0 commit comments

Comments
 (0)