Add --nopreamble option for use with apr-site, no functional change. [skip ci] Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
diff --git a/content/security/cvejsontohtml.py b/content/security/cvejsontohtml.py index 6da08a7..3e28cf1 100755 --- a/content/security/cvejsontohtml.py +++ b/content/security/cvejsontohtml.py
@@ -12,6 +12,7 @@ parser.add_option("-i","--inputdirectory",help="directory of json files",dest="directory") parser.add_option("-d","--debug",help="enable debug output to stderr",dest="debug",action="store_true",default=False) parser.add_option("-l","--impactlink",help="URL for impact levels page",dest="impactlink",default="/security/impact_levels.html") +parser.add_option("-n","--nopreamble",help="skip the page header/preamble output",dest="nopreamble",action="store_true",default=False) # To debug without getting flooded, put 1 working and 1 broken JSON file in tmp/ and pass --debug -i tmp @@ -172,16 +173,17 @@ # Everything is sorted and pretty, this should be some python template thing # We are generating html in markdown. Add the metadata first. -print ("Title: "+productname+" "+filterversion+" vulnerabilities") -print ("asf_headings: False") -print ("") -print ("<h1>"+productname+" "+filterversion+" vulnerabilities</h1>") -print ("<p>This page lists all security vulnerabilities fixed in released versions of "+productname+" "+filterversion+". Each vulnerability is given a security <a href=\""+options.impactlink+"\">impact rating</a> by the Apache security team - please note that this rating may well vary from platform to platform. We also list the versions the flaw is known to affect, and where a flaw has not been verified list the version with a question mark.</p>") -print ("<p>Please note that if a vulnerability is shown below as being fixed in a \"-dev\" release then this means that a fix has been applied to the development source tree and will be part of an upcoming full release.</p>") -print ("<p>Please send comments or corrections for these vulnerabilities to the <a href=\"/security_report.html\">Security Team</a>.</p> <br/>") +if not options.nopreamble: + print ("Title: "+productname+" "+filterversion+" vulnerabilities") + print ("asf_headings: False") + print ("") + print ("<h1>"+productname+" "+filterversion+" vulnerabilities</h1>") + print ("<p>This page lists all security vulnerabilities fixed in released versions of "+productname+" "+filterversion+". Each vulnerability is given a security <a href=\""+options.impactlink+"\">impact rating</a> by the Apache security team - please note that this rating may well vary from platform to platform. We also list the versions the flaw is known to affect, and where a flaw has not been verified list the version with a question mark.</p>") + print ("<p>Please note that if a vulnerability is shown below as being fixed in a \"-dev\" release then this means that a fix has been applied to the development source tree and will be part of an upcoming full release.</p>") + print ("<p>Please send comments or corrections for these vulnerabilities to the <a href=\"/security_report.html\">Security Team</a>.</p> <br/>") -if (options.extratext): - print ("<p>"+options.extratext+"</p><br/>") + if (options.extratext): + print ("<p>"+options.extratext+"</p><br/>") for sectioncves in sections: print ("\n<h1 id=\""+sectioncves["fixed"]+"\">Fixed in "+sectioncves["product"]+" "+sectioncves["fixed"]+"</h1><dl>\n")