Skip to content

fix(security): patch RCE, command injection, path traversal, SSTI, and CVEs#63

Open
Comet0322 wants to merge 3 commits into
FSoft-AI4Code:mainfrom
Comet0322:fix/security-patches
Open

fix(security): patch RCE, command injection, path traversal, SSTI, and CVEs#63
Comet0322 wants to merge 3 commits into
FSoft-AI4Code:mainfrom
Comet0322:fix/security-patches

Conversation

@Comet0322

Copy link
Copy Markdown

What

Semgrep CI scan on main found vulnerabilities across code and dependencies. This PR fixes all blocking/reachable issues. Post-fix scan: 6 non-blocking findings, 0 blocking.

Code changes

File Fix
cluster_modules.py eval(LLM_response)json.loads() (CWE-95)
str_replace_editor.py shell=True → list args ×2 (CWE-78), added is_relative_to() path guard (CWE-22)
template_utils.py EnvironmentSandboxedEnvironment (SSTI)
Dockerfile Run as non-root appuser uid 1001 (CWE-250)

Dependency bumps

Package CVEs fixed
GitPython 3.1.403.1.50 CVE-2024-22190, CVE-2026-44243/44244, CVE-2026-42215, GHSA-mv93-w799-cj2w
litellm 1.77.0>=1.83.7 GHSA-69x8-hrgq-fjj8, CVE-2026-42271, CVE-2026-35029/35030
pydantic-ai 1.0.6>=1.56.0 CVE-2026-25580 (SSRF)
requests 2.32.4>=2.33.0 CVE-2026-25645
python-multipart 0.0.20>=0.0.27 CVE-2026-24486, CVE-2026-40347, CVE-2026-42561
python-dotenv 1.1.1>=1.2.2 CVE-2026-28684

requirements.txt regenerated via uv export.

Remaining non-blocking findings

  • config_manager.py — logger message mentions "API key" (false positive, no credential value logged)
  • template_utils.py — direct Jinja2 use (mitigated by SandboxedEnvironment + autoescape)
  • web_app.py — FastAPI tainted response (safe: output rendered through Jinja2 with autoescape)
  • viewer_template.html — CDN scripts missing SRI integrity attribute

Comet0322 and others added 3 commits June 9, 2026 23:42
- cluster_modules: eval(LLM response) → json.loads() (CWE-95)
- str_replace_editor: shell=True → list args ×2 (CWE-78)
- str_replace_editor: add is_relative_to() path boundary guard (CWE-22)
- template_utils: Environment → SandboxedEnvironment (SSTI)
- Dockerfile: run as non-root appuser uid 1001 (CWE-250)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GitPython >=3.1.40 → ==3.1.50 (CVE-2024-22190, CVE-2026-44243/44244, GHSA-mv93-w799-cj2w)
litellm >=1.77.0 → >=1.83.7 (GHSA-69x8-hrgq-fjj8, CVE-2026-42271/35029/35030)
pydantic-ai >=1.0.6 → >=1.56.0 (CVE-2026-25580 SSRF)
requests >=2.32.4 → >=2.33.0 (CVE-2026-25645)
python-multipart >=0.0.20 → >=0.0.27 (CVE-2026-24486/40347/42561)
python-dotenv >=1.1.1 → >=1.2.2 (CVE-2026-28684)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rsions

Re-generated via `uv export --no-hashes --python 3.12` to ensure
supply chain CVE fixes in pyproject.toml are reflected in the lock file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant