Skip to content

Commit

Permalink
vector_string
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe authored Sep 13, 2024
1 parent 923b19c commit 6e7db6b
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 @@ -16,6 +16,17 @@ CREATE OR REPLACE VIEW public.sourcepackagecve
(data->'metrics'->'cvssMetricV2'->0->'cvssData'->>'baseScore')::numeric
ELSE NULL
END AS base_score,
CASE
WHEN data->'metrics'->'cvssMetricV40' IS NOT NULL THEN
(data->'metrics'->'cvssMetricV40'->0->'cvssData'->>'vectorString')::text
WHEN data->'metrics'->'cvssMetricV31' IS NOT NULL THEN
(data->'metrics'->'cvssMetricV31'->0->'cvssData'->>'vectorString')::text
WHEN data->'metrics'->'cvssMetricV30' IS NOT NULL THEN
(data->'metrics'->'cvssMetricV30'->0->'cvssData'->>'vectorString')::text
WHEN data->'metrics'->'cvssMetricV2' IS NOT NULL THEN
(data->'metrics'->'cvssMetricV2'->0->'cvssData'->>'vectorString')::text
ELSE NULL
END AS vector_string,
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 6e7db6b

Please sign in to comment.