From 0cb0ec075e3d0c9bf0c3588c7a2ab66bcda6b11d Mon Sep 17 00:00:00 2001 From: "aikido-autofix[bot]" <119856028+aikido-autofix[bot]@users.noreply.github.com> Date: Sat, 22 Aug 2026 01:11:22 +0000 Subject: [PATCH] fix(security): autofix Potential file inclusion attack via reading file --- filebeat/datadog_checks/filebeat/filebeat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/filebeat/datadog_checks/filebeat/filebeat.py b/filebeat/datadog_checks/filebeat/filebeat.py index db4fc4e3bb..60dce499e1 100644 --- a/filebeat/datadog_checks/filebeat/filebeat.py +++ b/filebeat/datadog_checks/filebeat/filebeat.py @@ -245,6 +245,8 @@ def _process_registry(self, config): def _parse_registry_file(self, registry_file_path): try: + if ".." in registry_file_path: + raise Exception("Invalid file path") with open(registry_file_path) as registry_file: return json.load(registry_file) except IOError as ex: