fix: address all CI failures and CodeRabbit review comments

Lint:
- Remove unused imports (click, pytest, json)
- Replace try-except-pass with logging (S110)
- Fix unprotected zipfile.extractall (S202)

Security:
- Path traversal: startswith → is_relative_to for tar extraction
- Add path traversal protection to ZIP extraction via _safe_extract_zip
- Both cache.py and CLI main.py hardened

Type checker:
- Fix import path: crewai.events.event_bus (not crewai_event_bus)
- Remove unused type: ignore comments
- Fix type mismatches in set_skills() variable types

Code quality:
- Fix f-string interpolation in SkillNotCachedError
- Use ValidationError instead of Exception in test
This commit is contained in:
alex-clawd
2026-05-19 12:04:35 -07:00
parent 9965d67bb5
commit 3e0372dca0
7 changed files with 37 additions and 27 deletions

View File

@@ -3,7 +3,6 @@
from __future__ import annotations
import io
import json
import os
import tempfile
import zipfile