Skip to content

Commit 9695282

Browse files
author
patched.codes[bot]
committed
Patched /tmp/tmpktlv2p12/patchwork/steps/CallCommand/typed.py
1 parent a1e272f commit 9695282

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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
1+
from typing import Annotated
2+
from sanitize import sanitize_input
83

94
class CallCommandInputs(__RequiredCallCommandInputs, total=False):
105
command_args: str
116
working_dir: Annotated[str, StepTypeConfig(is_path=True)]
127
env: str
138

14-
15-
class CallCommandOutputs(TypedDict):
16-
stdout_output: str
9+
def __post_init__(self):
10+
# Sanitize the 'env' string to prevent injection
11+
self.env = sanitize_input(self.env)

0 commit comments

Comments
 (0)