Skip to content

Commit 180900b

Browse files
committed
chore(deps): upgrade python dependencies for security reasons and prevent long-running safety scan in pytest and migrated to CI pipeline
- Updated Filelock - Updated Marshmallow - Updated python-multiopart - Updated urllib3 - Updated wheel
1 parent 7ca3f4f commit 180900b

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/github-actions-CI-CD.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
run: pip install -r requirements.txt
4141
- name: Testing with pytest
4242
run: pytest -v -s
43+
- name: Security scan (Safety)
44+
run: safety scan --exit-code 1 --ignore 39645
4345

4446
- name: Login to Docker Hub
4547
uses: docker/login-action@v3

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dparse==0.6.4
1616
email_validator==2.2.0
1717
fastapi==0.120.2
1818
fastapi-cli==0.0.8
19-
filelock==3.16.1
19+
filelock==3.20.3
2020
greenlet==3.2.4
2121
gunicorn==23.0.0
2222
h11==0.16.0
@@ -31,7 +31,7 @@ joblib==1.5.1
3131
Mako==1.3.10
3232
markdown-it-py==4.0.0
3333
MarkupSafe==3.0.2
34-
marshmallow==4.0.0
34+
marshmallow==4.2.1
3535
mdurl==0.1.2
3636
nltk==3.9.1
3737
orjson==3.11.2
@@ -49,7 +49,7 @@ Pygments==2.19.2
4949
PyJWT==2.10.1
5050
pytest==8.4.1
5151
python-dotenv==1.1.1
52-
python-multipart==0.0.20
52+
python-multipart==0.0.22
5353
PyYAML==6.0.2
5454
regex==2025.7.34
5555
requests==2.32.5
@@ -72,9 +72,9 @@ typer==0.16.1
7272
typing-inspection==0.4.1
7373
typing_extensions==4.15.0
7474
ujson==5.11.0
75-
urllib3==2.6.2
75+
urllib3==2.6.3
7676
uvicorn==0.35.0
7777
watchfiles==1.1.0
7878
webencodings==0.5.1
7979
websockets==15.0.1
80-
wheel==0.45.1
80+
wheel==0.46.3

tests/test_owasp_top_10_security.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,12 @@ def test_xss_in_vote_creation(client: TestClient, test_user):
206206
"detail"][0]["msg"]
207207

208208

209-
def test_no_vulnerable_components():
209+
# def test_no_vulnerable_components():
210210

211-
result = subprocess.run(['safety', 'check', '--full-report',
212-
'--ignore', '39645'], capture_output=True, text=True)
211+
# result = subprocess.run(['safety', 'scan', '--file', 'requirements.txt',
212+
# "--exit-code", "1", '--ignore', '39645'], capture_output=True, text=True)
213213

214-
assert result.returncode == 0, f"Vulnerabilities found in dependencies: {result.stdout}"
214+
# assert result.returncode == 0, f"Vulnerabilities found in dependencies: {result.stdout}"
215215

216216

217217
def test_vote_logging(client: TestClient, test_user, test_posts):

0 commit comments

Comments
 (0)