mend-reporting-tool 0.2.0__tar.gz → 0.2.2__tar.gz
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.
- mend_reporting_tool-0.2.2/PKG-INFO +78 -0
- mend_reporting_tool-0.2.2/README.md +67 -0
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/pyproject.toml +3 -1
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool/main.py +35 -10
- mend_reporting_tool-0.2.2/src/mend_reporting_tool.egg-info/PKG-INFO +78 -0
- mend_reporting_tool-0.2.0/PKG-INFO +0 -64
- mend_reporting_tool-0.2.0/README.md +0 -54
- mend_reporting_tool-0.2.0/src/mend_reporting_tool.egg-info/PKG-INFO +0 -64
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/setup.cfg +0 -0
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool/__init__.py +0 -0
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool/__main__.py +0 -0
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool.egg-info/SOURCES.txt +0 -0
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool.egg-info/dependency_links.txt +0 -0
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool.egg-info/entry_points.txt +0 -0
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool.egg-info/requires.txt +0 -0
- {mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mend-reporting-tool
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: This is script to generate reports through Mend API v3.0
|
|
5
|
+
Maintainer-email: Alexander Chelyshev <alexchelyshev@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Source, https://github.com/chelyshev/mend-reporting-tool
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: requests>=2.33.1
|
|
11
|
+
|
|
12
|
+
# Mend Report Generation tool
|
|
13
|
+
This is script to generate reports through [Mend API v3.0](https://api-docs.mend.io/platform/3.0).
|
|
14
|
+
|
|
15
|
+
### How To Use
|
|
16
|
+
```shell
|
|
17
|
+
$ mend-reporting-tool -h
|
|
18
|
+
usage: mend-reporting-tool [-h] [-v] -mendAPI MENDAPI -orgUUID ORGUUID -userEmail USEREMAIL -userKey USERKEY -projectUUID PROJECTUUID
|
|
19
|
+
[-reportType REPORTTYPE] [-format FORMAT] [-unzip UNZIP]
|
|
20
|
+
|
|
21
|
+
This is script to generate reports through Mend API v3.0.
|
|
22
|
+
|
|
23
|
+
options:
|
|
24
|
+
-h, --help show this help message and exit
|
|
25
|
+
-v, --version Show version and exit
|
|
26
|
+
-mendAPI MENDAPI Mend API v3.0 server hostname without https://, like `api-saas.whitesourcesoftware.com`
|
|
27
|
+
-orgUUID ORGUUID Organization UUID
|
|
28
|
+
-userEmail USEREMAIL User Email
|
|
29
|
+
-userKey USERKEY User Key
|
|
30
|
+
-projectUUID PROJECTUUID
|
|
31
|
+
List of Project UUIDs separeted by ','
|
|
32
|
+
-reportType REPORTTYPE
|
|
33
|
+
Report Type, acceptable report types: `vulnerabilities`, `inventory`, `dueDiligence`, `risk`, `sbom`, `spdx`, `spdx_2_3`,
|
|
34
|
+
`cycloneDX`, `cycloneDX_1_5`, `cycloneDX_1_6`. The `vulnerabilities` report type generates vulnerability report. The
|
|
35
|
+
`dueDiligence` report type generates OSS licenses risk analysis report. The `risk` report type generates OSS security risk
|
|
36
|
+
analysis report. The `inventory` report type generates OSS inventory report. The `sbom`,`spdx`, and `spdx_2_3` report
|
|
37
|
+
types generate SBoM in `SPDX` format. The `cycloneDX`, `cycloneDX_1_5`, and `cycloneDX_1_6` report types generate SBoM in
|
|
38
|
+
`CycloneDX` format. Optional, default: `cycloneDX_1_6`
|
|
39
|
+
-format FORMAT Report Format, acceptable formats for reportType `vulnerabilities`: `json`, `excel`; for reportType
|
|
40
|
+
`sbom`,`spdx`,`spdx_2_3`: `json`, `yaml`; for reportType `cycloneDX`: `json`; for reportType `risk`: `pdf`; for reportType
|
|
41
|
+
`inventory`: `excel`; for reportType `dueDiligence`: `excel`. Optional, default: `json`
|
|
42
|
+
-unzip UNZIP Extract report to the 'mend-reports' folder. Variants: yes, no. Optional, default: `yes`. In case of `no` report in .zip
|
|
43
|
+
format will be saved in the current directory
|
|
44
|
+
|
|
45
|
+
### Example:
|
|
46
|
+
mend-reporting-tool -mendAPI $MEND_API -orgUUID $MEND_ORGANIZATION_UUID -userEmail $MEND_EMAIL -userKey $MEND_USER_KEY -projectUUID $PROJECT_UUID -reportType cycloneDX_1_6 -format json -unzip yes
|
|
47
|
+
|
|
48
|
+
### Processing Project UUID: <Project_UUID>
|
|
49
|
+
>>> The report saved to 'report-<Project_UUID>.zip' successfully.
|
|
50
|
+
>>> The report 'report-<Project_UUID>.zip' extracted to 'mend-reports' folder.
|
|
51
|
+
>>> Deleted: report-<Project_UUID>.zip
|
|
52
|
+
>>> Report is ready in `mend-reports` folder.
|
|
53
|
+
...
|
|
54
|
+
|
|
55
|
+
# Example of possible reports Types and Formats in `mend-reports` folder:
|
|
56
|
+
$ ls mend-reports/
|
|
57
|
+
<Project_Name>-project-CycloneDX-report-<Project_UUID>.json
|
|
58
|
+
<Project_Name>-project-SPDX-report.json
|
|
59
|
+
<Project_Name>-project-SPDX-report.yaml
|
|
60
|
+
<Project_Name>-due-diligence-report.xlsx
|
|
61
|
+
<Project_Name>-inventory-report_Page_1.xlsx
|
|
62
|
+
<Project_Name>-risk.pdf
|
|
63
|
+
<Project_Name>-vulnerability-report.json
|
|
64
|
+
<Project_Name>-vulnerability-report.xlsx
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### How To Install
|
|
68
|
+
```shell
|
|
69
|
+
pip install 'mend-reporting-tool==0.2.2'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### How To Install from source code
|
|
73
|
+
```shell
|
|
74
|
+
git clone https://github.com/chelyshev/mend-reporting-tool.git
|
|
75
|
+
python3 -m venv .venv
|
|
76
|
+
source .venv/bin/activate
|
|
77
|
+
pip install -e .
|
|
78
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Mend Report Generation tool
|
|
2
|
+
This is script to generate reports through [Mend API v3.0](https://api-docs.mend.io/platform/3.0).
|
|
3
|
+
|
|
4
|
+
### How To Use
|
|
5
|
+
```shell
|
|
6
|
+
$ mend-reporting-tool -h
|
|
7
|
+
usage: mend-reporting-tool [-h] [-v] -mendAPI MENDAPI -orgUUID ORGUUID -userEmail USEREMAIL -userKey USERKEY -projectUUID PROJECTUUID
|
|
8
|
+
[-reportType REPORTTYPE] [-format FORMAT] [-unzip UNZIP]
|
|
9
|
+
|
|
10
|
+
This is script to generate reports through Mend API v3.0.
|
|
11
|
+
|
|
12
|
+
options:
|
|
13
|
+
-h, --help show this help message and exit
|
|
14
|
+
-v, --version Show version and exit
|
|
15
|
+
-mendAPI MENDAPI Mend API v3.0 server hostname without https://, like `api-saas.whitesourcesoftware.com`
|
|
16
|
+
-orgUUID ORGUUID Organization UUID
|
|
17
|
+
-userEmail USEREMAIL User Email
|
|
18
|
+
-userKey USERKEY User Key
|
|
19
|
+
-projectUUID PROJECTUUID
|
|
20
|
+
List of Project UUIDs separeted by ','
|
|
21
|
+
-reportType REPORTTYPE
|
|
22
|
+
Report Type, acceptable report types: `vulnerabilities`, `inventory`, `dueDiligence`, `risk`, `sbom`, `spdx`, `spdx_2_3`,
|
|
23
|
+
`cycloneDX`, `cycloneDX_1_5`, `cycloneDX_1_6`. The `vulnerabilities` report type generates vulnerability report. The
|
|
24
|
+
`dueDiligence` report type generates OSS licenses risk analysis report. The `risk` report type generates OSS security risk
|
|
25
|
+
analysis report. The `inventory` report type generates OSS inventory report. The `sbom`,`spdx`, and `spdx_2_3` report
|
|
26
|
+
types generate SBoM in `SPDX` format. The `cycloneDX`, `cycloneDX_1_5`, and `cycloneDX_1_6` report types generate SBoM in
|
|
27
|
+
`CycloneDX` format. Optional, default: `cycloneDX_1_6`
|
|
28
|
+
-format FORMAT Report Format, acceptable formats for reportType `vulnerabilities`: `json`, `excel`; for reportType
|
|
29
|
+
`sbom`,`spdx`,`spdx_2_3`: `json`, `yaml`; for reportType `cycloneDX`: `json`; for reportType `risk`: `pdf`; for reportType
|
|
30
|
+
`inventory`: `excel`; for reportType `dueDiligence`: `excel`. Optional, default: `json`
|
|
31
|
+
-unzip UNZIP Extract report to the 'mend-reports' folder. Variants: yes, no. Optional, default: `yes`. In case of `no` report in .zip
|
|
32
|
+
format will be saved in the current directory
|
|
33
|
+
|
|
34
|
+
### Example:
|
|
35
|
+
mend-reporting-tool -mendAPI $MEND_API -orgUUID $MEND_ORGANIZATION_UUID -userEmail $MEND_EMAIL -userKey $MEND_USER_KEY -projectUUID $PROJECT_UUID -reportType cycloneDX_1_6 -format json -unzip yes
|
|
36
|
+
|
|
37
|
+
### Processing Project UUID: <Project_UUID>
|
|
38
|
+
>>> The report saved to 'report-<Project_UUID>.zip' successfully.
|
|
39
|
+
>>> The report 'report-<Project_UUID>.zip' extracted to 'mend-reports' folder.
|
|
40
|
+
>>> Deleted: report-<Project_UUID>.zip
|
|
41
|
+
>>> Report is ready in `mend-reports` folder.
|
|
42
|
+
...
|
|
43
|
+
|
|
44
|
+
# Example of possible reports Types and Formats in `mend-reports` folder:
|
|
45
|
+
$ ls mend-reports/
|
|
46
|
+
<Project_Name>-project-CycloneDX-report-<Project_UUID>.json
|
|
47
|
+
<Project_Name>-project-SPDX-report.json
|
|
48
|
+
<Project_Name>-project-SPDX-report.yaml
|
|
49
|
+
<Project_Name>-due-diligence-report.xlsx
|
|
50
|
+
<Project_Name>-inventory-report_Page_1.xlsx
|
|
51
|
+
<Project_Name>-risk.pdf
|
|
52
|
+
<Project_Name>-vulnerability-report.json
|
|
53
|
+
<Project_Name>-vulnerability-report.xlsx
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### How To Install
|
|
57
|
+
```shell
|
|
58
|
+
pip install 'mend-reporting-tool==0.2.2'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### How To Install from source code
|
|
62
|
+
```shell
|
|
63
|
+
git clone https://github.com/chelyshev/mend-reporting-tool.git
|
|
64
|
+
python3 -m venv .venv
|
|
65
|
+
source .venv/bin/activate
|
|
66
|
+
pip install -e .
|
|
67
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mend-reporting-tool"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
description = "This is script to generate reports through Mend API v3.0"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
@@ -11,5 +11,7 @@ dependencies = [
|
|
|
11
11
|
"requests>=2.33.1",
|
|
12
12
|
]
|
|
13
13
|
license = "MIT"
|
|
14
|
+
[project.urls]
|
|
15
|
+
Source = "https://github.com/chelyshev/mend-reporting-tool"
|
|
14
16
|
[project.scripts]
|
|
15
17
|
mend-reporting-tool = "mend_reporting_tool.main:main"
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
from time import sleep
|
|
2
|
-
|
|
3
2
|
import requests
|
|
4
3
|
import argparse
|
|
5
4
|
import zipfile
|
|
6
5
|
import os
|
|
7
6
|
import sys
|
|
7
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
8
|
+
|
|
9
|
+
PACKAGE_NAME = "mend-reporting-tool"
|
|
8
10
|
|
|
9
11
|
|
|
12
|
+
def get_version():
|
|
13
|
+
try:
|
|
14
|
+
return version(PACKAGE_NAME)
|
|
15
|
+
except PackageNotFoundError:
|
|
16
|
+
return "unknown (package not installed)"
|
|
17
|
+
|
|
10
18
|
def getRefreshToken(baseURL, email, userKey):
|
|
11
19
|
url = "https://"+baseURL+"/api/v3.0/login"
|
|
12
20
|
|
|
@@ -22,6 +30,9 @@ def getRefreshToken(baseURL, email, userKey):
|
|
|
22
30
|
response = requests.post(url, json=payload, headers=headers)
|
|
23
31
|
|
|
24
32
|
data = response.json()
|
|
33
|
+
if data["response"] == "Login failed":
|
|
34
|
+
print(">>> Login failed. Check your Mend User Email (-userEmail) and Mend User Key (-userKey).")
|
|
35
|
+
sys.exit(1)
|
|
25
36
|
return data["response"]["refreshToken"]
|
|
26
37
|
|
|
27
38
|
def getAccessToken(baseURL, refreshToken):
|
|
@@ -51,7 +62,7 @@ def generateSBOM(baseURL, projectUUID, reportType, reportFormat, accessToken):
|
|
|
51
62
|
"reportType": reportType,
|
|
52
63
|
"maxDepthLevel": 1,
|
|
53
64
|
"includeVulnerabilities": True,
|
|
54
|
-
"isMlBomReport":
|
|
65
|
+
"isMlBomReport": False
|
|
55
66
|
}
|
|
56
67
|
|
|
57
68
|
authHeader = 'Bearer ' + accessToken
|
|
@@ -63,6 +74,10 @@ def generateSBOM(baseURL, projectUUID, reportType, reportFormat, accessToken):
|
|
|
63
74
|
response = requests.post(url, json=payload, headers=headers)
|
|
64
75
|
|
|
65
76
|
data = response.json()
|
|
77
|
+
# print(data)
|
|
78
|
+
if "errorMessage" in data["response"]:
|
|
79
|
+
print(f">>> {data["response"]["errorMessage"]}. Check the Report Format parameter (-format) and try again.")
|
|
80
|
+
sys.exit(1)
|
|
66
81
|
return data["response"]["uuid"]
|
|
67
82
|
|
|
68
83
|
def checkReportStatus(baseURL, orgUuid, reportUUID, accessToken):
|
|
@@ -115,10 +130,19 @@ def unzipReport(projectUUID):
|
|
|
115
130
|
print(f">>> Deleted: {pathZipReport}")
|
|
116
131
|
|
|
117
132
|
def main():
|
|
118
|
-
#
|
|
133
|
+
# First parser: only for --version
|
|
134
|
+
version_parser = argparse.ArgumentParser(add_help=False)
|
|
135
|
+
version_parser.add_argument("-v","--version", action="store_true", help="Show version and exit")
|
|
136
|
+
args, remaining_argv = version_parser.parse_known_args()
|
|
137
|
+
|
|
138
|
+
if args.version:
|
|
139
|
+
print(get_version())
|
|
140
|
+
sys.exit(0)
|
|
141
|
+
|
|
142
|
+
# Main parser: all other arguments
|
|
119
143
|
parser = argparse.ArgumentParser(description="This is script to generate reports through Mend API v3.0.")
|
|
120
144
|
|
|
121
|
-
|
|
145
|
+
parser.add_argument("-v","--version", action="store_true", help="Show version and exit", required=False)
|
|
122
146
|
parser.add_argument("-mendAPI",
|
|
123
147
|
help="Mend API v3.0 server hostname without https://, like `api-saas.whitesourcesoftware.com`",
|
|
124
148
|
required=True)
|
|
@@ -126,14 +150,14 @@ def main():
|
|
|
126
150
|
parser.add_argument("-userEmail", help="User Email", required=True)
|
|
127
151
|
parser.add_argument("-userKey", help="User Key", required=True)
|
|
128
152
|
parser.add_argument("-projectUUID", help="List of Project UUIDs separeted by ','", required=True)
|
|
129
|
-
parser.add_argument("-reportType", default="
|
|
130
|
-
help="Report Type,
|
|
153
|
+
parser.add_argument("-reportType", default="cycloneDX_1_6",
|
|
154
|
+
help="Report Type, acceptable report types: `vulnerabilities`, `inventory`, `dueDiligence`, `risk`, `sbom`, `spdx`, `spdx_2_3`, `cycloneDX`, `cycloneDX_1_5`, `cycloneDX_1_6`. The `vulnerabilities` report type generates vulnerability report. The `dueDiligence` report type generates OSS licenses risk analysis report. The `risk` report type generates OSS security risk analysis report. The `inventory` report type generates OSS inventory report. The `sbom`,`spdx`, and `spdx_2_3` report types generate SBoM in `SPDX` format. The `cycloneDX`, `cycloneDX_1_5`, and `cycloneDX_1_6` report types generate SBoM in `CycloneDX` format. Optional, default: `cycloneDX_1_6`",
|
|
131
155
|
required=False)
|
|
132
156
|
parser.add_argument("-format", default="json",
|
|
133
|
-
help="Report Format, acceptable formats for `vulnerabilities
|
|
157
|
+
help="Report Format, acceptable formats for reportType `vulnerabilities`: `json`, `excel`; for reportType `sbom`,`spdx`,`spdx_2_3`: `json`, `yaml`; for reportType `cycloneDX`: `json`; for reportType `risk`: `pdf`; for reportType `inventory`: `excel`; for reportType `dueDiligence`: `excel`. Optional, default: `json`",
|
|
134
158
|
required=False)
|
|
135
|
-
parser.add_argument("-unzip", default="
|
|
136
|
-
help="Extract report to the 'mend-reports' folder. Variants: yes, no. Optional, default: `no`",
|
|
159
|
+
parser.add_argument("-unzip", default="yes",
|
|
160
|
+
help="Extract report to the 'mend-reports' folder. Variants: yes, no. Optional, default: `yes`. In case of `no` report in .zip format will be saved in the current directory",
|
|
137
161
|
required=False)
|
|
138
162
|
|
|
139
163
|
# Parse arguments
|
|
@@ -144,9 +168,10 @@ def main():
|
|
|
144
168
|
userEmail = args.userEmail
|
|
145
169
|
userKey = args.userKey
|
|
146
170
|
projectUUID_list = args.projectUUID
|
|
147
|
-
reportType = args.reportType
|
|
171
|
+
reportType = args.reportType
|
|
148
172
|
reportFormat = args.format
|
|
149
173
|
extractReport = args.unzip
|
|
174
|
+
|
|
150
175
|
refreshToken = getRefreshToken(baseURL, userEmail, userKey)
|
|
151
176
|
accessToken = getAccessToken(baseURL, refreshToken)
|
|
152
177
|
# print (accessToken)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mend-reporting-tool
|
|
3
|
+
Version: 0.2.2
|
|
4
|
+
Summary: This is script to generate reports through Mend API v3.0
|
|
5
|
+
Maintainer-email: Alexander Chelyshev <alexchelyshev@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Source, https://github.com/chelyshev/mend-reporting-tool
|
|
8
|
+
Requires-Python: >=3.12
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: requests>=2.33.1
|
|
11
|
+
|
|
12
|
+
# Mend Report Generation tool
|
|
13
|
+
This is script to generate reports through [Mend API v3.0](https://api-docs.mend.io/platform/3.0).
|
|
14
|
+
|
|
15
|
+
### How To Use
|
|
16
|
+
```shell
|
|
17
|
+
$ mend-reporting-tool -h
|
|
18
|
+
usage: mend-reporting-tool [-h] [-v] -mendAPI MENDAPI -orgUUID ORGUUID -userEmail USEREMAIL -userKey USERKEY -projectUUID PROJECTUUID
|
|
19
|
+
[-reportType REPORTTYPE] [-format FORMAT] [-unzip UNZIP]
|
|
20
|
+
|
|
21
|
+
This is script to generate reports through Mend API v3.0.
|
|
22
|
+
|
|
23
|
+
options:
|
|
24
|
+
-h, --help show this help message and exit
|
|
25
|
+
-v, --version Show version and exit
|
|
26
|
+
-mendAPI MENDAPI Mend API v3.0 server hostname without https://, like `api-saas.whitesourcesoftware.com`
|
|
27
|
+
-orgUUID ORGUUID Organization UUID
|
|
28
|
+
-userEmail USEREMAIL User Email
|
|
29
|
+
-userKey USERKEY User Key
|
|
30
|
+
-projectUUID PROJECTUUID
|
|
31
|
+
List of Project UUIDs separeted by ','
|
|
32
|
+
-reportType REPORTTYPE
|
|
33
|
+
Report Type, acceptable report types: `vulnerabilities`, `inventory`, `dueDiligence`, `risk`, `sbom`, `spdx`, `spdx_2_3`,
|
|
34
|
+
`cycloneDX`, `cycloneDX_1_5`, `cycloneDX_1_6`. The `vulnerabilities` report type generates vulnerability report. The
|
|
35
|
+
`dueDiligence` report type generates OSS licenses risk analysis report. The `risk` report type generates OSS security risk
|
|
36
|
+
analysis report. The `inventory` report type generates OSS inventory report. The `sbom`,`spdx`, and `spdx_2_3` report
|
|
37
|
+
types generate SBoM in `SPDX` format. The `cycloneDX`, `cycloneDX_1_5`, and `cycloneDX_1_6` report types generate SBoM in
|
|
38
|
+
`CycloneDX` format. Optional, default: `cycloneDX_1_6`
|
|
39
|
+
-format FORMAT Report Format, acceptable formats for reportType `vulnerabilities`: `json`, `excel`; for reportType
|
|
40
|
+
`sbom`,`spdx`,`spdx_2_3`: `json`, `yaml`; for reportType `cycloneDX`: `json`; for reportType `risk`: `pdf`; for reportType
|
|
41
|
+
`inventory`: `excel`; for reportType `dueDiligence`: `excel`. Optional, default: `json`
|
|
42
|
+
-unzip UNZIP Extract report to the 'mend-reports' folder. Variants: yes, no. Optional, default: `yes`. In case of `no` report in .zip
|
|
43
|
+
format will be saved in the current directory
|
|
44
|
+
|
|
45
|
+
### Example:
|
|
46
|
+
mend-reporting-tool -mendAPI $MEND_API -orgUUID $MEND_ORGANIZATION_UUID -userEmail $MEND_EMAIL -userKey $MEND_USER_KEY -projectUUID $PROJECT_UUID -reportType cycloneDX_1_6 -format json -unzip yes
|
|
47
|
+
|
|
48
|
+
### Processing Project UUID: <Project_UUID>
|
|
49
|
+
>>> The report saved to 'report-<Project_UUID>.zip' successfully.
|
|
50
|
+
>>> The report 'report-<Project_UUID>.zip' extracted to 'mend-reports' folder.
|
|
51
|
+
>>> Deleted: report-<Project_UUID>.zip
|
|
52
|
+
>>> Report is ready in `mend-reports` folder.
|
|
53
|
+
...
|
|
54
|
+
|
|
55
|
+
# Example of possible reports Types and Formats in `mend-reports` folder:
|
|
56
|
+
$ ls mend-reports/
|
|
57
|
+
<Project_Name>-project-CycloneDX-report-<Project_UUID>.json
|
|
58
|
+
<Project_Name>-project-SPDX-report.json
|
|
59
|
+
<Project_Name>-project-SPDX-report.yaml
|
|
60
|
+
<Project_Name>-due-diligence-report.xlsx
|
|
61
|
+
<Project_Name>-inventory-report_Page_1.xlsx
|
|
62
|
+
<Project_Name>-risk.pdf
|
|
63
|
+
<Project_Name>-vulnerability-report.json
|
|
64
|
+
<Project_Name>-vulnerability-report.xlsx
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### How To Install
|
|
68
|
+
```shell
|
|
69
|
+
pip install 'mend-reporting-tool==0.2.2'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### How To Install from source code
|
|
73
|
+
```shell
|
|
74
|
+
git clone https://github.com/chelyshev/mend-reporting-tool.git
|
|
75
|
+
python3 -m venv .venv
|
|
76
|
+
source .venv/bin/activate
|
|
77
|
+
pip install -e .
|
|
78
|
+
```
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mend-reporting-tool
|
|
3
|
-
Version: 0.2.0
|
|
4
|
-
Summary: This is script to generate reports through Mend API v3.0
|
|
5
|
-
Maintainer-email: Alexander Chelyshev <alexchelyshev@gmail.com>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Requires-Python: >=3.12
|
|
8
|
-
Description-Content-Type: text/markdown
|
|
9
|
-
Requires-Dist: requests>=2.33.1
|
|
10
|
-
|
|
11
|
-
# Mend Report Generation tool
|
|
12
|
-
This is script to generate reports through [Mend API v3.0](https://api-docs.mend.io/platform/3.0).
|
|
13
|
-
|
|
14
|
-
### How To Use
|
|
15
|
-
```shell
|
|
16
|
-
$ mend-reporting-tool -h
|
|
17
|
-
usage: mend-reporting-tool [-h] -mendAPI MENDAPI -orgUUID ORGUUID -userEmail USEREMAIL -userKey USERKEY -projectUUID PROJECTUUID
|
|
18
|
-
[-reportType REPORTTYPE] [-format FORMAT] [-unzip UNZIP]
|
|
19
|
-
|
|
20
|
-
This is script to generate reports through Mend API v3.0.
|
|
21
|
-
|
|
22
|
-
options:
|
|
23
|
-
-h, --help show this help message and exit
|
|
24
|
-
-mendAPI MENDAPI Mend API v3.0 server hostname without https://, like `api-saas.whitesourcesoftware.com`
|
|
25
|
-
-orgUUID ORGUUID Organization UUID
|
|
26
|
-
-userEmail USEREMAIL User Email
|
|
27
|
-
-userKey USERKEY User Key
|
|
28
|
-
-projectUUID PROJECTUUID
|
|
29
|
-
List of Project UUIDs separeted by ','
|
|
30
|
-
-reportType REPORTTYPE
|
|
31
|
-
Report Type, for example: `vulnerabilities`, `sbom`, `spdx`, `spdx_2_3`, `cycloneDX`, `cycloneDX_1_5`,
|
|
32
|
-
`cycloneDX_1_6`. The `vulnerabilities` report type generates vulnerability report. The `sbom` report type generates
|
|
33
|
-
`spdx` format. Optional, default: `sbom`
|
|
34
|
-
-format FORMAT Report Format, acceptable formats for `vulnerabilities` reportType: `json`, `excel`; for `sbom` reportType: `json`,
|
|
35
|
-
`yaml`. Optional, default: `json`
|
|
36
|
-
-unzip UNZIP Extract report to the 'mend-reports' folder. Variants: yes, no. Optional, default: `no`
|
|
37
|
-
|
|
38
|
-
### Example:
|
|
39
|
-
mend-reporting-tool -mendAPI $MEND_API -orgUUID $MEND_ORGANIZATION_UUID -userEmail $MEND_EMAIL -userKey $MEND_USER_KEY -projectUUID $PROJECT_UUID -reportType sbom -format yaml -unzip yes
|
|
40
|
-
|
|
41
|
-
### Processing Project UUID: <Project_UUID>
|
|
42
|
-
>>> The report saved to 'report-<Project_UUID>.zip' successfully.
|
|
43
|
-
>>> The report 'report-<Project_UUID>.zip' extracted to 'mend-reports' folder.
|
|
44
|
-
>>> Deleted: report-<Project_UUID>.zip
|
|
45
|
-
>>> Report is ready in `mend-reports` folder.
|
|
46
|
-
...
|
|
47
|
-
|
|
48
|
-
# Content of `mend-reports` folder:
|
|
49
|
-
$ ls -l mend-reports/
|
|
50
|
-
-rw-r--r-- 1 alex alex 1033049 Apr 20 23:50 '<Project_Name>-project-SPDX-reportyaml'
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### How To Install
|
|
54
|
-
```shell
|
|
55
|
-
pip install 'mend-reporting-tool==0.1.0'
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### How To Install from source code
|
|
59
|
-
```shell
|
|
60
|
-
git clone https://github.com/chelyshev/mend-reporting-tool.git
|
|
61
|
-
python3 -m venv .venv
|
|
62
|
-
source .venv/bin/activate
|
|
63
|
-
pip install -e .
|
|
64
|
-
```
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Mend Report Generation tool
|
|
2
|
-
This is script to generate reports through [Mend API v3.0](https://api-docs.mend.io/platform/3.0).
|
|
3
|
-
|
|
4
|
-
### How To Use
|
|
5
|
-
```shell
|
|
6
|
-
$ mend-reporting-tool -h
|
|
7
|
-
usage: mend-reporting-tool [-h] -mendAPI MENDAPI -orgUUID ORGUUID -userEmail USEREMAIL -userKey USERKEY -projectUUID PROJECTUUID
|
|
8
|
-
[-reportType REPORTTYPE] [-format FORMAT] [-unzip UNZIP]
|
|
9
|
-
|
|
10
|
-
This is script to generate reports through Mend API v3.0.
|
|
11
|
-
|
|
12
|
-
options:
|
|
13
|
-
-h, --help show this help message and exit
|
|
14
|
-
-mendAPI MENDAPI Mend API v3.0 server hostname without https://, like `api-saas.whitesourcesoftware.com`
|
|
15
|
-
-orgUUID ORGUUID Organization UUID
|
|
16
|
-
-userEmail USEREMAIL User Email
|
|
17
|
-
-userKey USERKEY User Key
|
|
18
|
-
-projectUUID PROJECTUUID
|
|
19
|
-
List of Project UUIDs separeted by ','
|
|
20
|
-
-reportType REPORTTYPE
|
|
21
|
-
Report Type, for example: `vulnerabilities`, `sbom`, `spdx`, `spdx_2_3`, `cycloneDX`, `cycloneDX_1_5`,
|
|
22
|
-
`cycloneDX_1_6`. The `vulnerabilities` report type generates vulnerability report. The `sbom` report type generates
|
|
23
|
-
`spdx` format. Optional, default: `sbom`
|
|
24
|
-
-format FORMAT Report Format, acceptable formats for `vulnerabilities` reportType: `json`, `excel`; for `sbom` reportType: `json`,
|
|
25
|
-
`yaml`. Optional, default: `json`
|
|
26
|
-
-unzip UNZIP Extract report to the 'mend-reports' folder. Variants: yes, no. Optional, default: `no`
|
|
27
|
-
|
|
28
|
-
### Example:
|
|
29
|
-
mend-reporting-tool -mendAPI $MEND_API -orgUUID $MEND_ORGANIZATION_UUID -userEmail $MEND_EMAIL -userKey $MEND_USER_KEY -projectUUID $PROJECT_UUID -reportType sbom -format yaml -unzip yes
|
|
30
|
-
|
|
31
|
-
### Processing Project UUID: <Project_UUID>
|
|
32
|
-
>>> The report saved to 'report-<Project_UUID>.zip' successfully.
|
|
33
|
-
>>> The report 'report-<Project_UUID>.zip' extracted to 'mend-reports' folder.
|
|
34
|
-
>>> Deleted: report-<Project_UUID>.zip
|
|
35
|
-
>>> Report is ready in `mend-reports` folder.
|
|
36
|
-
...
|
|
37
|
-
|
|
38
|
-
# Content of `mend-reports` folder:
|
|
39
|
-
$ ls -l mend-reports/
|
|
40
|
-
-rw-r--r-- 1 alex alex 1033049 Apr 20 23:50 '<Project_Name>-project-SPDX-reportyaml'
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### How To Install
|
|
44
|
-
```shell
|
|
45
|
-
pip install 'mend-reporting-tool==0.1.0'
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### How To Install from source code
|
|
49
|
-
```shell
|
|
50
|
-
git clone https://github.com/chelyshev/mend-reporting-tool.git
|
|
51
|
-
python3 -m venv .venv
|
|
52
|
-
source .venv/bin/activate
|
|
53
|
-
pip install -e .
|
|
54
|
-
```
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mend-reporting-tool
|
|
3
|
-
Version: 0.2.0
|
|
4
|
-
Summary: This is script to generate reports through Mend API v3.0
|
|
5
|
-
Maintainer-email: Alexander Chelyshev <alexchelyshev@gmail.com>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Requires-Python: >=3.12
|
|
8
|
-
Description-Content-Type: text/markdown
|
|
9
|
-
Requires-Dist: requests>=2.33.1
|
|
10
|
-
|
|
11
|
-
# Mend Report Generation tool
|
|
12
|
-
This is script to generate reports through [Mend API v3.0](https://api-docs.mend.io/platform/3.0).
|
|
13
|
-
|
|
14
|
-
### How To Use
|
|
15
|
-
```shell
|
|
16
|
-
$ mend-reporting-tool -h
|
|
17
|
-
usage: mend-reporting-tool [-h] -mendAPI MENDAPI -orgUUID ORGUUID -userEmail USEREMAIL -userKey USERKEY -projectUUID PROJECTUUID
|
|
18
|
-
[-reportType REPORTTYPE] [-format FORMAT] [-unzip UNZIP]
|
|
19
|
-
|
|
20
|
-
This is script to generate reports through Mend API v3.0.
|
|
21
|
-
|
|
22
|
-
options:
|
|
23
|
-
-h, --help show this help message and exit
|
|
24
|
-
-mendAPI MENDAPI Mend API v3.0 server hostname without https://, like `api-saas.whitesourcesoftware.com`
|
|
25
|
-
-orgUUID ORGUUID Organization UUID
|
|
26
|
-
-userEmail USEREMAIL User Email
|
|
27
|
-
-userKey USERKEY User Key
|
|
28
|
-
-projectUUID PROJECTUUID
|
|
29
|
-
List of Project UUIDs separeted by ','
|
|
30
|
-
-reportType REPORTTYPE
|
|
31
|
-
Report Type, for example: `vulnerabilities`, `sbom`, `spdx`, `spdx_2_3`, `cycloneDX`, `cycloneDX_1_5`,
|
|
32
|
-
`cycloneDX_1_6`. The `vulnerabilities` report type generates vulnerability report. The `sbom` report type generates
|
|
33
|
-
`spdx` format. Optional, default: `sbom`
|
|
34
|
-
-format FORMAT Report Format, acceptable formats for `vulnerabilities` reportType: `json`, `excel`; for `sbom` reportType: `json`,
|
|
35
|
-
`yaml`. Optional, default: `json`
|
|
36
|
-
-unzip UNZIP Extract report to the 'mend-reports' folder. Variants: yes, no. Optional, default: `no`
|
|
37
|
-
|
|
38
|
-
### Example:
|
|
39
|
-
mend-reporting-tool -mendAPI $MEND_API -orgUUID $MEND_ORGANIZATION_UUID -userEmail $MEND_EMAIL -userKey $MEND_USER_KEY -projectUUID $PROJECT_UUID -reportType sbom -format yaml -unzip yes
|
|
40
|
-
|
|
41
|
-
### Processing Project UUID: <Project_UUID>
|
|
42
|
-
>>> The report saved to 'report-<Project_UUID>.zip' successfully.
|
|
43
|
-
>>> The report 'report-<Project_UUID>.zip' extracted to 'mend-reports' folder.
|
|
44
|
-
>>> Deleted: report-<Project_UUID>.zip
|
|
45
|
-
>>> Report is ready in `mend-reports` folder.
|
|
46
|
-
...
|
|
47
|
-
|
|
48
|
-
# Content of `mend-reports` folder:
|
|
49
|
-
$ ls -l mend-reports/
|
|
50
|
-
-rw-r--r-- 1 alex alex 1033049 Apr 20 23:50 '<Project_Name>-project-SPDX-reportyaml'
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### How To Install
|
|
54
|
-
```shell
|
|
55
|
-
pip install 'mend-reporting-tool==0.1.0'
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### How To Install from source code
|
|
59
|
-
```shell
|
|
60
|
-
git clone https://github.com/chelyshev/mend-reporting-tool.git
|
|
61
|
-
python3 -m venv .venv
|
|
62
|
-
source .venv/bin/activate
|
|
63
|
-
pip install -e .
|
|
64
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mend_reporting_tool-0.2.0 → mend_reporting_tool-0.2.2}/src/mend_reporting_tool.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|