Skip to content

Commit da29b22

Browse files
authored
[python_lambda]: re-enable appsec lambda tests (#5867)
1 parent e258f3a commit da29b22

File tree

13 files changed

+2
-96
lines changed

13 files changed

+2
-96
lines changed

tests/appsec/api_security/test_schemas.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This product includes software developed at Datadog (https://www.datadoghq.com/).
33
# Copyright 2021 Datadog, Inc.
44

5-
from utils import context, interfaces, missing_feature, rfc, scenarios, weblog, features, logger, flaky, bug
5+
from utils import context, interfaces, missing_feature, rfc, scenarios, weblog, features, logger, flaky
66
from utils._weblog import HttpResponse
77
from types import EllipsisType
88

@@ -263,7 +263,6 @@ def setup_request_method(self):
263263
headers={"user-agent": "dd-test-scanner-log-block"},
264264
)
265265

266-
@bug(context.library >= "[email protected]", reason="APPSEC-60014")
267266
def test_request_method(self):
268267
"""Can provide response body schema"""
269268
assert self.request_noblock.status_code == 200
@@ -320,7 +319,6 @@ def setup_request_method(self):
320319
)
321320

322321
@missing_feature(context.library < "[email protected]")
323-
@bug(context.library >= "[email protected]", reason="APPSEC-60014")
324322
def test_request_method(self):
325323
"""Can provide request header schema"""
326324
schema_cookies = get_schema(self.request, "req.cookies")

tests/appsec/rasp/test_api10.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,14 @@
44

55
import json
66
import urllib.parse
7-
import pytest
87

9-
from utils import features, weblog, interfaces, scenarios, rfc, context
8+
from utils import features, weblog, interfaces, scenarios, rfc
109

1110
from tests.appsec.rasp.utils import (
1211
find_series,
1312
validate_metric_variant_v2,
1413
)
1514

16-
if context.library > "[email protected]":
17-
pytestmark = [
18-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
19-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
20-
]
2115

2216
API10_TAGS = [
2317
"_dd.appsec.trace.req_headers",

tests/appsec/rasp/test_cmdi.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# This product includes software developed at Datadog (https://www.datadoghq.com/).
33
# Copyright 2021 Datadog, Inc.
44

5-
import pytest
65

76
from utils import features, weblog, interfaces, scenarios, rfc, context
87
from utils.dd_constants import Capabilities
@@ -16,12 +15,6 @@
1615
BaseWAFVersion,
1716
)
1817

19-
if context.library > "[email protected]":
20-
pytestmark = [
21-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
22-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
23-
]
24-
2518

2619
@rfc("https://docs.google.com/document/d/1DDWy3frMXDTAbk-BfnZ1FdRwuPx6Pl7AWyR4zjqRFZw")
2720
@features.rasp_command_injection

tests/appsec/rasp/test_lfi.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# This product includes software developed at Datadog (https://www.datadoghq.com/).
33
# Copyright 2021 Datadog, Inc.
44

5-
import pytest
65

76
from utils import features, weblog, interfaces, scenarios, rfc, context
87
from utils import remote_config as rc
@@ -19,13 +18,6 @@
1918
)
2019

2120

22-
if context.library > "[email protected]":
23-
pytestmark = [
24-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
25-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
26-
]
27-
28-
2921
@rfc("https://docs.google.com/document/d/1vmMqpl8STDk7rJnd3YBsa6O9hCls_XHHdsodD61zr_4/edit#heading=h.3nydvvu7sn93")
3022
@features.rasp_local_file_inclusion
3123
@scenarios.appsec_rasp

tests/appsec/rasp/test_shi.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# This product includes software developed at Datadog (https://www.datadoghq.com/).
33
# Copyright 2021 Datadog, Inc.
44

5-
import pytest
65

76
from utils import features, weblog, interfaces, scenarios, rfc, context
87
from utils.dd_constants import Capabilities
@@ -17,12 +16,6 @@
1716
BaseWAFVersion,
1817
)
1918

20-
if context.library > "[email protected]":
21-
pytestmark = [
22-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
23-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
24-
]
25-
2619

2720
class Test_Shi_Base:
2821
def get_shell_value(self):

tests/appsec/rasp/test_sqli.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# This product includes software developed at Datadog (https://www.datadoghq.com/).
33
# Copyright 2021 Datadog, Inc.
44

5-
import pytest
65

76
from utils import features, weblog, interfaces, scenarios, rfc, context
87
from utils.dd_constants import Capabilities
@@ -17,13 +16,6 @@
1716
)
1817

1918

20-
if context.library > "[email protected]":
21-
pytestmark = [
22-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
23-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
24-
]
25-
26-
2719
@rfc("https://docs.google.com/document/d/1vmMqpl8STDk7rJnd3YBsa6O9hCls_XHHdsodD61zr_4/edit#heading=h.gv4kwto3561e")
2820
@features.rasp_sql_injection
2921
@scenarios.appsec_rasp

tests/appsec/rasp/test_ssrf.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# This product includes software developed at Datadog (https://www.datadoghq.com/).
33
# Copyright 2021 Datadog, Inc.
44

5-
import pytest
65

76
from utils import features, weblog, interfaces, scenarios, rfc, context
87
from utils.dd_constants import Capabilities
@@ -17,13 +16,6 @@
1716
)
1817

1918

20-
if context.library > "[email protected]":
21-
pytestmark = [
22-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
23-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
24-
]
25-
26-
2719
@rfc("https://docs.google.com/document/d/1vmMqpl8STDk7rJnd3YBsa6O9hCls_XHHdsodD61zr_4/edit#heading=h.3r1lwuv4y2g3")
2820
@features.rasp_server_side_request_forgery
2921
@scenarios.appsec_rasp

tests/appsec/test_blocking_addresses.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Copyright 2021 Datadog, Inc.
44

55
import json
6-
import pytest
76

87
from utils import (
98
bug,
@@ -19,12 +18,6 @@
1918
HttpResponse,
2019
)
2120

22-
if context.library > "[email protected]":
23-
pytestmark = [
24-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
25-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
26-
]
27-
2821

2922
def _assert_custom_event_tag_presence(expected_value: str):
3023
def wrapper(span: dict):

tests/appsec/test_conf.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,11 @@
33
# Copyright 2021 Datadog, Inc.
44

55

6-
import pytest
7-
86
from utils import weblog, context, interfaces, missing_feature, irrelevant, rfc, scenarios, features
97
from utils.tools import nested_lookup
108
from utils.dd_constants import PYTHON_RELEASE_GA_1_1
119

1210

13-
if context.library > "[email protected]":
14-
pytestmark = [
15-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
16-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
17-
]
18-
19-
2011
TELEMETRY_REQUEST_TYPE_GENERATE_METRICS = "generate-metrics"
2112

2213

tests/appsec/test_fingerprinting.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import re
2-
import pytest
32
from utils.dd_constants import Capabilities
43
from utils import features
54
from utils import interfaces
@@ -13,12 +12,6 @@
1312
ARACHNI_HEADERS = {"User-Agent": "Arachni/v1.5.1"}
1413
DD_BLOCK_HEADERS = {"User-Agent": "dd-test-scanner-log-block"}
1514

16-
if context.library > "[email protected]":
17-
pytestmark = [
18-
pytest.mark.xfail(reason="bug (APPSEC-60014)"),
19-
pytest.mark.declaration(declaration="bug", details="APPSEC-60014"),
20-
]
21-
2215

2316
def get_span_meta(r: HttpResponse):
2417
res = [span.get("meta", {}) for _, _, span in interfaces.library.get_spans(request=r)]

0 commit comments

Comments
 (0)