Skip to content

Commit

Permalink
base score
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe authored Sep 13, 2024
1 parent 09b38ea commit 923b19c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions extra-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
CREATE OR REPLACE VIEW public.sourcepackagecve
AS
SELECT all_cve.cve_id AS cve_id,
CASE
WHEN data->'metrics'->'cvssMetricV40' IS NOT NULL THEN
(data->'metrics'->'cvssMetricV40'->0->'cvssData'->>'baseScore')::numeric
WHEN data->'metrics'->'cvssMetricV31' IS NOT NULL THEN
(data->'metrics'->'cvssMetricV31'->0->'cvssData'->>'baseScore')::numeric
WHEN data->'metrics'->'cvssMetricV30' IS NOT NULL THEN
(data->'metrics'->'cvssMetricV30'->0->'cvssData'->>'baseScore')::numeric
WHEN data->'metrics'->'cvssMetricV2' IS NOT NULL THEN
(data->'metrics'->'cvssMetricV2'->0->'cvssData'->>'baseScore')::numeric
ELSE NULL
END AS base_score,
deb_cve.deb_source AS source_package_name,
deb_cve.deb_version AS source_package_version,
dist_cpe.cpe_version AS gardenlinux_version,
Expand Down

0 comments on commit 923b19c

Please sign in to comment.