#463 Memory Leak: _active_tokens never auto-cleaned in execution_token.py

closed high Created 2025-12-17 01:11 · Updated 2025-12-17 01:15

Description

Edit
engine/sandbox/execution_token.py:309,312-328 stores ExecutionToken instances in _active_tokens dict. Tokens are only removed on explicit cleanup() call. If cleanup is not called (crash, exception, etc.), tokens accumulate forever. FIX: Add automatic token expiration using TTL or weak references, or ensure cleanup is always called via context manager/finally block.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...