Skip to content

Commit 8dae1b8

Browse files
committed
Use repr to sanitize input for eval.
1 parent fd1533d commit 8dae1b8

File tree

1 file changed

+1
-1
lines changed
  • datadog_checks_base/datadog_checks/base/checks

1 file changed

+1
-1
lines changed

datadog_checks_base/datadog_checks/base/checks/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ def load_config(yaml_str: str) -> Any:
14791479
import sys
14801480

14811481
process = subprocess.Popen(
1482-
[sys.executable, '-c', 'import sys, yaml; print(yaml.safe_load(sys.stdin.read()))'],
1482+
[sys.executable, '-c', 'import sys, yaml; print(repr(yaml.safe_load(sys.stdin.read())))'],
14831483
stdin=subprocess.PIPE,
14841484
stdout=subprocess.PIPE,
14851485
stderr=subprocess.PIPE,

0 commit comments

Comments
 (0)