You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search and filter CPE records.\n\nThis endpoint only returns the `software` objects for matching CPEs.\n\nThis endpoint is useful to find CPEs that can be used to filter CVEs.
295
+
Search and filter CPE records.
296
+
297
+
This endpoint only returns the `software` objects for matching CPEs.
298
+
299
+
This endpoint is useful to find CPEs that can be used to filter CVEs.
296
300
"""
297
301
),
298
302
filters=True,
@@ -324,22 +328,48 @@ class CpeView(viewsets.ViewSet):
OpenApiParameter('stix_id', type=OpenApiTypes.STR, location=OpenApiParameter.PATH, description='The full STIX `id` of the object. e.g. `vulnerability--4d2cad44-0a5a-5890-925c-29d535c3f49e`'),
331
+
OpenApiParameter('stix_id', type=OpenApiTypes.STR, location=OpenApiParameter.PATH, description='The full STIX `id` of the object. e.g. `software--93ff5b30-0322-50e8-90c1-1c3f151c8adc`'),
328
332
OpenApiParameter('cpe_name', type=OpenApiTypes.STR, location=OpenApiParameter.PATH, description='The full CPE name. e.g. `cpe:2.3:a:slicewp:affiliate_program_suite:1.0.13:*:*:*:*:wordpress:*:*`'),
329
333
]
330
334
331
335
332
336
classfilterset_class(FilterSet):
333
-
id=BaseCSVFilter(help_text='Filter the results by the STIX ID of the `software` object. e.g. `software--93ff5b30-0322-50e8-90c1-1c3f151c8adc`')
334
-
cpe_match_string=CharFilter(help_text='Filter CPEs that contain a full or partial CPE Match String. Search is a wildcard to support partial match strings (e.g. `cpe:2.3:o:microsoft:windows` will match `cpe:2.3:o:microsoft:windows_10_1607:-:*:*:*:*:*:x86:*`, `cpe:2.3:o:microsoft:windows_10_1607:-:*:*:*:*:*:x64:*`, etc.')
335
-
vendor=CharFilter(help_text='Filters CPEs returned by vendor name. Is wildcard search so `goog` will match `google`, `googe`, etc.')
336
-
product=CharFilter(help_text='Filters CPEs returned by product name. Is wildcard search so `chrom` will match `chrome`, `chromium`, etc.')
337
-
337
+
id=BaseCSVFilter(help_text=textwrap.dedent(
338
+
"""
339
+
Filter the results by the STIX ID of the `software` object. e.g. `software--93ff5b30-0322-50e8-90c1-1c3f151c8adc`
Filter CPEs that contain a full or partial CPE Match String. Search is a wildcard to support partial match strings (e.g. `cpe:2.3:o:microsoft:windows` will match `cpe:2.3:o:microsoft:windows_10_1607:-:*:*:*:*:*:x86:*`, `cpe:2.3:o:microsoft:windows_10_1607:-:*:*:*:*:*:x64:*`, etc.
345
+
"""
346
+
))
347
+
vendor=CharFilter(help_text=textwrap.dedent(
348
+
"""
349
+
Filters CPEs returned by vendor name. Is wildcard search so `goog` will match `google`, `googe`, etc.
350
+
"""
351
+
))
352
+
product=CharFilter(help_text=textwrap.dedent(
353
+
"""
354
+
Filters CPEs returned by product name. Is wildcard search so `chrom` will match `chrome`, `chromium`, etc.
help_text='Filters CPEs returned by product type.'
340
-
)
341
-
cve_vulnerable=BaseCSVFilter(help_text='Filters CPEs returned to those vulnerable to CVE ID specified. e.g. `CVE-2023-22518`.')
342
-
in_cve_pattern=BaseCSVFilter(help_text='Filters CPEs returned to those referenced CVE ID specified (if you want to only filter by vulnerable CPEs, use the `cve_vulnerable` parameter. e.g. `CVE-2023-22518`.')
Filters CPEs returned to those referenced CVE ID specified (if you want to only filter by vulnerable CPEs, use the `cve_vulnerable` parameter. e.g. `CVE-2023-22518`.
0 commit comments