Commit Graph

7 Commits (f105f4cf20743f3b56bfa834a391dcd477bfee40)

Author SHA1 Message Date
Sebastion f105f4cf20
Merge d619d86c4c into 4497610ec0 2026-05-23 17:19:14 +08:00
jingyaogong 4497610ec0 [fix] issue#771 2026-05-19 17:40:03 +08:00
jingyaogong 802c15b2b4 [feat] reduce RL memory 2026-05-06 15:07:28 +08:00
jingyaogong 6361510016 [fix] rollout bugs 2026-04-27 17:54:09 +08:00
Sebastion d619d86c4c
fix: replace dangerous expression evaluation with AST-validated safe math parser (CWE-95)
Replace unconstrained expression evaluation in calculate_math tool
handlers with safe_eval_math(), which parses into an AST and only
allows literal numbers and basic arithmetic operators. Function calls,
attribute access, and name lookups are rejected, preventing arbitrary
code execution via prompt injection through LLM-generated tool calls.

Affected files:
- scripts/web_demo.py (Streamlit demo)
- scripts/eval_toolcall.py (tool call testing)
- trainer/train_agent.py (agent training)
2026-04-23 19:36:39 +01:00
jingyaogong 5416a44471 [fix] bugs 2026-04-21 13:03:34 +08:00
jingyaogong 101d7df2da [update] minimind-3 2026-03-25 23:57:45 +08:00