Skip to content

Commit 13536bf

Browse files
committed
Fix vulnerabilities in code
1 parent 1e771be commit 13536bf

File tree

6 files changed

+835
-821
lines changed

6 files changed

+835
-821
lines changed

metro-ai-suite/smart-route-planning-agent/src/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ dependencies = [
1515
"gradio==5.49.1",
1616
"gradio_toggle>=0.1.5",
1717
"isort",
18-
"langgraph==1.0.7",
18+
"langgraph==1.0.9",
1919
"mypy",
2020
"numpy>1.24.3",
2121
"pandas",
22-
"pillow>=10.4.0",
22+
"pillow>=8.0,<12.0",
2323
"pydantic",
2424
"pytest",
2525
"python-dateutil",

metro-ai-suite/smart-route-planning-agent/src/uv.lock

Lines changed: 372 additions & 370 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

metro-ai-suite/smart-traffic-intersection-agent/Makefile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ TEST_TARGETS := $(addprefix test-,$(TEST_COMPONENTS))
9999
clean-all clean-all-keep-models \
100100
shellcheck pylint ruff \
101101
trivy-scan trivy-scan-fs trivy-scan-image trivy-scan-config \
102-
clamav-scan bandit-scan gitleaks-scan codeql-scan \
102+
clamav-scan bandit-scan-new bandit-scan gitleaks-scan codeql-scan \
103103
$(TEST_TARGETS) \
104104
get-service-name get-component-names get-image-tags get-context-dirs \
105105
get-python-version get-scan-matrix-json
@@ -403,6 +403,28 @@ clamav-scan:
403403
> security-results/clamav-$(SERVICE_NAME)-$$(date +%Y%m%d-%H%M%S).txt 2>&1 || true
404404
@echo "✅ ClamAV scan complete: security-results/clamav-*"
405405

406+
bandit-scan-new:
407+
@echo "🔐 Running Bandit Security Scan..."
408+
@mkdir -p security-results
409+
@python3 -m venv bandit-venv && \
410+
source bandit-venv/bin/activate && \
411+
pip install --upgrade pip && \
412+
pip install bandit[toml] && \
413+
CONFIG_OPT=""; \
414+
if [ -f "pyproject.toml" ]; then CONFIG_OPT="-c pyproject.toml"; fi; \
415+
echo "📝 Generating TXT Report (matches CI)..." && \
416+
bandit $$CONFIG_OPT --severity-level low --confidence-level low -r src/ tests/ \
417+
-f txt -o security-results/bandit-report-$(SERVICE_NAME).txt || true && \
418+
echo "📊 Generating JSON Report..." && \
419+
bandit $$CONFIG_OPT --severity-level low --confidence-level low -r src/ tests/ \
420+
-f json -o security-results/bandit-report-$(SERVICE_NAME).json || true && \
421+
echo "🌐 Generating HTML Report..." && \
422+
bandit $$CONFIG_OPT --severity-level low --confidence-level low -r src/ tests/ \
423+
-f html -o security-results/bandit-report-$(SERVICE_NAME).html || true && \
424+
deactivate && \
425+
rm -rf bandit-venv
426+
@echo "✅ Bandit scan complete. Check security-results/ for txt, json, and html reports."
427+
406428
bandit-scan:
407429
@echo "🔐 Running Bandit Security Scan..."
408430
@mkdir -p security-results

metro-ai-suite/smart-traffic-intersection-agent/src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) 2025 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4-
FROM python:3.11-slim
4+
FROM python:3.13-slim
55

66
# Set working directory
77
WORKDIR /app

metro-ai-suite/smart-traffic-intersection-agent/src/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ dependencies = [
1212
"paho-mqtt==2.1.0",
1313
"aiohttp==3.13.3",
1414
"structlog==23.2.0",
15-
"pydantic==2.7.0",
15+
"pydantic==2.9.2",
1616
"python-dateutil==2.8.2",
1717
"python-dotenv==1.0.0",
18-
"gradio==5.49.1",
19-
"pillow>=9.0.0",
18+
"gradio==6.2.0",
19+
"pillow>=12.1.1,<13.0",
2020
"markdown>=3.4.0",
2121
"requests==2.32.5",
2222
"huggingface_hub==0.36.0",

0 commit comments

Comments
 (0)