Skip to content

Commit

Permalink
Bruk created-at fra github sitt api, ikke bare alltid ZonedDateTime.n…
Browse files Browse the repository at this point in the history
…ow()
  • Loading branch information
hermanwh committed Nov 21, 2023
1 parent 186f6d5 commit ccdebb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private suspend fun getVulnerabilitiesForRepo(
it?.let {
Vulnerability(
it.securityVulnerability!!.severity.name,
ZonedDateTime.now(),
ZonedDateTime.parse(it.createdAt.toString()),
it.securityVulnerability.`package`.name,
it.securityVulnerability.advisory.cvss.score,
it.securityVulnerability.advisory.identifiers.firstOrNull { identifier -> "CVE" == identifier.type }?.value
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/no/digipost/github/monitoring/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ suspend fun publish(apolloClient: ApolloClient, githubApiClient: GithubApiClient
MultiGauge.Row.of(
Tags.of(
"name", repo.name,
"created", vuln.createdAt.toString(),
"language", repo.language,
"CVE", vuln.CVE ?: "",
"packagename", vuln.packageName ?: "UNKNOWN",
Expand Down

0 comments on commit ccdebb2

Please sign in to comment.