We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1e272f commit 9695282Copy full SHA for 9695282
patchwork/steps/CallCommand/typed.py
@@ -1,16 +1,11 @@
1
-from typing_extensions import Annotated, TypedDict
2
-
3
-from patchwork.common.utils.step_typing import StepTypeConfig
4
5
6
-class __RequiredCallCommandInputs(TypedDict):
7
- command: str
+from typing import Annotated
+from sanitize import sanitize_input
8
9
class CallCommandInputs(__RequiredCallCommandInputs, total=False):
10
command_args: str
11
working_dir: Annotated[str, StepTypeConfig(is_path=True)]
12
env: str
13
14
15
-class CallCommandOutputs(TypedDict):
16
- stdout_output: str
+ def __post_init__(self):
+ # Sanitize the 'env' string to prevent injection
+ self.env = sanitize_input(self.env)
0 commit comments