tldraw-api
Audited by Socket on Jul 19, 2026
1 alert found:
AnomalyThis Bash script is best characterized as a high-privilege local automation bridge for tldraw Desktop. Its main security concern is the intentional provision of authenticated editor-side JavaScript execution via /api/doc/<doc_id>/exec, including transmission of arbitrary code from a user-supplied JS_FILE, plus the ability to trigger desktop actions such as open/save and screenshot/serialization. The snippet shows no overt malicious payloads, no external network exfiltration, and no system-level operations beyond interacting with the local tldraw API using a token stored in server.json; nonetheless, if an attacker can influence arguments or JS_FILE content, the impact within the editor context can be substantial. Treat as security-sensitive and guard access to invocation, inputs, and the integrity of JS_FILE.