Skip to content

Commit 3a04bed

Browse files
authored
Update python scripts with SOLID
1 parent cf6f0d6 commit 3a04bed

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

shortform_report-main/OcpReportLib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def add_audit(
200200
date: str,
201201
report_ver: str,
202202
scope_number: int,
203+
solid_ver: str,
203204
cvss_ver: str = "3.1",
204205
) -> None:
205206
"""Add metadata that describes the scope of the security review.
@@ -211,6 +212,7 @@ def add_audit(
211212
YYYY-MM-DD format.
212213
report_ver: Version of the report created by the SRP.
213214
scope: The OCP scope number of the audit, 1, 2, or 3.
215+
solid_ver: OCP SOLID version the audit checks against.
214216
cvss_ver: Version of CVSS used to calculate scores for each issue.
215217
Defaults to "3.1".
216218
"""
@@ -220,6 +222,7 @@ def add_audit(
220222
self.report["audit"]["completion_date"] = f"{date}".strip()
221223
self.report["audit"]["report_version"] = f"{report_ver}".strip()
222224
self.report["audit"]["scope_number"] = scope_number
225+
self.report["audit"]["solid_ver"] = solid_ver
223226
self.report["audit"]["cvss_version"] = f"{cvss_ver}".strip()
224227
self.report["audit"]["issues"] = []
225228

@@ -378,6 +381,7 @@ def _convert_to_corim_structure(self) -> Dict[str, Any]:
378381
2: completion_timestamp, # completion-date
379382
3: self.report["audit"]["scope_number"], # scope-number
380383
4: fw_identifiers, # fw-identifiers
384+
6: self.report["audit"]["solid_ver"], # solid-version
381385
}
382386

383387
if corim_issues:

shortform_report-main/example_dual_format_generation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def main():
6767
"2023-06-25", # Test completion date
6868
"1.2", # Report version
6969
1, # The OCP SAFE scope level
70+
"1.0", # The OCP SOLID version
7071
)
7172

7273
# Add security issues

shortform_report-main/example_gen_sign_verify.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"2023-06-25", # Test completion date
8989
"1.2", # Report version
9090
1, # The OCP SAFE scope level
91+
"1.0", # The OCP SOLID version
9192
)
9293

9394
# Add issue details.

0 commit comments

Comments
 (0)