scanoss 1.12.2__py3-none-any.whl → 1.43.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- protoc_gen_swagger/__init__.py +13 -13
- protoc_gen_swagger/options/__init__.py +13 -13
- protoc_gen_swagger/options/annotations_pb2.py +18 -12
- protoc_gen_swagger/options/annotations_pb2.pyi +48 -0
- protoc_gen_swagger/options/annotations_pb2_grpc.py +20 -0
- protoc_gen_swagger/options/openapiv2_pb2.py +110 -99
- protoc_gen_swagger/options/openapiv2_pb2.pyi +1317 -0
- protoc_gen_swagger/options/openapiv2_pb2_grpc.py +20 -0
- scanoss/__init__.py +18 -18
- scanoss/api/__init__.py +17 -17
- scanoss/api/common/__init__.py +17 -17
- scanoss/api/common/v2/__init__.py +17 -17
- scanoss/api/common/v2/scanoss_common_pb2.py +49 -20
- scanoss/api/common/v2/scanoss_common_pb2_grpc.py +25 -0
- scanoss/api/components/__init__.py +17 -17
- scanoss/api/components/v2/__init__.py +17 -17
- scanoss/api/components/v2/scanoss_components_pb2.py +68 -43
- scanoss/api/components/v2/scanoss_components_pb2_grpc.py +83 -22
- scanoss/api/cryptography/v2/scanoss_cryptography_pb2.py +136 -21
- scanoss/api/cryptography/v2/scanoss_cryptography_pb2_grpc.py +766 -13
- scanoss/api/dependencies/__init__.py +17 -17
- scanoss/api/dependencies/v2/__init__.py +17 -17
- scanoss/api/dependencies/v2/scanoss_dependencies_pb2.py +56 -29
- scanoss/api/dependencies/v2/scanoss_dependencies_pb2_grpc.py +94 -8
- scanoss/api/geoprovenance/__init__.py +23 -0
- scanoss/api/geoprovenance/v2/__init__.py +23 -0
- scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2.py +92 -0
- scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2_grpc.py +381 -0
- scanoss/api/licenses/__init__.py +23 -0
- scanoss/api/licenses/v2/__init__.py +23 -0
- scanoss/api/licenses/v2/scanoss_licenses_pb2.py +84 -0
- scanoss/api/licenses/v2/scanoss_licenses_pb2_grpc.py +302 -0
- scanoss/api/scanning/__init__.py +17 -17
- scanoss/api/scanning/v2/__init__.py +17 -17
- scanoss/api/scanning/v2/scanoss_scanning_pb2.py +42 -13
- scanoss/api/scanning/v2/scanoss_scanning_pb2_grpc.py +86 -7
- scanoss/api/semgrep/__init__.py +17 -17
- scanoss/api/semgrep/v2/__init__.py +17 -17
- scanoss/api/semgrep/v2/scanoss_semgrep_pb2.py +50 -23
- scanoss/api/semgrep/v2/scanoss_semgrep_pb2_grpc.py +151 -16
- scanoss/api/vulnerabilities/__init__.py +17 -17
- scanoss/api/vulnerabilities/v2/__init__.py +17 -17
- scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py +78 -31
- scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py +282 -18
- scanoss/cli.py +2359 -370
- scanoss/components.py +187 -94
- scanoss/constants.py +22 -0
- scanoss/cryptography.py +308 -0
- scanoss/csvoutput.py +91 -58
- scanoss/cyclonedx.py +221 -63
- scanoss/data/build_date.txt +1 -1
- scanoss/data/osadl-copyleft.json +133 -0
- scanoss/data/scanoss-settings-schema.json +254 -0
- scanoss/delta.py +197 -0
- scanoss/export/__init__.py +23 -0
- scanoss/export/dependency_track.py +227 -0
- scanoss/file_filters.py +582 -0
- scanoss/filecount.py +75 -69
- scanoss/gitlabqualityreport.py +214 -0
- scanoss/header_filter.py +563 -0
- scanoss/inspection/__init__.py +23 -0
- scanoss/inspection/policy_check/__init__.py +0 -0
- scanoss/inspection/policy_check/dependency_track/__init__.py +0 -0
- scanoss/inspection/policy_check/dependency_track/project_violation.py +479 -0
- scanoss/inspection/policy_check/policy_check.py +222 -0
- scanoss/inspection/policy_check/scanoss/__init__.py +0 -0
- scanoss/inspection/policy_check/scanoss/copyleft.py +243 -0
- scanoss/inspection/policy_check/scanoss/undeclared_component.py +309 -0
- scanoss/inspection/summary/__init__.py +0 -0
- scanoss/inspection/summary/component_summary.py +170 -0
- scanoss/inspection/summary/license_summary.py +191 -0
- scanoss/inspection/summary/match_summary.py +341 -0
- scanoss/inspection/utils/file_utils.py +44 -0
- scanoss/inspection/utils/license_utils.py +123 -0
- scanoss/inspection/utils/markdown_utils.py +63 -0
- scanoss/inspection/utils/scan_result_processor.py +417 -0
- scanoss/osadl.py +125 -0
- scanoss/results.py +275 -0
- scanoss/scancodedeps.py +87 -38
- scanoss/scanner.py +431 -539
- scanoss/scanners/__init__.py +23 -0
- scanoss/scanners/container_scanner.py +476 -0
- scanoss/scanners/folder_hasher.py +358 -0
- scanoss/scanners/scanner_config.py +73 -0
- scanoss/scanners/scanner_hfh.py +252 -0
- scanoss/scanoss_settings.py +337 -0
- scanoss/scanossapi.py +140 -101
- scanoss/scanossbase.py +59 -22
- scanoss/scanossgrpc.py +799 -251
- scanoss/scanpostprocessor.py +294 -0
- scanoss/scantype.py +22 -21
- scanoss/services/dependency_track_service.py +132 -0
- scanoss/spdxlite.py +532 -174
- scanoss/threadeddependencies.py +148 -47
- scanoss/threadedscanning.py +53 -37
- scanoss/utils/__init__.py +23 -0
- scanoss/utils/abstract_presenter.py +103 -0
- scanoss/utils/crc64.py +96 -0
- scanoss/utils/file.py +84 -0
- scanoss/utils/scanoss_scan_results_utils.py +41 -0
- scanoss/utils/simhash.py +198 -0
- scanoss/winnowing.py +241 -63
- {scanoss-1.12.2.dist-info → scanoss-1.43.1.dist-info}/METADATA +18 -9
- scanoss-1.43.1.dist-info/RECORD +110 -0
- {scanoss-1.12.2.dist-info → scanoss-1.43.1.dist-info}/WHEEL +1 -1
- scanoss-1.12.2.dist-info/RECORD +0 -58
- {scanoss-1.12.2.dist-info → scanoss-1.43.1.dist-info}/entry_points.txt +0 -0
- {scanoss-1.12.2.dist-info → scanoss-1.43.1.dist-info/licenses}/LICENSE +0 -0
- {scanoss-1.12.2.dist-info → scanoss-1.43.1.dist-info}/top_level.txt +0 -0
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
3
4
|
# source: scanoss/api/vulnerabilities/v2/scanoss-vulnerabilities.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.0
|
|
4
6
|
"""Generated protocol buffer code."""
|
|
5
|
-
from google.protobuf.internal import builder as _builder
|
|
6
7
|
from google.protobuf import descriptor as _descriptor
|
|
7
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
8
10
|
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
0,
|
|
17
|
+
'',
|
|
18
|
+
'scanoss/api/vulnerabilities/v2/scanoss-vulnerabilities.proto'
|
|
19
|
+
)
|
|
9
20
|
# @@protoc_insertion_point(imports)
|
|
10
21
|
|
|
11
22
|
_sym_db = _symbol_database.Default()
|
|
@@ -13,37 +24,73 @@ _sym_db = _symbol_database.Default()
|
|
|
13
24
|
|
|
14
25
|
from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
|
|
15
26
|
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
16
|
-
from
|
|
17
|
-
|
|
27
|
+
from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2
|
|
18
28
|
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n<scanoss/api/vulnerabilities/v2/scanoss-vulnerabilities.proto\x12\x1escanoss.api.vulnerabilities.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\"\x8d\x01\n\x14VulnerabilityRequest\x12I\n\x05purls\x18\x01 \x03(\x0b\x32:.scanoss.api.vulnerabilities.v2.VulnerabilityRequest.Purls\x1a*\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x13\n\x0brequirement\x18\x02 \x01(\t\"\xab\x01\n\x0b\x43peResponse\x12@\n\x05purls\x18\x01 \x03(\x0b\x32\x31.scanoss.api.vulnerabilities.v2.CpeResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a#\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0c\n\x04\x63pes\x18\x02 \x03(\t\"\xa3\x03\n\x15VulnerabilityResponse\x12J\n\x05purls\x18\x01 \x03(\x0b\x32;.scanoss.api.vulnerabilities.v2.VulnerabilityResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x8f\x01\n\x0fVulnerabilities\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03\x63ve\x18\x02 \x01(\t\x12\x0b\n\x03url\x18\x03 \x01(\t\x12\x0f\n\x07summary\x18\x04 \x01(\t\x12\x10\n\x08severity\x18\x05 \x01(\t\x12\x11\n\tpublished\x18\x06 \x01(\t\x12\x10\n\x08modified\x18\x07 \x01(\t\x12\x0e\n\x06source\x18\x08 \x01(\t\x1au\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12^\n\x0fvulnerabilities\x18\x02 \x03(\x0b\x32\x45.scanoss.api.vulnerabilities.v2.VulnerabilityResponse.Vulnerabilities2\xdb\x03\n\x0fVulnerabilities\x12x\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/api/v2/vulnerabilities/echo:\x01*\x12\x95\x01\n\x07GetCpes\x12\x34.scanoss.api.vulnerabilities.v2.VulnerabilityRequest\x1a+.scanoss.api.vulnerabilities.v2.CpeResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/api/v2/vulnerabilities/cpes:\x01*\x12\xb5\x01\n\x12GetVulnerabilities\x12\x34.scanoss.api.vulnerabilities.v2.VulnerabilityRequest\x1a\x35.scanoss.api.vulnerabilities.v2.VulnerabilityResponse\"2\x82\xd3\xe4\x93\x02,\"\'/api/v2/vulnerabilities/vulnerabilities:\x01*B\xac\x02Z?github.com/scanoss/papi/api/vulnerabilitiesv2;vulnerabilitiesv2\x92\x41\xe7\x01\x12\x80\x01\n\x1dSCANOSS Vulnerability Service\"Z\n\x17scanoss-vulnerabilities\x12*https://github.com/scanoss/vulnerabilities\x1a\x13support@scanoss.com2\x03\x32.0*\x01\x01\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3')
|
|
20
29
|
|
|
21
|
-
|
|
22
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.vulnerabilities.v2.scanoss_vulnerabilities_pb2', globals())
|
|
23
|
-
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n<scanoss/api/vulnerabilities/v2/scanoss-vulnerabilities.proto\x12\x1escanoss.api.vulnerabilities.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\x91\x01\n\x14VulnerabilityRequest\x12I\n\x05purls\x18\x01 \x03(\x0b\x32:.scanoss.api.vulnerabilities.v2.VulnerabilityRequest.Purls\x1a*\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x13\n\x0brequirement\x18\x02 \x01(\t:\x02\x18\x01\"\xaf\x01\n\x0b\x43peResponse\x12@\n\x05purls\x18\x01 \x03(\x0b\x32\x31.scanoss.api.vulnerabilities.v2.CpeResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a#\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0c\n\x04\x63pes\x18\x02 \x03(\t:\x02\x18\x01\"U\n\x11\x43omponentCpesInfo\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x13\n\x0brequirement\x18\x03 \x01(\t\x12\x0c\n\x04\x63pes\x18\x04 \x03(\t\"\x8b\x03\n\x15\x43omponentCpesResponse\x12\x44\n\tcomponent\x18\x01 \x01(\x0b\x32\x31.scanoss.api.vulnerabilities.v2.ComponentCpesInfo\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse:\xf4\x01\x92\x41\xf0\x01\n\xed\x01J\xea\x01{\"component\":{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"1.0.0\", \"version\": \"1.0.0\", \"cpes\": [\"cpe:2.3:a:scanoss:engine:1.0.0:*:*:*:*:*:*:*\"]}, \"status\": {\"status\": \"SUCCESS\", \"message\": \"CPEs Successfully retrieved\"}}\"\xa7\x04\n\x16\x43omponentsCpesResponse\x12\x45\n\ncomponents\x18\x01 \x03(\x0b\x32\x31.scanoss.api.vulnerabilities.v2.ComponentCpesInfo\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse:\x8e\x03\x92\x41\x8a\x03\n\x87\x03J\x84\x03{\"components\":[{\"purl\": \"pkg:github/scanoss/engine\", \"requirement=\": \"1.0.0\", \"version=\": \"1.0.0\", \"cpes\": [\"cpe:2.3:a:scanoss:engine:1.0.0:*:*:*:*:*:*:*\"]}, {\"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\",\"requirement\": \"\",\"version\": \"v1.30.0\", \"cpes\": [\"cpe:2.3:a:scanoss:scanoss.py:1.30.0:*:*:*:*:*:*:*\"]} ], \"status\": {\"status\": \"SUCCESS\", \"message\": \"CPEs Successfully retrieved\"}}\"Z\n\x04\x43VSS\x12\x0c\n\x04\x63vss\x18\x01 \x01(\t\x12\x1e\n\ncvss_score\x18\x02 \x01(\x02R\ncvss_score\x12$\n\rcvss_severity\x18\x03 \x01(\tR\rcvss_severity\"\xc1\x01\n\rVulnerability\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03\x63ve\x18\x02 \x01(\t\x12\x0b\n\x03url\x18\x03 \x01(\t\x12\x0f\n\x07summary\x18\x04 \x01(\t\x12\x10\n\x08severity\x18\x05 \x01(\t\x12\x11\n\tpublished\x18\x06 \x01(\t\x12\x10\n\x08modified\x18\x07 \x01(\t\x12\x0e\n\x06source\x18\x08 \x01(\t\x12\x32\n\x04\x63vss\x18\t \x03(\x0b\x32$.scanoss.api.vulnerabilities.v2.CVSS\"\xfd\x01\n\x15VulnerabilityResponse\x12J\n\x05purls\x18\x01 \x03(\x0b\x32;.scanoss.api.vulnerabilities.v2.VulnerabilityResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a]\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x46\n\x0fvulnerabilities\x18\x02 \x03(\x0b\x32-.scanoss.api.vulnerabilities.v2.Vulnerability:\x02\x18\x01\"\x98\x01\n\x1a\x43omponentVulnerabilityInfo\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x13\n\x0brequirement\x18\x03 \x01(\t\x12\x46\n\x0fvulnerabilities\x18\x04 \x03(\x0b\x32-.scanoss.api.vulnerabilities.v2.Vulnerability\"\xe3\x05\n\x1e\x43omponentVulnerabilityResponse\x12M\n\tcomponent\x18\x01 \x01(\x0b\x32:.scanoss.api.vulnerabilities.v2.ComponentVulnerabilityInfo\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse:\xba\x04\x92\x41\xb6\x04\n\xb3\x04J\xb0\x04{\"component\":{\"purl\": \"pkg:github/scanoss/engine\", \"requirement\": \"=>1.0.0\", \"version\": \"1.0.0\", \"vulnerabilities\": [{\"id\": \"DLA-2640-1\", \"cve\": \"DLA-2640-1\", \"url\": \"https://osv.dev/vulnerability/DLA-2640-1\", \"summary\": \"gst-plugins-good1.0 - security update\", \"severity\": \"Critical\", \"published\": \"2021-04-26\", \"modified\": \"2025-05-26\", \"source\": \"OSV\", \"cvss\": [{\"cvss\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\", \"cvss_score\": 9.8, \"cvss_severity\": \"Critical\"}]}]}, \"status\": {\"status\": \"SUCCESS\", \"message\": \"Vulnerabilities Successfully retrieved\"}}\"\xbd\t\n\x1f\x43omponentsVulnerabilityResponse\x12N\n\ncomponents\x18\x01 \x03(\x0b\x32:.scanoss.api.vulnerabilities.v2.ComponentVulnerabilityInfo\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse:\x92\x08\x92\x41\x8e\x08\n\x8b\x08J\x88\x08{\"components\":[{\"purl\": \"pkg:github/scanoss/engine\", \"requirement\": \"1.0.0\", \"version\": \"1.0.0\", \"vulnerabilities\": [{\"id\": \"DLA-2640-1\", \"cve\": \"DLA-2640-1\", \"url\": \"https://osv.dev/vulnerability/DLA-2640-1\", \"summary\": \"gst-plugins-good1.0 - security update\", \"severity\": \"Critical\", \"published\": \"2021-04-26\", \"modified\": \"2025-05-26\", \"source\": \"OSV\", \"cvss\": [{\"cvss\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\", \"cvss_score\": 9.8, \"cvss_severity\": \"Critical\"}]}]}, {\"purl\": \"pkg:github/scanoss/scanoss.py\",\"requirement\": \"v1.30.0\",\"version\": \"v1.30.0\", \"vulnerabilities\": [{\"id\": \"CVE-2024-54321\", \"cve\": \"CVE-2024-54321\", \"url\": \"https://nvd.nist.gov/vuln/detail/CVE-2024-54321\", \"summary\": \"Denial of service vulnerability\", \"severity\": \"Medium\", \"published\": \"2024-01-15\", \"modified\": \"2024-02-01\", \"source\": \"NDV\", \"cvss\": [{\"cvss\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L\", \"cvss_score\": 4.3, \"cvss_severity\": \"Medium\"}]}]}], \"status\": {\"status\": \"SUCCESS\", \"message\": \"Vulnerabilities Successfully retrieved\"}}2\xb3\x08\n\x0fVulnerabilities\x12t\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v2/vulnerabilities/echo:\x01*\x12q\n\x07GetCpes\x12\x34.scanoss.api.vulnerabilities.v2.VulnerabilityRequest\x1a+.scanoss.api.vulnerabilities.v2.CpeResponse\"\x03\x88\x02\x01\x12\x9e\x01\n\x10GetComponentCpes\x12\'.scanoss.api.common.v2.ComponentRequest\x1a\x35.scanoss.api.vulnerabilities.v2.ComponentCpesResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v2/vulnerabilities/cpes/component\x12\xa5\x01\n\x11GetComponentsCpes\x12(.scanoss.api.common.v2.ComponentsRequest\x1a\x36.scanoss.api.vulnerabilities.v2.ComponentsCpesResponse\".\x82\xd3\xe4\x93\x02(\"#/v2/vulnerabilities/cpes/components:\x01*\x12\x86\x01\n\x12GetVulnerabilities\x12\x34.scanoss.api.vulnerabilities.v2.VulnerabilityRequest\x1a\x35.scanoss.api.vulnerabilities.v2.VulnerabilityResponse\"\x03\x88\x02\x01\x12\xad\x01\n\x1bGetComponentVulnerabilities\x12\'.scanoss.api.common.v2.ComponentRequest\x1a>.scanoss.api.vulnerabilities.v2.ComponentVulnerabilityResponse\"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v2/vulnerabilities/component\x12\xb4\x01\n\x1cGetComponentsVulnerabilities\x12(.scanoss.api.common.v2.ComponentsRequest\x1a?.scanoss.api.vulnerabilities.v2.ComponentsVulnerabilityResponse\")\x82\xd3\xe4\x93\x02#\"\x1e/v2/vulnerabilities/components:\x01*B\x92\x03Z?github.com/scanoss/papi/api/vulnerabilitiesv2;vulnerabilitiesv2\x92\x41\xcd\x02\x12\xd4\x01\n\x1dSCANOSS Vulnerability Service\x12RVulnerability service provides vulnerability intelligence for software components.\"Z\n\x17scanoss-vulnerabilities\x12*https://github.com/scanoss/vulnerabilities\x1a\x13support@scanoss.com2\x03\x32.0\x1a\x0f\x61pi.scanoss.com*\x02\x01\x02\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3')
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
_VULNERABILITIES.
|
|
48
|
-
_VULNERABILITIES.
|
|
32
|
+
_globals = globals()
|
|
33
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
34
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.vulnerabilities.v2.scanoss_vulnerabilities_pb2', _globals)
|
|
35
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
36
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
37
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z?github.com/scanoss/papi/api/vulnerabilitiesv2;vulnerabilitiesv2\222A\315\002\022\324\001\n\035SCANOSS Vulnerability Service\022RVulnerability service provides vulnerability intelligence for software components.\"Z\n\027scanoss-vulnerabilities\022*https://github.com/scanoss/vulnerabilities\032\023support@scanoss.com2\0032.0\032\017api.scanoss.com*\002\001\0022\020application/json:\020application/jsonR;\n\003404\0224\n*Returned when the resource does not exist.\022\006\n\004\232\002\001\007'
|
|
38
|
+
_globals['_VULNERABILITYREQUEST']._loaded_options = None
|
|
39
|
+
_globals['_VULNERABILITYREQUEST']._serialized_options = b'\030\001'
|
|
40
|
+
_globals['_CPERESPONSE']._loaded_options = None
|
|
41
|
+
_globals['_CPERESPONSE']._serialized_options = b'\030\001'
|
|
42
|
+
_globals['_COMPONENTCPESRESPONSE']._loaded_options = None
|
|
43
|
+
_globals['_COMPONENTCPESRESPONSE']._serialized_options = b'\222A\360\001\n\355\001J\352\001{\"component\":{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"1.0.0\", \"version\": \"1.0.0\", \"cpes\": [\"cpe:2.3:a:scanoss:engine:1.0.0:*:*:*:*:*:*:*\"]}, \"status\": {\"status\": \"SUCCESS\", \"message\": \"CPEs Successfully retrieved\"}}'
|
|
44
|
+
_globals['_COMPONENTSCPESRESPONSE']._loaded_options = None
|
|
45
|
+
_globals['_COMPONENTSCPESRESPONSE']._serialized_options = b'\222A\212\003\n\207\003J\204\003{\"components\":[{\"purl\": \"pkg:github/scanoss/engine\", \"requirement=\": \"1.0.0\", \"version=\": \"1.0.0\", \"cpes\": [\"cpe:2.3:a:scanoss:engine:1.0.0:*:*:*:*:*:*:*\"]}, {\"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\",\"requirement\": \"\",\"version\": \"v1.30.0\", \"cpes\": [\"cpe:2.3:a:scanoss:scanoss.py:1.30.0:*:*:*:*:*:*:*\"]} ], \"status\": {\"status\": \"SUCCESS\", \"message\": \"CPEs Successfully retrieved\"}}'
|
|
46
|
+
_globals['_VULNERABILITYRESPONSE']._loaded_options = None
|
|
47
|
+
_globals['_VULNERABILITYRESPONSE']._serialized_options = b'\030\001'
|
|
48
|
+
_globals['_COMPONENTVULNERABILITYRESPONSE']._loaded_options = None
|
|
49
|
+
_globals['_COMPONENTVULNERABILITYRESPONSE']._serialized_options = b'\222A\266\004\n\263\004J\260\004{\"component\":{\"purl\": \"pkg:github/scanoss/engine\", \"requirement\": \"=>1.0.0\", \"version\": \"1.0.0\", \"vulnerabilities\": [{\"id\": \"DLA-2640-1\", \"cve\": \"DLA-2640-1\", \"url\": \"https://osv.dev/vulnerability/DLA-2640-1\", \"summary\": \"gst-plugins-good1.0 - security update\", \"severity\": \"Critical\", \"published\": \"2021-04-26\", \"modified\": \"2025-05-26\", \"source\": \"OSV\", \"cvss\": [{\"cvss\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\", \"cvss_score\": 9.8, \"cvss_severity\": \"Critical\"}]}]}, \"status\": {\"status\": \"SUCCESS\", \"message\": \"Vulnerabilities Successfully retrieved\"}}'
|
|
50
|
+
_globals['_COMPONENTSVULNERABILITYRESPONSE']._loaded_options = None
|
|
51
|
+
_globals['_COMPONENTSVULNERABILITYRESPONSE']._serialized_options = b'\222A\216\010\n\213\010J\210\010{\"components\":[{\"purl\": \"pkg:github/scanoss/engine\", \"requirement\": \"1.0.0\", \"version\": \"1.0.0\", \"vulnerabilities\": [{\"id\": \"DLA-2640-1\", \"cve\": \"DLA-2640-1\", \"url\": \"https://osv.dev/vulnerability/DLA-2640-1\", \"summary\": \"gst-plugins-good1.0 - security update\", \"severity\": \"Critical\", \"published\": \"2021-04-26\", \"modified\": \"2025-05-26\", \"source\": \"OSV\", \"cvss\": [{\"cvss\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\", \"cvss_score\": 9.8, \"cvss_severity\": \"Critical\"}]}]}, {\"purl\": \"pkg:github/scanoss/scanoss.py\",\"requirement\": \"v1.30.0\",\"version\": \"v1.30.0\", \"vulnerabilities\": [{\"id\": \"CVE-2024-54321\", \"cve\": \"CVE-2024-54321\", \"url\": \"https://nvd.nist.gov/vuln/detail/CVE-2024-54321\", \"summary\": \"Denial of service vulnerability\", \"severity\": \"Medium\", \"published\": \"2024-01-15\", \"modified\": \"2024-02-01\", \"source\": \"NDV\", \"cvss\": [{\"cvss\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L\", \"cvss_score\": 4.3, \"cvss_severity\": \"Medium\"}]}]}], \"status\": {\"status\": \"SUCCESS\", \"message\": \"Vulnerabilities Successfully retrieved\"}}'
|
|
52
|
+
_globals['_VULNERABILITIES'].methods_by_name['Echo']._loaded_options = None
|
|
53
|
+
_globals['_VULNERABILITIES'].methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\035\"\030/v2/vulnerabilities/echo:\001*'
|
|
54
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetCpes']._loaded_options = None
|
|
55
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetCpes']._serialized_options = b'\210\002\001'
|
|
56
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetComponentCpes']._loaded_options = None
|
|
57
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetComponentCpes']._serialized_options = b'\202\323\344\223\002$\022\"/v2/vulnerabilities/cpes/component'
|
|
58
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetComponentsCpes']._loaded_options = None
|
|
59
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetComponentsCpes']._serialized_options = b'\202\323\344\223\002(\"#/v2/vulnerabilities/cpes/components:\001*'
|
|
60
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetVulnerabilities']._loaded_options = None
|
|
61
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetVulnerabilities']._serialized_options = b'\210\002\001'
|
|
62
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetComponentVulnerabilities']._loaded_options = None
|
|
63
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetComponentVulnerabilities']._serialized_options = b'\202\323\344\223\002\037\022\035/v2/vulnerabilities/component'
|
|
64
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetComponentsVulnerabilities']._loaded_options = None
|
|
65
|
+
_globals['_VULNERABILITIES'].methods_by_name['GetComponentsVulnerabilities']._serialized_options = b'\202\323\344\223\002#\"\036/v2/vulnerabilities/components:\001*'
|
|
66
|
+
_globals['_VULNERABILITYREQUEST']._serialized_start=219
|
|
67
|
+
_globals['_VULNERABILITYREQUEST']._serialized_end=364
|
|
68
|
+
_globals['_VULNERABILITYREQUEST_PURLS']._serialized_start=318
|
|
69
|
+
_globals['_VULNERABILITYREQUEST_PURLS']._serialized_end=360
|
|
70
|
+
_globals['_CPERESPONSE']._serialized_start=367
|
|
71
|
+
_globals['_CPERESPONSE']._serialized_end=542
|
|
72
|
+
_globals['_CPERESPONSE_PURLS']._serialized_start=503
|
|
73
|
+
_globals['_CPERESPONSE_PURLS']._serialized_end=538
|
|
74
|
+
_globals['_COMPONENTCPESINFO']._serialized_start=544
|
|
75
|
+
_globals['_COMPONENTCPESINFO']._serialized_end=629
|
|
76
|
+
_globals['_COMPONENTCPESRESPONSE']._serialized_start=632
|
|
77
|
+
_globals['_COMPONENTCPESRESPONSE']._serialized_end=1027
|
|
78
|
+
_globals['_COMPONENTSCPESRESPONSE']._serialized_start=1030
|
|
79
|
+
_globals['_COMPONENTSCPESRESPONSE']._serialized_end=1581
|
|
80
|
+
_globals['_CVSS']._serialized_start=1583
|
|
81
|
+
_globals['_CVSS']._serialized_end=1673
|
|
82
|
+
_globals['_VULNERABILITY']._serialized_start=1676
|
|
83
|
+
_globals['_VULNERABILITY']._serialized_end=1869
|
|
84
|
+
_globals['_VULNERABILITYRESPONSE']._serialized_start=1872
|
|
85
|
+
_globals['_VULNERABILITYRESPONSE']._serialized_end=2125
|
|
86
|
+
_globals['_VULNERABILITYRESPONSE_PURLS']._serialized_start=2028
|
|
87
|
+
_globals['_VULNERABILITYRESPONSE_PURLS']._serialized_end=2121
|
|
88
|
+
_globals['_COMPONENTVULNERABILITYINFO']._serialized_start=2128
|
|
89
|
+
_globals['_COMPONENTVULNERABILITYINFO']._serialized_end=2280
|
|
90
|
+
_globals['_COMPONENTVULNERABILITYRESPONSE']._serialized_start=2283
|
|
91
|
+
_globals['_COMPONENTVULNERABILITYRESPONSE']._serialized_end=3022
|
|
92
|
+
_globals['_COMPONENTSVULNERABILITYRESPONSE']._serialized_start=3025
|
|
93
|
+
_globals['_COMPONENTSVULNERABILITYRESPONSE']._serialized_end=4238
|
|
94
|
+
_globals['_VULNERABILITIES']._serialized_start=4241
|
|
95
|
+
_globals['_VULNERABILITIES']._serialized_end=5316
|
|
49
96
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
2
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
3
|
import grpc
|
|
4
|
+
import warnings
|
|
4
5
|
|
|
5
6
|
from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
|
|
6
7
|
from scanoss.api.vulnerabilities.v2 import scanoss_vulnerabilities_pb2 as scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2
|
|
7
8
|
|
|
9
|
+
GRPC_GENERATED_VERSION = '1.73.1'
|
|
10
|
+
GRPC_VERSION = grpc.__version__
|
|
11
|
+
_version_not_supported = False
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
from grpc._utilities import first_version_is_lower
|
|
15
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
16
|
+
except ImportError:
|
|
17
|
+
_version_not_supported = True
|
|
18
|
+
|
|
19
|
+
if _version_not_supported:
|
|
20
|
+
raise RuntimeError(
|
|
21
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
22
|
+
+ f' but the generated code in scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py depends on'
|
|
23
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
24
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
25
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
26
|
+
)
|
|
27
|
+
|
|
8
28
|
|
|
9
29
|
class VulnerabilitiesStub(object):
|
|
10
30
|
"""
|
|
11
|
-
|
|
31
|
+
Vulnerability Service Definition
|
|
12
32
|
"""
|
|
13
33
|
|
|
14
34
|
def __init__(self, channel):
|
|
@@ -21,40 +41,125 @@ class VulnerabilitiesStub(object):
|
|
|
21
41
|
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/Echo',
|
|
22
42
|
request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
|
|
23
43
|
response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
|
|
24
|
-
)
|
|
44
|
+
_registered_method=True)
|
|
25
45
|
self.GetCpes = channel.unary_unary(
|
|
26
46
|
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetCpes',
|
|
27
47
|
request_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
|
|
28
48
|
response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.CpeResponse.FromString,
|
|
29
|
-
)
|
|
49
|
+
_registered_method=True)
|
|
50
|
+
self.GetComponentCpes = channel.unary_unary(
|
|
51
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetComponentCpes',
|
|
52
|
+
request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
|
|
53
|
+
response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentCpesResponse.FromString,
|
|
54
|
+
_registered_method=True)
|
|
55
|
+
self.GetComponentsCpes = channel.unary_unary(
|
|
56
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetComponentsCpes',
|
|
57
|
+
request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
|
|
58
|
+
response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentsCpesResponse.FromString,
|
|
59
|
+
_registered_method=True)
|
|
30
60
|
self.GetVulnerabilities = channel.unary_unary(
|
|
31
61
|
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetVulnerabilities',
|
|
32
62
|
request_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
|
|
33
63
|
response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityResponse.FromString,
|
|
34
|
-
)
|
|
64
|
+
_registered_method=True)
|
|
65
|
+
self.GetComponentVulnerabilities = channel.unary_unary(
|
|
66
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetComponentVulnerabilities',
|
|
67
|
+
request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
|
|
68
|
+
response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentVulnerabilityResponse.FromString,
|
|
69
|
+
_registered_method=True)
|
|
70
|
+
self.GetComponentsVulnerabilities = channel.unary_unary(
|
|
71
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetComponentsVulnerabilities',
|
|
72
|
+
request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
|
|
73
|
+
response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentsVulnerabilityResponse.FromString,
|
|
74
|
+
_registered_method=True)
|
|
35
75
|
|
|
36
76
|
|
|
37
77
|
class VulnerabilitiesServicer(object):
|
|
38
78
|
"""
|
|
39
|
-
|
|
79
|
+
Vulnerability Service Definition
|
|
40
80
|
"""
|
|
41
81
|
|
|
42
82
|
def Echo(self, request, context):
|
|
43
|
-
"""
|
|
83
|
+
"""
|
|
84
|
+
Returns the same message that was sent, used for health checks and connectivity testing
|
|
44
85
|
"""
|
|
45
86
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
46
87
|
context.set_details('Method not implemented!')
|
|
47
88
|
raise NotImplementedError('Method not implemented!')
|
|
48
89
|
|
|
49
90
|
def GetCpes(self, request, context):
|
|
50
|
-
"""
|
|
91
|
+
"""
|
|
92
|
+
Get CPEs (Common Platform Enumeration) associated with a PURL - legacy endpoint.
|
|
93
|
+
|
|
94
|
+
Legacy method for retrieving Common Platform Enumeration identifiers
|
|
95
|
+
associated with software components. Use GetComponentCpes instead.
|
|
96
|
+
"""
|
|
97
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
98
|
+
context.set_details('Method not implemented!')
|
|
99
|
+
raise NotImplementedError('Method not implemented!')
|
|
100
|
+
|
|
101
|
+
def GetComponentCpes(self, request, context):
|
|
102
|
+
"""
|
|
103
|
+
Get CPEs (Common Platform Enumeration) associated with a single software component.
|
|
104
|
+
|
|
105
|
+
Returns Common Platform Enumeration identifiers that match the specified component.
|
|
106
|
+
CPEs are used to identify IT platforms in vulnerability databases and enable
|
|
107
|
+
vulnerability scanning and assessment.
|
|
108
|
+
|
|
109
|
+
See: https://github.com/scanoss/papi/blob/main/protobuf/scanoss/api/vulnerabilities/v2/README.md?tab=readme-ov-file#getcomponentcpes
|
|
110
|
+
"""
|
|
111
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
112
|
+
context.set_details('Method not implemented!')
|
|
113
|
+
raise NotImplementedError('Method not implemented!')
|
|
114
|
+
|
|
115
|
+
def GetComponentsCpes(self, request, context):
|
|
116
|
+
"""
|
|
117
|
+
Get CPEs (Common Platform Enumeration) associated with multiple software components.
|
|
118
|
+
|
|
119
|
+
Returns Common Platform Enumeration identifiers for multiple components in a single request.
|
|
120
|
+
CPEs are used to identify IT platforms in vulnerability databases and enable
|
|
121
|
+
vulnerability scanning and assessment.
|
|
122
|
+
|
|
123
|
+
See: https://github.com/scanoss/papi/blob/main/protobuf/scanoss/api/vulnerabilities/v2/README.md?tab=readme-ov-file#getcomponentscpes
|
|
51
124
|
"""
|
|
52
125
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
53
126
|
context.set_details('Method not implemented!')
|
|
54
127
|
raise NotImplementedError('Method not implemented!')
|
|
55
128
|
|
|
56
129
|
def GetVulnerabilities(self, request, context):
|
|
57
|
-
"""
|
|
130
|
+
"""
|
|
131
|
+
Get vulnerability details - legacy endpoint.
|
|
132
|
+
|
|
133
|
+
Legacy method for retrieving vulnerability information for software components.
|
|
134
|
+
Use GetComponentVulnerabilities or GetComponentsVulnerabilities instead.
|
|
135
|
+
"""
|
|
136
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
137
|
+
context.set_details('Method not implemented!')
|
|
138
|
+
raise NotImplementedError('Method not implemented!')
|
|
139
|
+
|
|
140
|
+
def GetComponentVulnerabilities(self, request, context):
|
|
141
|
+
"""
|
|
142
|
+
Get vulnerability information for a single software component.
|
|
143
|
+
|
|
144
|
+
Analyzes the component and returns known vulnerabilities including CVE details,
|
|
145
|
+
severity scores, publication dates, and other security metadata.
|
|
146
|
+
Vulnerability data is sourced from various security databases and feeds.
|
|
147
|
+
|
|
148
|
+
See: https://github.com/scanoss/papi/blob/main/protobuf/scanoss/api/vulnerabilities/v2/README.md?tab=readme-ov-file#getcomponentvulnerabilities
|
|
149
|
+
"""
|
|
150
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
151
|
+
context.set_details('Method not implemented!')
|
|
152
|
+
raise NotImplementedError('Method not implemented!')
|
|
153
|
+
|
|
154
|
+
def GetComponentsVulnerabilities(self, request, context):
|
|
155
|
+
"""
|
|
156
|
+
Get vulnerability information for multiple software components in a single request.
|
|
157
|
+
|
|
158
|
+
Analyzes multiple components and returns known vulnerabilities for each including CVE details,
|
|
159
|
+
severity scores, publication dates, and other security metadata.
|
|
160
|
+
Vulnerability data is sourced from various security databases and feeds.
|
|
161
|
+
|
|
162
|
+
See: https://github.com/scanoss/papi/blob/main/protobuf/scanoss/api/vulnerabilities/v2/README.md?tab=readme-ov-file#getcomponentsvulnerabilities
|
|
58
163
|
"""
|
|
59
164
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
60
165
|
context.set_details('Method not implemented!')
|
|
@@ -73,21 +178,42 @@ def add_VulnerabilitiesServicer_to_server(servicer, server):
|
|
|
73
178
|
request_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.FromString,
|
|
74
179
|
response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.CpeResponse.SerializeToString,
|
|
75
180
|
),
|
|
181
|
+
'GetComponentCpes': grpc.unary_unary_rpc_method_handler(
|
|
182
|
+
servicer.GetComponentCpes,
|
|
183
|
+
request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.FromString,
|
|
184
|
+
response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentCpesResponse.SerializeToString,
|
|
185
|
+
),
|
|
186
|
+
'GetComponentsCpes': grpc.unary_unary_rpc_method_handler(
|
|
187
|
+
servicer.GetComponentsCpes,
|
|
188
|
+
request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.FromString,
|
|
189
|
+
response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentsCpesResponse.SerializeToString,
|
|
190
|
+
),
|
|
76
191
|
'GetVulnerabilities': grpc.unary_unary_rpc_method_handler(
|
|
77
192
|
servicer.GetVulnerabilities,
|
|
78
193
|
request_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.FromString,
|
|
79
194
|
response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityResponse.SerializeToString,
|
|
80
195
|
),
|
|
196
|
+
'GetComponentVulnerabilities': grpc.unary_unary_rpc_method_handler(
|
|
197
|
+
servicer.GetComponentVulnerabilities,
|
|
198
|
+
request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.FromString,
|
|
199
|
+
response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentVulnerabilityResponse.SerializeToString,
|
|
200
|
+
),
|
|
201
|
+
'GetComponentsVulnerabilities': grpc.unary_unary_rpc_method_handler(
|
|
202
|
+
servicer.GetComponentsVulnerabilities,
|
|
203
|
+
request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.FromString,
|
|
204
|
+
response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentsVulnerabilityResponse.SerializeToString,
|
|
205
|
+
),
|
|
81
206
|
}
|
|
82
207
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
83
208
|
'scanoss.api.vulnerabilities.v2.Vulnerabilities', rpc_method_handlers)
|
|
84
209
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
210
|
+
server.add_registered_method_handlers('scanoss.api.vulnerabilities.v2.Vulnerabilities', rpc_method_handlers)
|
|
85
211
|
|
|
86
212
|
|
|
87
213
|
# This class is part of an EXPERIMENTAL API.
|
|
88
214
|
class Vulnerabilities(object):
|
|
89
215
|
"""
|
|
90
|
-
|
|
216
|
+
Vulnerability Service Definition
|
|
91
217
|
"""
|
|
92
218
|
|
|
93
219
|
@staticmethod
|
|
@@ -101,11 +227,21 @@ class Vulnerabilities(object):
|
|
|
101
227
|
wait_for_ready=None,
|
|
102
228
|
timeout=None,
|
|
103
229
|
metadata=None):
|
|
104
|
-
return grpc.experimental.unary_unary(
|
|
230
|
+
return grpc.experimental.unary_unary(
|
|
231
|
+
request,
|
|
232
|
+
target,
|
|
233
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/Echo',
|
|
105
234
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
|
|
106
235
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
|
|
107
|
-
options,
|
|
108
|
-
|
|
236
|
+
options,
|
|
237
|
+
channel_credentials,
|
|
238
|
+
insecure,
|
|
239
|
+
call_credentials,
|
|
240
|
+
compression,
|
|
241
|
+
wait_for_ready,
|
|
242
|
+
timeout,
|
|
243
|
+
metadata,
|
|
244
|
+
_registered_method=True)
|
|
109
245
|
|
|
110
246
|
@staticmethod
|
|
111
247
|
def GetCpes(request,
|
|
@@ -118,11 +254,75 @@ class Vulnerabilities(object):
|
|
|
118
254
|
wait_for_ready=None,
|
|
119
255
|
timeout=None,
|
|
120
256
|
metadata=None):
|
|
121
|
-
return grpc.experimental.unary_unary(
|
|
257
|
+
return grpc.experimental.unary_unary(
|
|
258
|
+
request,
|
|
259
|
+
target,
|
|
260
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetCpes',
|
|
122
261
|
scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
|
|
123
262
|
scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.CpeResponse.FromString,
|
|
124
|
-
options,
|
|
125
|
-
|
|
263
|
+
options,
|
|
264
|
+
channel_credentials,
|
|
265
|
+
insecure,
|
|
266
|
+
call_credentials,
|
|
267
|
+
compression,
|
|
268
|
+
wait_for_ready,
|
|
269
|
+
timeout,
|
|
270
|
+
metadata,
|
|
271
|
+
_registered_method=True)
|
|
272
|
+
|
|
273
|
+
@staticmethod
|
|
274
|
+
def GetComponentCpes(request,
|
|
275
|
+
target,
|
|
276
|
+
options=(),
|
|
277
|
+
channel_credentials=None,
|
|
278
|
+
call_credentials=None,
|
|
279
|
+
insecure=False,
|
|
280
|
+
compression=None,
|
|
281
|
+
wait_for_ready=None,
|
|
282
|
+
timeout=None,
|
|
283
|
+
metadata=None):
|
|
284
|
+
return grpc.experimental.unary_unary(
|
|
285
|
+
request,
|
|
286
|
+
target,
|
|
287
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetComponentCpes',
|
|
288
|
+
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
|
|
289
|
+
scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentCpesResponse.FromString,
|
|
290
|
+
options,
|
|
291
|
+
channel_credentials,
|
|
292
|
+
insecure,
|
|
293
|
+
call_credentials,
|
|
294
|
+
compression,
|
|
295
|
+
wait_for_ready,
|
|
296
|
+
timeout,
|
|
297
|
+
metadata,
|
|
298
|
+
_registered_method=True)
|
|
299
|
+
|
|
300
|
+
@staticmethod
|
|
301
|
+
def GetComponentsCpes(request,
|
|
302
|
+
target,
|
|
303
|
+
options=(),
|
|
304
|
+
channel_credentials=None,
|
|
305
|
+
call_credentials=None,
|
|
306
|
+
insecure=False,
|
|
307
|
+
compression=None,
|
|
308
|
+
wait_for_ready=None,
|
|
309
|
+
timeout=None,
|
|
310
|
+
metadata=None):
|
|
311
|
+
return grpc.experimental.unary_unary(
|
|
312
|
+
request,
|
|
313
|
+
target,
|
|
314
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetComponentsCpes',
|
|
315
|
+
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
|
|
316
|
+
scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentsCpesResponse.FromString,
|
|
317
|
+
options,
|
|
318
|
+
channel_credentials,
|
|
319
|
+
insecure,
|
|
320
|
+
call_credentials,
|
|
321
|
+
compression,
|
|
322
|
+
wait_for_ready,
|
|
323
|
+
timeout,
|
|
324
|
+
metadata,
|
|
325
|
+
_registered_method=True)
|
|
126
326
|
|
|
127
327
|
@staticmethod
|
|
128
328
|
def GetVulnerabilities(request,
|
|
@@ -135,8 +335,72 @@ class Vulnerabilities(object):
|
|
|
135
335
|
wait_for_ready=None,
|
|
136
336
|
timeout=None,
|
|
137
337
|
metadata=None):
|
|
138
|
-
return grpc.experimental.unary_unary(
|
|
338
|
+
return grpc.experimental.unary_unary(
|
|
339
|
+
request,
|
|
340
|
+
target,
|
|
341
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetVulnerabilities',
|
|
139
342
|
scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
|
|
140
343
|
scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityResponse.FromString,
|
|
141
|
-
options,
|
|
142
|
-
|
|
344
|
+
options,
|
|
345
|
+
channel_credentials,
|
|
346
|
+
insecure,
|
|
347
|
+
call_credentials,
|
|
348
|
+
compression,
|
|
349
|
+
wait_for_ready,
|
|
350
|
+
timeout,
|
|
351
|
+
metadata,
|
|
352
|
+
_registered_method=True)
|
|
353
|
+
|
|
354
|
+
@staticmethod
|
|
355
|
+
def GetComponentVulnerabilities(request,
|
|
356
|
+
target,
|
|
357
|
+
options=(),
|
|
358
|
+
channel_credentials=None,
|
|
359
|
+
call_credentials=None,
|
|
360
|
+
insecure=False,
|
|
361
|
+
compression=None,
|
|
362
|
+
wait_for_ready=None,
|
|
363
|
+
timeout=None,
|
|
364
|
+
metadata=None):
|
|
365
|
+
return grpc.experimental.unary_unary(
|
|
366
|
+
request,
|
|
367
|
+
target,
|
|
368
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetComponentVulnerabilities',
|
|
369
|
+
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
|
|
370
|
+
scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentVulnerabilityResponse.FromString,
|
|
371
|
+
options,
|
|
372
|
+
channel_credentials,
|
|
373
|
+
insecure,
|
|
374
|
+
call_credentials,
|
|
375
|
+
compression,
|
|
376
|
+
wait_for_ready,
|
|
377
|
+
timeout,
|
|
378
|
+
metadata,
|
|
379
|
+
_registered_method=True)
|
|
380
|
+
|
|
381
|
+
@staticmethod
|
|
382
|
+
def GetComponentsVulnerabilities(request,
|
|
383
|
+
target,
|
|
384
|
+
options=(),
|
|
385
|
+
channel_credentials=None,
|
|
386
|
+
call_credentials=None,
|
|
387
|
+
insecure=False,
|
|
388
|
+
compression=None,
|
|
389
|
+
wait_for_ready=None,
|
|
390
|
+
timeout=None,
|
|
391
|
+
metadata=None):
|
|
392
|
+
return grpc.experimental.unary_unary(
|
|
393
|
+
request,
|
|
394
|
+
target,
|
|
395
|
+
'/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetComponentsVulnerabilities',
|
|
396
|
+
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
|
|
397
|
+
scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.ComponentsVulnerabilityResponse.FromString,
|
|
398
|
+
options,
|
|
399
|
+
channel_credentials,
|
|
400
|
+
insecure,
|
|
401
|
+
call_credentials,
|
|
402
|
+
compression,
|
|
403
|
+
wait_for_ready,
|
|
404
|
+
timeout,
|
|
405
|
+
metadata,
|
|
406
|
+
_registered_method=True)
|