<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12996</bug_id>
          
          <creation_ts>2018-11-09 12:48:42 +0000</creation_ts>
          <short_desc>NIST import not working</short_desc>
          <delta_ts>2018-11-13 09:54:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Security Response Tool</product>
          <component>General</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82107</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-11-09 12:48:42 +0000</bug_when>
    <thetext>Daylight saving has resulted in the NIST parsing being too strict:

$ ./bin/srtool_nist.py -n --source=&quot;NIST 2018&quot;
--file=data/nvdcve-1.0-2018.json --url-file=nvdcve-1.0-2018.json.gz
--url-meta=nvdcve-1.0-2018.meta
BEGINNING NIST UPDATES PLEASE WAIT ... this can take some time
DATABASE UPDATED FAILED ... time data
&apos;lastModifiedDate:2018-11-08T03:06:21-05:00\r\n&apos; does not match format
&apos;lastModifiedDate:%Y-%m-%dT%H:%M:%S-04:00\r\n&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82137</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-11-09 20:59:25 +0000</bug_when>
    <thetext>Remove UTC offset to avoid timezone/day light savings errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82172</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-11-12 11:29:36 +0000</bug_when>
    <thetext>$ ./bin/srtool_nist.py -n --source=&quot;NIST 2018&quot; --file=data/nvdcve-1.0-2018.json --url-file=nvdcve-1.0-2018.json.gz --url-meta=nvdcve-1.0-2018.meta
BEGINNING NIST UPDATES PLEASE WAIT ... this can take some time
[  99]                 CVE-2018-9999
DATABASE UPDATE FINISHED</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82177</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-11-12 15:57:03 +0000</bug_when>
    <thetext>Just discovered this in the NIST description field for new CVEs:

ERROR(1):b&apos;Traceback (most recent call last):
File &quot;bin/srtool_nist.py&quot;, line 695, in &lt;module&gt;
    main(sys.argv[1:])
  File &quot;bin/srtool_nist.py&quot;, line 643, in main
    fetch_cve(args.cve_detail,args.cve_file)
  File &quot;bin/srtool_nist.py&quot;, line 594, in fetch_cve
    summary[\&apos;cpe_list\&apos;] += nist_scan_configuration_or(config, cve_name, 0)\n  File &quot;bin/srtool_nist.py&quot;, line 606, in nist_scan_configuration_or
    for cpe in cpe_or_node[\&apos;cpe\&apos;]:\nKeyError: \&apos;cpe\&apos;&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82182</commentid>
    <comment_count>4</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-11-12 22:54:16 +0000</bug_when>
    <thetext>NIST is its wisdom has added or replaced the &quot;cpe&quot; sub-table with &quot;cpe-match&quot; in the 2018 tables. The 2015 sub-table still uses &quot;cpe&quot;.

The updated code now accepts both table names when scanning CPE entries.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82186</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-11-13 09:54:10 +0000</bug_when>
    <thetext>Confirmed fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>