diff --git a/src/cloudflare/resources/url_scanner/url_scanner.py b/src/cloudflare/resources/url_scanner/url_scanner.py index b93ed2fa428..cb8e6f0100a 100644 --- a/src/cloudflare/resources/url_scanner/url_scanner.py +++ b/src/cloudflare/resources/url_scanner/url_scanner.py @@ -58,6 +58,7 @@ def scan( asn: str | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, + hash: str | NotGiven = NOT_GIVEN, hostname: str | NotGiven = NOT_GIVEN, ip: str | NotGiven = NOT_GIVEN, is_malicious: bool | NotGiven = NOT_GIVEN, @@ -98,6 +99,8 @@ def scan( date_start: Filter scans requested after date (inclusive). + hash: Filter scans by hash of any html/js/css request made by the webpage. + hostname: Filter scans by hostname of _any_ request made by the webpage. ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage. @@ -147,6 +150,7 @@ def scan( "asn": asn, "date_end": date_end, "date_start": date_start, + "hash": hash, "hostname": hostname, "ip": ip, "is_malicious": is_malicious, @@ -190,6 +194,7 @@ async def scan( asn: str | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, + hash: str | NotGiven = NOT_GIVEN, hostname: str | NotGiven = NOT_GIVEN, ip: str | NotGiven = NOT_GIVEN, is_malicious: bool | NotGiven = NOT_GIVEN, @@ -230,6 +235,8 @@ async def scan( date_start: Filter scans requested after date (inclusive). + hash: Filter scans by hash of any html/js/css request made by the webpage. + hostname: Filter scans by hostname of _any_ request made by the webpage. ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage. @@ -279,6 +286,7 @@ async def scan( "asn": asn, "date_end": date_end, "date_start": date_start, + "hash": hash, "hostname": hostname, "ip": ip, "is_malicious": is_malicious, diff --git a/src/cloudflare/types/url_scanner_scan_params.py b/src/cloudflare/types/url_scanner_scan_params.py index d50a318422b..e340d763cab 100644 --- a/src/cloudflare/types/url_scanner_scan_params.py +++ b/src/cloudflare/types/url_scanner_scan_params.py @@ -27,6 +27,9 @@ class URLScannerScanParams(TypedDict, total=False): date_start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Filter scans requested after date (inclusive).""" + hash: str + """Filter scans by hash of any html/js/css request made by the webpage.""" + hostname: str """Filter scans by hostname of _any_ request made by the webpage.""" diff --git a/tests/api_resources/test_url_scanner.py b/tests/api_resources/test_url_scanner.py index 60d65e178a7..3383d2bab00 100644 --- a/tests/api_resources/test_url_scanner.py +++ b/tests/api_resources/test_url_scanner.py @@ -35,6 +35,7 @@ def test_method_scan_with_all_params(self, client: Cloudflare) -> None: asn="13335", date_end=parse_datetime("2019-12-27T18:11:19.117Z"), date_start=parse_datetime("2019-12-27T18:11:19.117Z"), + hash="string", hostname="example.com", ip="1.1.1.1", is_malicious=True, @@ -106,6 +107,7 @@ async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare) asn="13335", date_end=parse_datetime("2019-12-27T18:11:19.117Z"), date_start=parse_datetime("2019-12-27T18:11:19.117Z"), + hash="string", hostname="example.com", ip="1.1.1.1", is_malicious=True,