Skip to content

Commit 0c471a6

Browse files
committed
add(vulnerabilities): count of applications for a given dates and environment
* This can help teams to see why changes in number of vulnerabilites could dramaticly change
1 parent 2158e19 commit 0c471a6

File tree

6 files changed

+81
-1
lines changed

6 files changed

+81
-1
lines changed

internal/database/gensql/vulnerability.sql.go

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/database/queries/vulnerability.sql

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SELECT
77
sum(low) AS low,
88
sum(unassigned) AS unassigned,
99
sum(risk_score) AS risk_score,
10+
COUNT(DISTINCT dependencytrack_project_id) AS count,
1011
date
1112
FROM
1213
vulnerability_metrics
@@ -32,6 +33,7 @@ SELECT
3233
sum(low) AS low,
3334
sum(unassigned) AS unassigned,
3435
sum(risk_score) AS risk_score,
36+
COUNT(DISTINCT dependencytrack_project_id) AS count,
3537
date
3638
FROM
3739
vulnerability_metrics

internal/graph/gengql/generated.go

+62
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/graph/graphqls/teams.graphqls

+3
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ type VulnerabilityMetric {
416416

417417
"The weighted severity score calculated from the number of vulnerabilities."
418418
riskScore: Int!
419+
420+
"The number of applications with vulnerabilities."
421+
count: Int!
419422
}
420423

421424
"Slack alerts channel type."

internal/graph/model/models_gen.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/graph/teams.resolvers.go

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)