⏱️ Bug: No Timeout Limit on Script/Command Execution
Current Behavior
The /api/scripts/run and /api/exec endpoints execute
scripts and commands with no timeout limit. If a script
contains an infinite loop, a hanging network call, or any
long-running operation, it will block the server indefinitely
with no way to cancel or recover from it.
Steps to Reproduce
- Create a script with an infinite loop e.g.
while true; do echo "running"; done
- Run the script via
/api/scripts/run
- The server hangs forever with no response or timeout
Expected Behavior
Scripts and commands should have a configurable timeout limit.
If execution exceeds the limit, the process should be killed
and a clear timeout error should be returned to the user.
Proposed Solution
Add a timeout parameter to run_script() and exec_command()
in app.py using subprocess timeout
Why This Matters
- Prevents server from hanging on bad scripts
- Protects against accidental or intentional DoS
- Standard safety feature in all script execution platforms
Files to Modify
app.py — run_script(), exec_command()
I am a GSSoC '26 contributor and would love to work on
this issue. Please assign it to me! 🙏
⏱️ Bug: No Timeout Limit on Script/Command Execution
Current Behavior
The
/api/scripts/runand/api/execendpoints executescripts and commands with no timeout limit. If a script
contains an infinite loop, a hanging network call, or any
long-running operation, it will block the server indefinitely
with no way to cancel or recover from it.
Steps to Reproduce
while true; do echo "running"; done/api/scripts/runExpected Behavior
Scripts and commands should have a configurable timeout limit.
If execution exceeds the limit, the process should be killed
and a clear timeout error should be returned to the user.
Proposed Solution
Add a timeout parameter to
run_script()andexec_command()in
app.pyusingsubprocesstimeoutWhy This Matters
Files to Modify
app.py—run_script(),exec_command()I am a GSSoC '26 contributor and would love to work on
this issue. Please assign it to me! 🙏