Check that the fetched feed is a JSON feed 1.1 and fail if not

pull/38579/head
mtardy 2023-01-22 19:08:24 +01:00
parent 96fe076330
commit 3305d7b1db
1 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
{{ $feed := getJSON .Site.Params.cveFeedBucket }}
{{ if ne $feed.version "https://jsonfeed.org/version/1.1" }}
{{ errorf "Build Failed. CVE feed does not comply with JSON feed v1.1" }}
{{ end }}
<table class="security-cves">
{{ $feed := getJSON .Site.Params.cveFeedBucket }}
<caption style="caption-side: top;">{{ T "cve_table" }} {{ T "cve_table_date_before" }}{{ $feed._kubernetes_io.updated_at | time.Format ( T "cve_table_date_format" ) }}{{ T "cve_table_date_after" }}</caption>
<thead>
<tr>