Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoEchevarria committed Nov 21, 2024
1 parent 89c9a4c commit d1156a3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions tests/appsec/rasp/test_libddwaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 7 additions & 11 deletions tests/appsec/rasp/test_shi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d1156a3

Please sign in to comment.