15 lines
315 B
Bash
Executable File
15 lines
315 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
python3 - <<'PY'
|
|
import asyncio
|
|
from duck_core.tools.shell_exec_safe import ShellExecSafeTool
|
|
|
|
async def main():
|
|
result = await ShellExecSafeTool(".").run({"command": "rm -rf ."})
|
|
assert not result.ok
|
|
print("OK: dangerous command blocked")
|
|
|
|
asyncio.run(main())
|
|
PY
|