From d1156a3c5eee743dec2809dfba856298321238c4 Mon Sep 17 00:00:00 2001 From: NachoEchevarria Date: Thu, 21 Nov 2024 18:05:36 +0100 Subject: [PATCH] Fix format --- manifests/dotnet.yml | 2 +- manifests/java.yml | 2 +- manifests/nodejs.yml | 2 +- manifests/python.yml | 2 +- tests/appsec/rasp/test_libddwaf.py | 4 +--- tests/appsec/rasp/test_shi.py | 18 +++++++----------- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/manifests/dotnet.yml b/manifests/dotnet.yml index b926d2a53f..a47b14c972 100644 --- a/manifests/dotnet.yml +++ b/manifests/dotnet.yml @@ -162,7 +162,7 @@ tests/: Test_Lfi_UrlQuery: v2.51.0 test_libddwaf.py: Test_Libddwaf_Version: v3.4.1 - Test_LibddwafVersion_CmdI: missing_feature + Test_Libddwaf_Version_CmdI: missing_feature test_shi.py: Test_Shi_BodyJson: v3.2.0 Test_Shi_BodyUrlEncoded: v3.2.0 diff --git a/manifests/java.yml b/manifests/java.yml index c8271be569..9d0dd6f169 100644 --- a/manifests/java.yml +++ b/manifests/java.yml @@ -609,7 +609,7 @@ tests/: Test_Libddwaf_Version: '*': v1.40.0 spring-boot-3-native: missing_feature (GraalVM. Tracing support only) - Test_LibddwafVersion_CmdI: missing_feature + Test_Libddwaf_Version_CmdI: missing_feature test_shi.py: irrelevant (Not support in Java) test_cmdi.py: missing_feature # SQLi was introduced in v1.38.0 (with RASP disabled by default, but was flaky) diff --git a/manifests/nodejs.yml b/manifests/nodejs.yml index 442aa424d8..aa5aa48993 100644 --- a/manifests/nodejs.yml +++ b/manifests/nodejs.yml @@ -297,7 +297,7 @@ tests/: nextjs: missing_feature test_libddwaf.py: Test_Libddwaf_Version: *ref_5_25_0 - Test_LibddwafVersion_CmdI: missing_feature + Test_Libddwaf_Version_CmdI: missing_feature test_shi.py: Test_Shi_BodyJson: '*': *ref_5_25_0 diff --git a/manifests/python.yml b/manifests/python.yml index f47e90f02a..8a0a5c8c0f 100644 --- a/manifests/python.yml +++ b/manifests/python.yml @@ -250,7 +250,7 @@ tests/: Test_Lfi_UrlQuery: v2.10.0 test_libddwaf.py: Test_Libddwaf_Version: v2.15.0 - Test_LibddwafVersion_CmdI: missing_feature + Test_Libddwaf_Version_CmdI: missing_feature test_shi.py: Test_Shi_BodyJson: v2.11.0-rc2 Test_Shi_BodyUrlEncoded: v2.11.0-rc2 diff --git a/tests/appsec/rasp/test_libddwaf.py b/tests/appsec/rasp/test_libddwaf.py index c9a037f61b..c86976cf6f 100644 --- a/tests/appsec/rasp/test_libddwaf.py +++ b/tests/appsec/rasp/test_libddwaf.py @@ -9,9 +9,7 @@ def check_min_version(min_version): series = find_series(True, "appsec", "waf.init") assert series - assert any( - validate_metric_tag_version("waf_version", min_version, s) for s in series - ) + assert any(validate_metric_tag_version("waf_version", min_version, s) for s in series) @features.rasp_local_file_inclusion diff --git a/tests/appsec/rasp/test_shi.py b/tests/appsec/rasp/test_shi.py index 02b6372be4..14693cb6bc 100644 --- a/tests/appsec/rasp/test_shi.py +++ b/tests/appsec/rasp/test_shi.py @@ -181,26 +181,22 @@ class Test_Shi_Telemetry_Variant_Tag: """Validate Telemetry data variant tag on exploit attempts""" def setup_shi_telemetry(self): - self.r = weblog.get( - "/rasp/shi", params={"list_dir": "$(cat /etc/passwd 1>&2 ; echo .)"} - ) + self.r = weblog.get("/rasp/shi", params={"list_dir": "$(cat /etc/passwd 1>&2 ; echo .)"}) def test_shi_telemetry(self): assert self.r.status_code == 403 series_eval = find_series(True, "appsec", "rasp.rule.eval") assert series_eval - assert any( - validate_metric_variant("rasp.rule.eval", "command_injection", "shell", s) - for s in series_eval - ), [s.get("tags") for s in series_eval] + assert any(validate_metric_variant("rasp.rule.eval", "command_injection", "shell", s) for s in series_eval), [ + s.get("tags") for s in series_eval + ] series_match = find_series(True, "appsec", "rasp.rule.match") assert series_match - assert any( - validate_metric_variant("rasp.rule.match", "command_injection", "shell", s) - for s in series_match - ), [s.get("tags") for s in series_match] + assert any(validate_metric_variant("rasp.rule.match", "command_injection", "shell", s) for s in series_match), [ + s.get("tags") for s in series_match + ] @rfc("https://docs.google.com/document/d/1gCXU3LvTH9en3Bww0AC2coSJWz1m7HcavZjvMLuDCWg/edit#heading=h.giijrtyn1fdx")