Skip to content

Commit e18e129

Browse files
authored
Fix/security docker python314 (#237)
* fix: security alerts, Docker compose failures, and Python 3.14 install guidance Security: - Bump cryptography 44.0.1->46.0.5 and Flask 3.0.0->3.1.3 in CTF challenge-06 (fixes Dependabot alerts #41 HIGH, #42 LOW) - Add SECURITY.md with vulnerability reporting policy (Scorecard Security-Policy) - Pin docker/Dockerfile base image with SHA256 digest (Scorecard Pinned-Dependencies) - Fix version comments in curriculum-check.yml (v4/v5 -> v6) Docker: - Remove deprecated 'version: 3.8' key (Compose V2 warning) - Remove jupyter depends_on elasticsearch (blocked Jupyter if ES failed to start) - Fix volume mount ../tools -> ../shared (tools/ didn't exist) - Fix duplicate container_name on ollama services Python 3.14 / install guidance: - Add Python 3.14 detection to verify_setup.py with actionable error message - Add 'resolution-too-deep' troubleshooting section to docs - Update requirements.txt header with version warning and uv fallback - Update README with Python version callout and selective install options Robustness: - Handle PermissionError in check_ai_model_freshness.py and test_curriculum_integrity.py - Remove stale notebook and data files Made-with: Cursor * fix: restore version discrepancies in CTF challenge-06 baseline for challenge integrity Made-with: Cursor * fix: resolve Docker tokenizers conflict and stale verify_setup path Made-with: Cursor
1 parent 841b066 commit e18e129

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

docker/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,17 @@ COPY requirements.txt /tmp/requirements.txt
3939
RUN pip install pip==24.3.1 && pip install --no-cache-dir -r /tmp/requirements.txt
4040

4141
# Install additional ML/AI packages (versions pinned for reproducibility)
42+
# Note: chromadb must be >=1.0.0 to avoid tokenizers conflict with transformers
4243
RUN pip install --no-cache-dir \
43-
torch==2.5.1 \
44-
transformers==4.47.1 \
45-
sentence-transformers==3.3.1 \
46-
langchain==0.3.14 \
47-
langchain-community==0.3.14 \
48-
openai==1.58.1 \
49-
anthropic==0.42.0 \
50-
chromadb==0.5.23 \
51-
ollama==0.4.5 \
44+
torch==2.6.0 \
45+
transformers==4.48.3 \
46+
sentence-transformers==5.0.0 \
47+
langchain==1.0.0 \
48+
langchain-community==0.4.1 \
49+
openai==1.66.3 \
50+
anthropic==0.49.0 \
51+
chromadb==1.0.12 \
52+
ollama==0.4.7 \
5253
faiss-cpu==1.9.0.post1
5354

5455
# Install security-specific packages (versions pinned for reproducibility)

docker/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ boto3>=1.28.0
6868
minio>=7.1.0
6969

7070
# LLM and RAG
71-
langchain>=0.1.0
72-
langchain-community>=0.0.10
73-
chromadb>=0.4.0
74-
sentence-transformers>=2.2.0
71+
langchain>=1.0.0
72+
langchain-community>=0.4.0
73+
chromadb>=1.0.0
74+
sentence-transformers>=5.0.0
7575
openai>=1.0.0
7676
anthropic>=0.7.0
7777
tiktoken>=0.5.0

scripts/verify_setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def print_summary(results):
437437
console.print(
438438
Panel.fit(
439439
"[bold green]All checks passed! You're ready to start.[/bold green]\n\n"
440-
"Next step: cd labs/lab01-phishing-classifier",
440+
"Next step: cd labs/lab01-python-security-fundamentals",
441441
title="Ready!",
442442
)
443443
)
@@ -457,7 +457,7 @@ def print_summary(results):
457457

458458
if all_passed:
459459
print("\nAll checks passed! You're ready to start.")
460-
print("Next step: cd labs/lab01-phishing-classifier")
460+
print("Next step: cd labs/lab01-python-security-fundamentals")
461461
else:
462462
print("\nSome checks failed. Review the issues above.")
463463

0 commit comments

Comments
 (0)