Skip to content

Commit

Permalink
fix: SPDX version handling
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyharrison committed Jul 8, 2023
1 parent b4777f1 commit ee06e54
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/sbom_manager/spdx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def parse_spdx_tag(self, sbom_file: str) -> list[list[str]]:
package = line_elements[1].strip().rstrip("\n")
version = None
if line_elements[0] == "PackageVersion":
# Version may contain :
version = line[16:].strip().rstrip("\n")
version = version.split("-")[0]
version = version.split("+")[0]
Expand Down

0 comments on commit ee06e54

Please sign in to comment.