Skip to content

Commit f0b9c50

Browse files
authored
Update service.py
1 parent c95555d commit f0b9c50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sbom_tm/service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _resolve(ref: Optional[str]) -> Optional[sbom_loader.ParsedComponent]:
9898

9999
threats_payload: List[dict] = []
100100
vulnerability_count = 0
101-
101+
vulnerabilities_payload: List[dict] = []
102102
with session_scope() as session:
103103
scan = ProjectScan(project=project, sbom_path=str(sbom_path))
104104
session.add(scan)
@@ -156,7 +156,8 @@ def _resolve(ref: Optional[str]) -> Optional[sbom_loader.ParsedComponent]:
156156

157157
for enriched_vuln in enriched_vulnerabilities:
158158
vulnerability_count += 1
159-
159+
vulnerabilities_payload.append({ enriched_vuln,
160+
})
160161
vuln_record = Vulnerability(
161162
component_id=component_record.id,
162163
cve=_extract(enriched_vuln, ["VulnerabilityID", "cve"]),

0 commit comments

Comments
 (0)