Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

fix(security): exclude compromised ast-grep-cli 0.44.1 (supply-chain trojan) (#2342)

Abhay Singh494fb5a60e15
diff --git a/pyproject.toml b/pyproject.toml
index 5118f3c63..feecba625 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -57,7 +57,12 @@ dependencies = [
"click>=8.3.3", # CLI framework; PYSEC-2026-2132 fix (command injection in click.edit())
"rich>=13.0.0", # Rich terminal output
"opentelemetry-api>=1.24.0", # Safe no-op OTEL API for instrumentation
- "ast-grep-cli>=0.30.0", # AST-aware code slicing (CodeCompressor); binary wheel
+ # AST-aware code slicing (CodeCompressor); binary wheel. 0.44.1 is excluded:
+ # that PyPI release was a compromised supply-chain build shipping an
+ # info-stealer `sg.exe` (Trojan:Win64/Lazy!MTB) alongside the real binary
+ # (GH #2332). The `!=` keeps every other release installable, including a
+ # future patched one.
+ "ast-grep-cli>=0.30.0,!=0.44.1",
"pyyaml>=6.0", # omp wrap: parse/merge omp's models.yml registry
"tomli>=2.0.0; python_version < '3.11'", # tomllib backport for helper scripts
"tomlkit>=0.13.0,<1.0", # Loss-minimizing Codex config recovery
diff --git a/uv.lock b/uv.lock
index 1d5ac3416..6fc2b20e5 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1924,7 +1924,7 @@ requires-dist = [
{ name = "anthropic", marker = "extra == 'dev'", specifier = ">=0.18.0" },
{ name = "anthropic", marker = "extra == 'evals'", specifier = ">=0.18.0" },
{ name = "any-llm-sdk", marker = "python_full_version >= '3.11' and extra == 'anyllm'", specifier = ">=1.0.0" },
- { name = "ast-grep-cli", specifier = ">=0.30.0" },
+ { name = "ast-grep-cli", specifier = ">=0.30.0,!=0.44.1" },
{ name = "autogen-agentchat", marker = "extra == 'autogen'", specifier = ">=0.7" },
{ name = "boto3", marker = "extra == 'bedrock'", specifier = ">=1.41.0" },
{ name = "botocore", extras = ["crt"], marker = "extra == 'bedrock'", specifier = ">=1.41.0" },