From c9c5444f4f27f0a7375088a1cc0b4594742d8fe8 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 14 Mar 2024 15:18:20 -0700 Subject: Write JSON index files for advisories The JSON schema is simple and compatible with the one published in the Go Vulnerability Database. Security advisories and bugfix advisories each have their own index. --- tmpl/bugs.json | 10 ++++++++++ tmpl/vulns.json | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tmpl/bugs.json create mode 100644 tmpl/vulns.json (limited to 'tmpl') diff --git a/tmpl/bugs.json b/tmpl/bugs.json new file mode 100644 index 0000000..375e7f7 --- /dev/null +++ b/tmpl/bugs.json @@ -0,0 +1,10 @@ +[ +[%- FOR adv IN advdb.sorted -%] +[% USE advid = String(basename.ID(adv)) -%] +[% IF advid.search('^MGAA-') -%] +[%- "," IF gotone %] +{"id": "[% basename.ID(adv) %]"} +[%- SET gotone = 1 %] +[%- END %] +[%- END %] +] diff --git a/tmpl/vulns.json b/tmpl/vulns.json new file mode 100644 index 0000000..aadcd05 --- /dev/null +++ b/tmpl/vulns.json @@ -0,0 +1,10 @@ +[ +[%- FOR adv IN advdb.sorted -%] +[% USE advid = String(basename.ID(adv)) -%] +[% IF advid.search('^MGASA-') -%] +[%- "," IF gotone %] +{"id": "[% basename.ID(adv) %]"} +[%- SET gotone = 1 %] +[%- END %] +[%- END %] +] -- cgit v1.2.1