Skip to content
1 change: 1 addition & 0 deletions src/ghastoolkit/octokit/dependabot.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def getAlerts(
),
advisory=advisory,
purl=f"pkg:{package.get('ecosystem')}/{package.get('name')}".lower(),
manifest=alert.get("manifest_path"),
)
)

Expand Down
3 changes: 3 additions & 0 deletions src/ghastoolkit/octokit/dependencygraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ def getDependenciesInPR(self, base: str, head: str) -> Dependencies:

for alert in depdata.get("vulnerabilities", []):
dep_alert = DependencyAlert(
depdata.get("vulnerabilities").index(alert),
"open",
alert.get("severity"),
purl=dep.getPurl(False),
advisory=Advisory(
Expand All @@ -223,6 +225,7 @@ def getDependenciesInPR(self, base: str, head: str) -> Dependencies:
summary=alert.get("advisory_summary"),
url=alert.get("advisory_ghsa_url"),
),
manifest=alert.get("manifest"),
)
dep.alerts.append(dep_alert)

Expand Down
3 changes: 3 additions & 0 deletions src/ghastoolkit/supplychain/dependencyalert.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class DependencyAlert(OctoItem):
created_at: Optional[str] = None
"""Created Timestamp"""

manifest: Optional[str] = None
"""Manifest"""

def __init_post__(self):
if not self.created_at:
self.created_at = datetime.now().strftime("%Y-%m-%dT%XZ")
Expand Down