Merge pull request #39727 from mtardy/cve-feed-cleanup

CVE feed cleanup on i18n data and shortcode compliance check
pull/39728/head
Kubernetes Prow Robot 2023-02-28 03:09:20 -08:00 committed by GitHub
commit fbd180f41b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -55,14 +55,11 @@ other = "Issue Summary"
[cve_table]
other = "Official Kubernetes CVE List"
[cve_table_date_before]
other = "(last updated: "
[cve_table_date_format]
other = "02 Jan 2006 15:04:05 MST"
[cve_table_date_after]
other = ")"
[cve_table_date_format_string]
other = "(last updated: %s)"
[deprecation_title]
other = "You are viewing documentation for Kubernetes version:"

View File

@ -1,9 +1,9 @@
{{ $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" }}
{{ warnf "CVE feed shortcode. KEP-3203: CVE feed does not comply with JSON feed v1.1." }}
{{ end }}
<table class="security-cves">
<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>
<caption style="caption-side: top;">{{ T "cve_table" }} {{ printf (T "cve_table_date_format_string") ($feed._kubernetes_io.updated_at | time.Format (T "cve_table_date_format")) }}</caption>
<thead>
<tr>
<th>{{ T "cve_id" }}</th>