Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add(vulnerabilities): count of applications for a given dates and env #19

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/database/gensql/vulnerability.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions internal/database/queries/vulnerability.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SELECT
sum(low) AS low,
sum(unassigned) AS unassigned,
sum(risk_score) AS risk_score,
COUNT(DISTINCT dependencytrack_project_id) AS count,
date
FROM
vulnerability_metrics
Expand All @@ -32,6 +33,7 @@ SELECT
sum(low) AS low,
sum(unassigned) AS unassigned,
sum(risk_score) AS risk_score,
COUNT(DISTINCT dependencytrack_project_id) AS count,
date
FROM
vulnerability_metrics
Expand Down
62 changes: 62 additions & 0 deletions internal/graph/gengql/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions internal/graph/graphqls/teams.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ type VulnerabilityMetric {

"The weighted severity score calculated from the number of vulnerabilities."
riskScore: Int!

"The number of applications with vulnerabilities."
count: Int!
}

"Slack alerts channel type."
Expand Down
2 changes: 2 additions & 0 deletions internal/graph/model/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/graph/teams.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.