aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/MGA/Advisories.pm2
-rw-r--r--tmpl/bugs.json10
-rw-r--r--tmpl/vulns.json10
3 files changed, 22 insertions, 0 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index 8ce3581..08f5c15 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -653,6 +653,8 @@ sub output_pages {
};
process_template($template, 'index', $vars, 'index');
process_template($template, 'advisories', $vars, 'advisories');
+ process_template($template, 'vulns', $vars, 'vulns', 'json');
+ process_template($template, 'bugs', $vars, 'bugs', 'json');
process_template($template, 'infos', $vars, 'infos');
process_template($template, 'CVE', $vars, 'CVE');
}
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 %]
+]