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
4 changes: 1 addition & 3 deletions tests/appsec/api_security/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

from utils import context, interfaces, missing_feature, rfc, scenarios, weblog, features, logger, flaky, bug
from utils import context, interfaces, missing_feature, rfc, scenarios, weblog, features, logger, flaky
from utils._weblog import HttpResponse
from types import EllipsisType

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

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

@missing_feature(context.library < "[email protected]")
@bug(context.library >= "[email protected]", reason="APPSEC-60014")
def test_request_method(self):
"""Can provide request header schema"""
schema_cookies = get_schema(self.request, "req.cookies")
Expand Down
8 changes: 1 addition & 7 deletions tests/appsec/rasp/test_api10.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@

import json
import urllib.parse
import pytest

from utils import features, weblog, interfaces, scenarios, rfc, context
from utils import features, weblog, interfaces, scenarios, rfc

from tests.appsec.rasp.utils import (
find_series,
validate_metric_variant_v2,
)

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

API10_TAGS = [
"_dd.appsec.trace.req_headers",
Expand Down
7 changes: 0 additions & 7 deletions tests/appsec/rasp/test_cmdi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

import pytest

from utils import features, weblog, interfaces, scenarios, rfc, context
from utils.dd_constants import Capabilities
Expand All @@ -16,12 +15,6 @@
BaseWAFVersion,
)

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


@rfc("https://docs.google.com/document/d/1DDWy3frMXDTAbk-BfnZ1FdRwuPx6Pl7AWyR4zjqRFZw")
@features.rasp_command_injection
Expand Down
8 changes: 0 additions & 8 deletions tests/appsec/rasp/test_lfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

import pytest

from utils import features, weblog, interfaces, scenarios, rfc, context
from utils import remote_config as rc
Expand All @@ -19,13 +18,6 @@
)


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


@rfc("https://docs.google.com/document/d/1vmMqpl8STDk7rJnd3YBsa6O9hCls_XHHdsodD61zr_4/edit#heading=h.3nydvvu7sn93")
@features.rasp_local_file_inclusion
@scenarios.appsec_rasp
Expand Down
7 changes: 0 additions & 7 deletions tests/appsec/rasp/test_shi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

import pytest

from utils import features, weblog, interfaces, scenarios, rfc, context
from utils.dd_constants import Capabilities
Expand All @@ -17,12 +16,6 @@
BaseWAFVersion,
)

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


class Test_Shi_Base:
def get_shell_value(self):
Expand Down
8 changes: 0 additions & 8 deletions tests/appsec/rasp/test_sqli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

import pytest

from utils import features, weblog, interfaces, scenarios, rfc, context
from utils.dd_constants import Capabilities
Expand All @@ -17,13 +16,6 @@
)


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


@rfc("https://docs.google.com/document/d/1vmMqpl8STDk7rJnd3YBsa6O9hCls_XHHdsodD61zr_4/edit#heading=h.gv4kwto3561e")
@features.rasp_sql_injection
@scenarios.appsec_rasp
Expand Down
8 changes: 0 additions & 8 deletions tests/appsec/rasp/test_ssrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

import pytest

from utils import features, weblog, interfaces, scenarios, rfc, context
from utils.dd_constants import Capabilities
Expand All @@ -17,13 +16,6 @@
)


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


@rfc("https://docs.google.com/document/d/1vmMqpl8STDk7rJnd3YBsa6O9hCls_XHHdsodD61zr_4/edit#heading=h.3r1lwuv4y2g3")
@features.rasp_server_side_request_forgery
@scenarios.appsec_rasp
Expand Down
7 changes: 0 additions & 7 deletions tests/appsec/test_blocking_addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Copyright 2021 Datadog, Inc.

import json
import pytest

from utils import (
bug,
Expand All @@ -19,12 +18,6 @@
HttpResponse,
)

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


def _assert_custom_event_tag_presence(expected_value: str):
def wrapper(span: dict):
Expand Down
9 changes: 0 additions & 9 deletions tests/appsec/test_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,11 @@
# Copyright 2021 Datadog, Inc.


import pytest

from utils import weblog, context, interfaces, missing_feature, irrelevant, rfc, scenarios, features
from utils.tools import nested_lookup
from utils.dd_constants import PYTHON_RELEASE_GA_1_1


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


TELEMETRY_REQUEST_TYPE_GENERATE_METRICS = "generate-metrics"


Expand Down
7 changes: 0 additions & 7 deletions tests/appsec/test_fingerprinting.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import re
import pytest
from utils.dd_constants import Capabilities
from utils import features
from utils import interfaces
Expand All @@ -13,12 +12,6 @@
ARACHNI_HEADERS = {"User-Agent": "Arachni/v1.5.1"}
DD_BLOCK_HEADERS = {"User-Agent": "dd-test-scanner-log-block"}

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


def get_span_meta(r: HttpResponse):
res = [span.get("meta", {}) for _, _, span in interfaces.library.get_spans(request=r)]
Expand Down
8 changes: 0 additions & 8 deletions tests/appsec/test_only_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.

import pytest

from utils import context, features, interfaces, irrelevant, scenarios, flaky


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


@scenarios.appsec_blocking
@scenarios.appsec_lambda_blocking
@scenarios.appsec_rasp
Expand Down
9 changes: 0 additions & 9 deletions tests/appsec/test_trace_tagging.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the the Apache License Version 2.0.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2021 Datadog, Inc.
import pytest

from utils import (
interfaces,
scenarios,
weblog,
features,
context,
)
from utils.dd_constants import Capabilities, SamplingPriority


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


@features.appsec_trace_tagging_rules
@scenarios.appsec_blocking
@scenarios.appsec_lambda_blocking
Expand Down
8 changes: 0 additions & 8 deletions tests/appsec/waf/test_blocking.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from pathlib import Path
import pytest

from utils import interfaces, bug, scenarios, weblog, rfc, missing_feature, flaky, features
from utils._context.core import context
Expand All @@ -10,13 +9,6 @@
)


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


BLOCK_TEMPLATE_JSON_MIN_V1 = "blocked.v1.min.json"
BLOCK_TEMPLATE_HTML_MIN_V2 = "blocked.v2.min.html"
BLOCK_TEMPLATE_JSON_MIN_V3 = "blocked.v3.min.json"
Expand Down
Loading