diff --git a/rules/python/lang/os_command_injection.yml b/rules/python/lang/os_command_injection.yml index 41b26ef8..f9a8f829 100644 --- a/rules/python/lang/os_command_injection.yml +++ b/rules/python/lang/os_command_injection.yml @@ -22,7 +22,7 @@ patterns: - variable: EXTERNAL_INPUT detection: python_shared_common_external_input scope: result - - pattern: subprocess.$($$<...>) + - pattern: subprocess.$($$<...>) filters: - variable: METHOD values: @@ -31,8 +31,8 @@ patterns: - check_output - run - Popen - - variable: SUBPROC_EXTERNAL_INPUT - detection: python_lang_os_command_injection_external_input_subproc + - variable: EXTERNAL_INPUT + detection: python_shared_common_external_input scope: result - pattern: $.$($<_>, $<...>$$<...>, $<...>) filters: @@ -92,19 +92,6 @@ auxiliary: patterns: - os - __import__("os") - - id: python_lang_os_command_injection_external_input_subproc - patterns: - - pattern: $<...>$$<...> - filters: - - variable: EXTERNAL_INPUT - detection: python_shared_common_external_input - scope: result - - pattern: | - [$<...>$$<...>] - filters: - - variable: EXTERNAL_INPUT - detection: python_shared_common_external_input - scope: result languages: - python severity: critical