scanoss 1.26.1__py3-none-any.whl → 1.26.3__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.
- scanoss/__init__.py +1 -1
- scanoss/data/build_date.txt +1 -1
- scanoss/inspection/copyleft.py +1 -1
- scanoss/inspection/inspect_base.py +28 -9
- scanoss/inspection/license_summary.py +1 -1
- scanoss/inspection/policy_check.py +1 -1
- scanoss/inspection/undeclared_component.py +1 -1
- {scanoss-1.26.1.dist-info → scanoss-1.26.3.dist-info}/METADATA +1 -1
- {scanoss-1.26.1.dist-info → scanoss-1.26.3.dist-info}/RECORD +13 -13
- {scanoss-1.26.1.dist-info → scanoss-1.26.3.dist-info}/WHEEL +0 -0
- {scanoss-1.26.1.dist-info → scanoss-1.26.3.dist-info}/entry_points.txt +0 -0
- {scanoss-1.26.1.dist-info → scanoss-1.26.3.dist-info}/licenses/LICENSE +0 -0
- {scanoss-1.26.1.dist-info → scanoss-1.26.3.dist-info}/top_level.txt +0 -0
scanoss/__init__.py
CHANGED
scanoss/data/build_date.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
date:
|
|
1
|
+
date: 20250626171827, utime: 1750958307
|
scanoss/inspection/copyleft.py
CHANGED
|
@@ -66,7 +66,7 @@ class InspectBase(ScanossBase):
|
|
|
66
66
|
def __init__( # noqa: PLR0913
|
|
67
67
|
self,
|
|
68
68
|
debug: bool = False,
|
|
69
|
-
trace: bool =
|
|
69
|
+
trace: bool = False,
|
|
70
70
|
quiet: bool = False,
|
|
71
71
|
filepath: str = None,
|
|
72
72
|
output: str = None,
|
|
@@ -152,9 +152,6 @@ class InspectBase(ScanossBase):
|
|
|
152
152
|
'declared': 1 if status == 'identified' else 0,
|
|
153
153
|
'undeclared': 1 if status == 'pending' else 0
|
|
154
154
|
}
|
|
155
|
-
if not new_component.get('licenses'):
|
|
156
|
-
self.print_debug(f'WARNING: Results missing licenses. Skipping: {new_component}')
|
|
157
|
-
return components
|
|
158
155
|
|
|
159
156
|
## Append license to component
|
|
160
157
|
self._append_license_to_component(components, new_component, component_key)
|
|
@@ -179,6 +176,11 @@ class InspectBase(ScanossBase):
|
|
|
179
176
|
new_component: Component whose licenses need to be processed
|
|
180
177
|
component_key: purl + version of the component to be updated
|
|
181
178
|
"""
|
|
179
|
+
# If not licenses are present
|
|
180
|
+
if not new_component.get('licenses'):
|
|
181
|
+
self.print_debug(f'WARNING: Results missing licenses. Skipping: {new_component}')
|
|
182
|
+
return
|
|
183
|
+
|
|
182
184
|
licenses_order_by_source_priority = self._get_licenses_order_by_source_priority(new_component['licenses'])
|
|
183
185
|
# Process licenses for this component
|
|
184
186
|
for license_item in licenses_order_by_source_priority:
|
|
@@ -393,14 +395,31 @@ class InspectBase(ScanossBase):
|
|
|
393
395
|
"""
|
|
394
396
|
component_licenses: dict = {}
|
|
395
397
|
for component in components:
|
|
396
|
-
|
|
397
|
-
|
|
398
|
+
purl = component.get('purl', '')
|
|
399
|
+
status = component.get('status', '')
|
|
400
|
+
licenses = component.get('licenses', [])
|
|
401
|
+
|
|
402
|
+
# Component without license
|
|
403
|
+
if not licenses:
|
|
404
|
+
key = f'{purl}-unknown'
|
|
405
|
+
component_licenses[key] = {
|
|
406
|
+
'purl': purl,
|
|
407
|
+
'spdxid': 'unknown',
|
|
408
|
+
'status': status,
|
|
409
|
+
'copyleft': False,
|
|
410
|
+
'url': '-',
|
|
411
|
+
}
|
|
412
|
+
continue
|
|
413
|
+
|
|
414
|
+
# Iterate over licenses component licenses
|
|
415
|
+
for lic in licenses:
|
|
416
|
+
spdxid = lic.get('spdxid', 'unknown')
|
|
398
417
|
if spdxid not in component_licenses:
|
|
399
|
-
key = f'{
|
|
418
|
+
key = f'{purl}-{spdxid}'
|
|
400
419
|
component_licenses[key] = {
|
|
401
|
-
'purl':
|
|
420
|
+
'purl': purl,
|
|
402
421
|
'spdxid': spdxid,
|
|
403
|
-
'status':
|
|
422
|
+
'status': status,
|
|
404
423
|
'copyleft': lic['copyleft'],
|
|
405
424
|
'url': lic['url'],
|
|
406
425
|
}
|
|
@@ -4,7 +4,7 @@ protoc_gen_swagger/options/annotations_pb2.py,sha256=b25EDD6gssUWnFby9gxgcpLIROT
|
|
|
4
4
|
protoc_gen_swagger/options/annotations_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
5
5
|
protoc_gen_swagger/options/openapiv2_pb2.py,sha256=vYElGp8E1vGHszvWqX97zNG9GFJ7u2QcdK9ouq0XdyI,14939
|
|
6
6
|
protoc_gen_swagger/options/openapiv2_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
7
|
-
scanoss/__init__.py,sha256=
|
|
7
|
+
scanoss/__init__.py,sha256=CLu8gENXruHumDJFc9brPcyxa8wLmRPH4CCDfJ8O14I,1146
|
|
8
8
|
scanoss/cli.py,sha256=yjK4oawNzecarQYYlkElOiHFDDAZx_zKdSXf_gQvqXk,72678
|
|
9
9
|
scanoss/components.py,sha256=b0R9DdKuXqyQiw5nZZwjQ6NJXBr1U9gyx1RI2FP9ozA,14511
|
|
10
10
|
scanoss/constants.py,sha256=FWCZG8gQputKwV7XwvW1GuwDXL4wDLQyVRGdwygg578,320
|
|
@@ -57,17 +57,17 @@ scanoss/api/vulnerabilities/__init__.py,sha256=IFrDk_DTJgKSZmmU-nuLXuq_s8sQZlrSC
|
|
|
57
57
|
scanoss/api/vulnerabilities/v2/__init__.py,sha256=IFrDk_DTJgKSZmmU-nuLXuq_s8sQZlrSCHhIDMJT4r0,1122
|
|
58
58
|
scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py,sha256=CFhF80av8tenGvn9AIsGEtRJPuV2dC_syA5JLZb2lDw,5464
|
|
59
59
|
scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py,sha256=HlS4k4Zmx6RIAqaO9I96jD-eyF5yU6Xx04pVm7pdqOg,6864
|
|
60
|
-
scanoss/data/build_date.txt,sha256=
|
|
60
|
+
scanoss/data/build_date.txt,sha256=GFOIX7oA2bhK5wMg37WCS_C2D5HtzpaLQj-lOnkdq30,40
|
|
61
61
|
scanoss/data/scanoss-settings-schema.json,sha256=ClkRYAkjAN0Sk704G8BE_Ok006oQ6YnIGmX84CF8h9w,8798
|
|
62
62
|
scanoss/data/spdx-exceptions.json,sha256=s7UTYxC7jqQXr11YBlIWYCNwN6lRDFTR33Y8rpN_dA4,17953
|
|
63
63
|
scanoss/data/spdx-licenses.json,sha256=A6Z0q82gaTLtnopBfzeIVZjJFxkdRW1g2TuumQc-lII,228794
|
|
64
64
|
scanoss/inspection/__init__.py,sha256=D4C0lWLuNp8k_BjQZEc07WZcUgAvriVwQWOk063b0ZU,1122
|
|
65
65
|
scanoss/inspection/component_summary.py,sha256=h1l3rF6NnoK0wMkS4ib6rDfcza2aqunyoMDbN2lw2G4,4049
|
|
66
|
-
scanoss/inspection/copyleft.py,sha256=
|
|
67
|
-
scanoss/inspection/inspect_base.py,sha256=
|
|
68
|
-
scanoss/inspection/license_summary.py,sha256=
|
|
69
|
-
scanoss/inspection/policy_check.py,sha256=
|
|
70
|
-
scanoss/inspection/undeclared_component.py,sha256=
|
|
66
|
+
scanoss/inspection/copyleft.py,sha256=ZSA97Vc3o06e66r4SCxwLKjGZOjv6lo92sWbvpzKHvo,9237
|
|
67
|
+
scanoss/inspection/inspect_base.py,sha256=buvJ9l3VJatzX5tNj7GOC5kSFQiFMpcYm8e1Iqolho0,18199
|
|
68
|
+
scanoss/inspection/license_summary.py,sha256=1iSVkjNa3oj-XEA-tNNqpwBOLb-i_jkXRTuu9Fcr0q4,5764
|
|
69
|
+
scanoss/inspection/policy_check.py,sha256=R9-7PxDHGzXCDVF8sWE3KcORgICDuZbx1-xvSot_C-g,8330
|
|
70
|
+
scanoss/inspection/undeclared_component.py,sha256=HGto8-ZBccrtczIARughG298Cwqb4k1BLCihkbmiFnk,11496
|
|
71
71
|
scanoss/inspection/utils/license_utils.py,sha256=Zb6QLmVJb86lKCwZyBsmwakyAtY1SXa54kUyyKmWMqA,5093
|
|
72
72
|
scanoss/scanners/__init__.py,sha256=D4C0lWLuNp8k_BjQZEc07WZcUgAvriVwQWOk063b0ZU,1122
|
|
73
73
|
scanoss/scanners/container_scanner.py,sha256=leP4roes6B9B95F49mJ0P_F8WcKCQkvJgk9azWyJrjg,16294
|
|
@@ -79,9 +79,9 @@ scanoss/utils/abstract_presenter.py,sha256=teiDTxBj5jBMCk2T8i4l1BJPf_u4zBLWrtCTF
|
|
|
79
79
|
scanoss/utils/crc64.py,sha256=TMrwQimSdE6imhFOUL7oAG6Kxu-8qMpGWMuMg8QpSVs,3169
|
|
80
80
|
scanoss/utils/file.py,sha256=62cA9a17TU9ZvfA3FY5HY4-QOajJeSrc8S6xLA_f-3M,2980
|
|
81
81
|
scanoss/utils/simhash.py,sha256=6iu8DOcecPAY36SZjCOzrrLMT9oIE7-gI6QuYwUQ7B0,5793
|
|
82
|
-
scanoss-1.26.
|
|
83
|
-
scanoss-1.26.
|
|
84
|
-
scanoss-1.26.
|
|
85
|
-
scanoss-1.26.
|
|
86
|
-
scanoss-1.26.
|
|
87
|
-
scanoss-1.26.
|
|
82
|
+
scanoss-1.26.3.dist-info/licenses/LICENSE,sha256=LLUaXoiyOroIbr5ubAyrxBOwSRLTm35ETO2FmLpy8QQ,1074
|
|
83
|
+
scanoss-1.26.3.dist-info/METADATA,sha256=CcA8cdDfLW5lfUPg-WPdVkKirh8eYQnbP5MqsGMKh18,6060
|
|
84
|
+
scanoss-1.26.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
85
|
+
scanoss-1.26.3.dist-info/entry_points.txt,sha256=Uy28xnaDL5KQ7V77sZD5VLDXPNxYYzSr5tsqtiXVzAs,48
|
|
86
|
+
scanoss-1.26.3.dist-info/top_level.txt,sha256=V11PrQ6Pnrc-nDF9xnisnJ8e6-i7HqSIKVNqduRWcL8,27
|
|
87
|
+
scanoss-1.26.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|