Skip to the content.

AgentEra/Agently - security scan

Repository: AgentEra/Agently Commit scanned: 9ea830be26f0e37ebf621b054aa91c766d28f70d Scan date: 2026-07-03 Disclosure status: disclosed — one focused issue filed (#312)

Summary

Severity Count
Critical 0
High 15
Medium 10
Low 0 (filtered at --min-severity medium)
Info 0

Total findings: 25 — 14 are one parameterized-SQL false-positive cluster; the real signal is a single sandbox-escape.

Agently is a widely-used GenAI application framework (Apache-2.0, ~1.6k stars, millions of PyPI downloads). It ships an agent action that runs model-generated Python through a component named PythonSandbox. That is the interesting surface, and it’s where the one real finding lives — the rest of the scan is a clean, well-parameterized persistence layer that the SQL rules misread.

Top findings

1. PythonSandbox restricted-exec is escapable — model code can reach host RCE (filed: #312)

2. The 14 “high” SQL findings are a parameterized-query false positive

3. A secondary Windows-only shell=True hardening

Patterns observed

“Sandbox” is a security claim, and this one doesn’t hold — which is exactly why it’s the finding. The AG2 scan the week before had exec/docker-run everywhere and none of it was a finding, because AG2’s LocalCommandLineCodeExecutor is documented as unsandboxed (use the Docker executor for isolation). Agently is the inverse: a component named PythonSandbox, described as running code “safely,” wired to execute model output — where the isolation is best-effort restricted-exec that the standard __subclasses__ walk defeats. A tool that advertises a boundary it doesn’t enforce is more dangerous than one that honestly says “no boundary here,” because users route untrusted code through it on the strength of the name. The fix is usually documentation (call it best-effort) or real OS-level isolation, not a bigger builtins denylist.

The rest of the code is clean, and the SQL cluster shows why the count lies. 14 of the 15 “highs” are one file’s SQLite layer, all correctly parameterized (bound values, internal-only identifier interpolation) — the same sqlalchemy-execute-raw-query false-positive shape seen on codex-lb and inspect_ai. Strip that cluster and the examples/tests, and the scan is one real item. Dependencies are clean (trivy and pip-audit both empty), and there are no secrets (gitleaks clean).

One focused issue, not a review dump. The SQL cluster, the plugin non-literal-imports (the lazy-import mechanism), the non-crypto SHA-1 (blueprint IDs), and the eval/exec hits in examples/ are all noise or by-design. Filing all of it would bury the one thing that matters. The issue (#312) leads with the code path — model input → python_codeexec — and the concrete escape, and credits the existing _-attr guard.

Notes on the tool

Disclosure timeline

Reproduce

git clone https://github.com/AgentEra/Agently /tmp/scan-target
python scanner/run_scan.py --repo /tmp/scan-target \
  --reports-dir ./reports/agentera-agently \
  --min-severity medium --ignore-samples