Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/appsec/test_PII.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from utils import BaseTestCase, context, skipif


@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned")
@skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason)
@skipif(context.library == "dotnet", reason="missing feature")
@skipif(context.library == "java", reason="missing feature")
Expand Down
2 changes: 0 additions & 2 deletions tests/appsec/test_conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from utils import BaseTestCase, context, skipif, interfaces


@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned")
@skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason)
class Test_StaticRuleSet(BaseTestCase):
"""Test different way to configure AppSec"""
Expand All @@ -13,7 +12,6 @@ def test_basic_hardcoded_ruleset(self):
stdout.assert_presence(r"AppSec loaded \d+ rules from file <.*>$", level="INFO")


@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned")
@skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason)
@skipif(context.library == "dotnet", reason="Missing feature")
@skipif(context.library == "java", reason="Missing feature")
Expand Down
19 changes: 10 additions & 9 deletions tests/appsec/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
stdout = interfaces.library_stdout if context.library != "dotnet" else interfaces.library_dotnet_managed


@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned")
@skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason)
class Test_Standardization(BaseTestCase):
"""AppSec logs should be standardized"""
Expand Down Expand Up @@ -53,11 +52,6 @@ def test_d06(self):
stdout.assert_presence(r"Detecting an attack from rule crs-921-160:.*", level="DEBUG")
stdout.assert_presence(r"Detecting an attack from rule crs-913-110:.*", level="DEBUG")

@skipif(True, reason="missing feature: not testable as now")
def test_d07(self):
"""Log D7: Exception in rule"""
stdout.assert_presence(r"Rule .* failed. Error details: ", level="DEBUG")

@skipif(context.library == "dotnet", reason="missing feature")
def test_d09(self):
"""Log D9: WAF start of execution"""
Expand Down Expand Up @@ -95,18 +89,25 @@ def test_i08(self):
"""Log I8: Sending AppSec events"""
stdout.assert_presence(r"Sending \d+ AppSec events to the agent$", level="INFO")

@skipif(True, reason="missing feature: not testable as now")

@skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason)
@skipif(True, reason="missing feature: not testable as now")
class Test_StandardizationErrors(BaseTestCase):
"""AppSec error logs should be standardized"""

def test_d07(self):
"""Log D7: Exception in rule"""
stdout.assert_presence(r"Rule .* failed. Error details: ", level="DEBUG")

def test_i09(self):
"""Log I9: Dropping events"""
stdout.assert_presence(r"Dropping \d+ AppSec events because ", level="INFO")

@skipif(True, reason="missing feature: not testable as now")
def test_i10(self):
"""Log I10: Flushing events before shutdown"""
stdout.assert_presence(r"Reporting AppSec event batch because of process shutdown.$", level="INFO")


@skipif(context.library == "cpp", reason="not relevant: No C++ appsec planned")
@skipif(not context.appsec_is_released, reason=context.appsec_not_released_reason)
@skipif(True, reason="missing feature: will need a dedicated testing scenario")
class Test_StandardizationBlockMode(BaseTestCase):
Expand Down