diff --git a/sql/plugins/binglog2sql.py b/sql/plugins/binglog2sql.py index c829be421f..f4431a0950 100644 --- a/sql/plugins/binglog2sql.py +++ b/sql/plugins/binglog2sql.py @@ -33,7 +33,7 @@ def generate_args2cmd(self, args, shell): 'start-datetime', 'stop-datetime'] filter_options = ['databases', 'tables', 'only-dml', 'sql-type'] if shell: - cmd_args = f'python {self.path}' if self.path else '' + cmd_args = f'python {shlex.quote(str(self.path))}' if self.path else '' for name, value in args.items(): if name in conn_options: cmd_args += f' {value}' diff --git a/sql/plugins/soar.py b/sql/plugins/soar.py index 1a858bde5a..6220c59b33 100644 --- a/sql/plugins/soar.py +++ b/sql/plugins/soar.py @@ -28,7 +28,7 @@ def generate_args2cmd(self, args, shell): :return: """ if shell: - cmd_args = self.path if self.path else '' + cmd_args = shlex.quote(str(self.path)) if self.path else '' for name, value in args.items(): cmd_args += f" -{name}={shlex.quote(str(value))}" else: diff --git a/sql/plugins/sqladvisor.py b/sql/plugins/sqladvisor.py index 231547d81f..744a11f2b4 100644 --- a/sql/plugins/sqladvisor.py +++ b/sql/plugins/sqladvisor.py @@ -27,7 +27,7 @@ def generate_args2cmd(self, args, shell): :return: """ if shell: - cmd_args = self.path if self.path else '' + cmd_args = shlex.quote(str(self.path)) if self.path else '' for name, value in args.items(): cmd_args += f" -{name} {shlex.quote(str(value))}" else: