Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def execute_route():
if not _check_api_key():
return jsonify({"error": "unauthorized"}), 401

from core.executor import execute
from core.executor import execute, _is_allowed_atomic_command
from core.remote_executor import execute_remote_winrm

body = request.get_json(silent=True) or {}
Expand All @@ -253,6 +253,12 @@ def execute_route():
if not command:
return jsonify({"success": False, "error": "command is required"}), 400

if not _is_allowed_atomic_command(command, executor_type):
return jsonify({
"success": False,
"error": "command is not in the embedded atomic allowlist for this executor",
}), 400

if transport == "winrm":
if not target_host:
return jsonify({
Expand Down
Loading