fosslight-util 2.1.3__py3-none-any.whl → 2.1.5__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.
- fosslight_util/download.py +1 -0
- fosslight_util/output_format.py +5 -4
- fosslight_util/write_cyclonedx.py +19 -15
- {fosslight_util-2.1.3.dist-info → fosslight_util-2.1.5.dist-info}/METADATA +2 -2
- {fosslight_util-2.1.3.dist-info → fosslight_util-2.1.5.dist-info}/RECORD +9 -9
- {fosslight_util-2.1.3.dist-info → fosslight_util-2.1.5.dist-info}/LICENSE +0 -0
- {fosslight_util-2.1.3.dist-info → fosslight_util-2.1.5.dist-info}/WHEEL +0 -0
- {fosslight_util-2.1.3.dist-info → fosslight_util-2.1.5.dist-info}/entry_points.txt +0 -0
- {fosslight_util-2.1.3.dist-info → fosslight_util-2.1.5.dist-info}/top_level.txt +0 -0
fosslight_util/download.py
CHANGED
|
@@ -106,6 +106,7 @@ def cli_download_and_extract(link: str, target_dir: str, log_dir: str, checkout_
|
|
|
106
106
|
datetime.now().strftime('%Y%m%d_%H-%M-%S')+".txt"
|
|
107
107
|
logger, log_item = init_log(os.path.join(log_dir, log_file_name))
|
|
108
108
|
link = link.strip()
|
|
109
|
+
is_rubygems = False
|
|
109
110
|
|
|
110
111
|
try:
|
|
111
112
|
if not link:
|
fosslight_util/output_format.py
CHANGED
|
@@ -183,14 +183,15 @@ def write_output_file(output_file_without_ext: str, file_extension: str, scan_it
|
|
|
183
183
|
success, msg = write_opossum(result_file, scan_item)
|
|
184
184
|
elif format == 'yaml':
|
|
185
185
|
success, msg, _ = write_yaml(result_file, scan_item, False)
|
|
186
|
-
elif format.startswith('spdx'):
|
|
186
|
+
elif format.startswith('spdx') or format.startswith('cyclonedx'):
|
|
187
187
|
if platform.system() == 'Windows' or platform.system() == 'Darwin':
|
|
188
188
|
success = False
|
|
189
189
|
msg = f'{platform.system()} not support spdx format.'
|
|
190
190
|
else:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
if format.startswith('spdx'):
|
|
192
|
+
success, msg, _ = write_spdx(output_file_without_ext, file_extension, scan_item, spdx_version)
|
|
193
|
+
elif format.startswith('cyclonedx'):
|
|
194
|
+
success, msg, _ = write_cyclonedx(output_file_without_ext, file_extension, scan_item)
|
|
194
195
|
else:
|
|
195
196
|
if file_extension == '.xlsx':
|
|
196
197
|
success, msg = write_result_to_excel(result_file, scan_item, extended_header, hide_header)
|
|
@@ -17,24 +17,28 @@ from fosslight_util.constant import (LOGGER_NAME, FOSSLIGHT_DEPENDENCY, FOSSLIGH
|
|
|
17
17
|
from fosslight_util.oss_item import CHECKSUM_NULL, get_checksum_sha1
|
|
18
18
|
from packageurl import PackageURL
|
|
19
19
|
import traceback
|
|
20
|
-
from cyclonedx.builder.this import this_component as cdx_lib_component
|
|
21
|
-
from cyclonedx.exception import MissingOptionalDependencyException
|
|
22
|
-
from cyclonedx.factory.license import LicenseFactory
|
|
23
|
-
from cyclonedx.model import XsUri, ExternalReferenceType
|
|
24
|
-
from cyclonedx.model.bom import Bom
|
|
25
|
-
from cyclonedx.model.component import Component, ComponentType, HashAlgorithm, HashType, ExternalReference
|
|
26
|
-
from cyclonedx.model.contact import OrganizationalEntity
|
|
27
|
-
from cyclonedx.output import make_outputter, BaseOutput
|
|
28
|
-
from cyclonedx.output.json import JsonV1Dot6
|
|
29
|
-
from cyclonedx.schema import OutputFormat, SchemaVersion
|
|
30
|
-
from cyclonedx.validation import make_schemabased_validator
|
|
31
|
-
from cyclonedx.validation.json import JsonStrictValidator
|
|
32
|
-
from cyclonedx.output.json import Json as JsonOutputter
|
|
33
|
-
from cyclonedx.output.xml import Xml as XmlOutputter
|
|
34
|
-
from cyclonedx.validation.xml import XmlValidator
|
|
35
20
|
|
|
36
21
|
logger = logging.getLogger(LOGGER_NAME)
|
|
37
22
|
|
|
23
|
+
try:
|
|
24
|
+
from cyclonedx.builder.this import this_component as cdx_lib_component
|
|
25
|
+
from cyclonedx.exception import MissingOptionalDependencyException
|
|
26
|
+
from cyclonedx.factory.license import LicenseFactory
|
|
27
|
+
from cyclonedx.model import XsUri, ExternalReferenceType
|
|
28
|
+
from cyclonedx.model.bom import Bom
|
|
29
|
+
from cyclonedx.model.component import Component, ComponentType, HashAlgorithm, HashType, ExternalReference
|
|
30
|
+
from cyclonedx.model.contact import OrganizationalEntity
|
|
31
|
+
from cyclonedx.output import make_outputter, BaseOutput
|
|
32
|
+
from cyclonedx.output.json import JsonV1Dot6
|
|
33
|
+
from cyclonedx.schema import OutputFormat, SchemaVersion
|
|
34
|
+
from cyclonedx.validation import make_schemabased_validator
|
|
35
|
+
from cyclonedx.validation.json import JsonStrictValidator
|
|
36
|
+
from cyclonedx.output.json import Json as JsonOutputter
|
|
37
|
+
from cyclonedx.output.xml import Xml as XmlOutputter
|
|
38
|
+
from cyclonedx.validation.xml import XmlValidator
|
|
39
|
+
except Exception:
|
|
40
|
+
logger.info('No import cyclonedx-python-lib')
|
|
41
|
+
|
|
38
42
|
|
|
39
43
|
def write_cyclonedx(output_file_without_ext, output_extension, scan_item):
|
|
40
44
|
success = True
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fosslight-util
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.5
|
|
4
4
|
Summary: FOSSLight Util
|
|
5
5
|
Home-page: https://github.com/fosslight/fosslight_util
|
|
6
6
|
Author: LG Electronics
|
|
@@ -30,12 +30,12 @@ Requires-Dist: setuptools>=65.5.1
|
|
|
30
30
|
Requires-Dist: npm
|
|
31
31
|
Requires-Dist: requests
|
|
32
32
|
Requires-Dist: GitPython
|
|
33
|
-
Requires-Dist: cyclonedx-python-lib==8.5.0
|
|
34
33
|
Requires-Dist: numpy; python_version < "3.8"
|
|
35
34
|
Requires-Dist: numpy>=1.22.2; python_version >= "3.8"
|
|
36
35
|
Requires-Dist: pygit2==1.6.1; python_version < "3.7"
|
|
37
36
|
Requires-Dist: pygit2>=1.10.1; python_version >= "3.7"
|
|
38
37
|
Requires-Dist: spdx-tools==0.8.*; sys_platform == "linux"
|
|
38
|
+
Requires-Dist: cyclonedx-python-lib==8.5.*; sys_platform == "linux"
|
|
39
39
|
|
|
40
40
|
<!--
|
|
41
41
|
Copyright (c) 2021 LG Electronics
|
|
@@ -4,16 +4,16 @@ fosslight_util/compare_yaml.py,sha256=eLqqCLgERxRHN5vsnpQVMXIEU862Lx66mD_y4uMgQE
|
|
|
4
4
|
fosslight_util/constant.py,sha256=Ig3ACm9_QirE4389Wt-IfxOqRkVOUjqGnX1B05z2Byo,2151
|
|
5
5
|
fosslight_util/correct.py,sha256=3iUipan8ZX8sbyIIGAPtMkAGvZ4YucjeJwx1K1Bx_z4,3897
|
|
6
6
|
fosslight_util/cover.py,sha256=qqqKzxqFwKimal764FaugRUBcHWdeKt8af6xeK0mH8E,2040
|
|
7
|
-
fosslight_util/download.py,sha256=
|
|
7
|
+
fosslight_util/download.py,sha256=bCKvW76XJTnKMAUW5sJZxg_wBUhiybXovJuL04W4P4c,16364
|
|
8
8
|
fosslight_util/help.py,sha256=M3_XahUkP794US9Q0NS6ujmGvrFFnKBHsTU95Fg1KpA,2181
|
|
9
9
|
fosslight_util/oss_item.py,sha256=8W2HlwqGH3l1iPPdvycrRYKsBSBpqAkqYyYtBVPgMtY,6868
|
|
10
|
-
fosslight_util/output_format.py,sha256=
|
|
10
|
+
fosslight_util/output_format.py,sha256=AdQVzCpar6n3PCDtijLWbJyFAGKQVE7JhLXlHPtITH4,8678
|
|
11
11
|
fosslight_util/parsing_yaml.py,sha256=2zx_N5lMkXT1dRmfJMpzlrru-y_2F_CkVbGlba6vQpU,5380
|
|
12
12
|
fosslight_util/read_excel.py,sha256=-QvrdxaNqYOpIm1H7ZqIEh5NLvFPymZo6BAOZcQmQug,5263
|
|
13
13
|
fosslight_util/set_log.py,sha256=Xpa94AiOyGEK8ucaYkvkAllvlen1Pq_d6UG6kPYBYBc,3780
|
|
14
14
|
fosslight_util/spdx_licenses.py,sha256=GvMNe_D4v2meapTVwPu2BJXInnTo3_gIzg669eJhUu0,3691
|
|
15
15
|
fosslight_util/timer_thread.py,sha256=5VbZENQPD-N0NUmzEktqGr6Am-e7vxD79K05mmr29g0,433
|
|
16
|
-
fosslight_util/write_cyclonedx.py,sha256=
|
|
16
|
+
fosslight_util/write_cyclonedx.py,sha256=Rn2Zlz45F4NFhqBIWQyDL01rGfISnNM7Urw786VcUp4,9898
|
|
17
17
|
fosslight_util/write_excel.py,sha256=G0fIslbWoOtWZCJxbBGLCpUKbhmwrrqhI5PHwRw8_44,9931
|
|
18
18
|
fosslight_util/write_opossum.py,sha256=ltmo6SkugKWdAYupeCqwE4-3lua0GwLpix1XqFC-tT8,11678
|
|
19
19
|
fosslight_util/write_scancodejson.py,sha256=81n7cWNYoyIKE_V4Kx5YtL2CgjMPIjoKdnSU3inkpJY,2163
|
|
@@ -23,9 +23,9 @@ fosslight_util/write_yaml.py,sha256=QlEKoIPQsEaYERfbP53TeKgnllYzhLQWm5wYjnWtVjE,
|
|
|
23
23
|
fosslight_util/resources/frequentLicenselist.json,sha256=GUhzK6tu7ok10fekOnmVmUgIGRC-acGABZKTNKfDyYA,4776157
|
|
24
24
|
fosslight_util/resources/frequent_license_nick_list.json,sha256=ryU2C_6ZxHbz90_sUN9OvI9GXkCMLu7oGcmd9W79YYo,5005
|
|
25
25
|
fosslight_util/resources/licenses.json,sha256=mK55z-bhY7Mjpj2KsO1crKGGL-X3F6MBFQJ0zLlx010,240843
|
|
26
|
-
fosslight_util-2.1.
|
|
27
|
-
fosslight_util-2.1.
|
|
28
|
-
fosslight_util-2.1.
|
|
29
|
-
fosslight_util-2.1.
|
|
30
|
-
fosslight_util-2.1.
|
|
31
|
-
fosslight_util-2.1.
|
|
26
|
+
fosslight_util-2.1.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
27
|
+
fosslight_util-2.1.5.dist-info/METADATA,sha256=uiZYmOet4hsuEWrUulTTUc7rhjyNSMJTC5B3KEdqO18,6499
|
|
28
|
+
fosslight_util-2.1.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
29
|
+
fosslight_util-2.1.5.dist-info/entry_points.txt,sha256=bzXX5i7HZ13V8BLKvtu_9KO3ZjtRypH-XszOXT6I3bU,69
|
|
30
|
+
fosslight_util-2.1.5.dist-info/top_level.txt,sha256=2qyYWGLakgBRy4BqoBNt-I5C29tBr_e93e5e1pbuTGA,15
|
|
31
|
+
fosslight_util-2.1.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|