Bug 13121 - CVE Resource information not available in SRTool
Summary: CVE Resource information not available in SRTool
Status: RESOLVED FIXED
Alias: None
Product: Security Response Tool
Classification: Yocto Project Subprojects
Component: General (show other bugs)
Version: unspecified
Hardware: x86 x86_64
: Medium normal
Target Milestone: 2.7 M2
Assignee: David Reyna
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-01-04 15:27 UTC by Karin Julenius
Modified: 2019-01-12 18:34 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karin Julenius 2019-01-04 15:27:23 UTC
Preconditions/Environment
-------------------------
centos-release-7-6.1810.2.el7.centos.x86_64
Django==2.1.4
pytz==2018.7
SRTool commit b6d8d653dabcbd8d42ccb7f205bb58c7bf6f24cb

Triggering Action/Cause
-----------------------
Looking at the detail page of a specific CVE

Expectation
-----------
Under the headline "References to Advisories, Solutions, and Tools" there is a table of Hyperlinks that looks very similar to the same table at the corresponding page at nvd.nist.gov. I would expect the content to also be the same, i e if there is a "Resource" classification to one of the hyperlinks, I expect it to be seen. 

Actual Result
-------------
I cannot find a single CVE with Resource or Type information in the database:
sqlite> select * from orm_cvereference where resource is not null;
sqlite> select * from orm_cvereference where type is not null;
sqlite> 


Reproducibility
---------------
10/10
Comment 1 David Reyna 2019-01-04 16:39:03 UTC
Hi Karin,

It is true that the CVE is indeed purposely patterned after the NIST page.

And it is also true that the "resource" and "type" fields are currently empty. 

  * When I did my first implementation, the JSON files from NIST did not include the "Resource", "Type", and "Source" fields. I did not worry about it at the time because the content visible at the NIST site seemed completely redundant with the actual hyperlink.

  * I just now looked again at NIST, and I see that they have since changed the interface. The "Resource" field now seems to be 'tag' like entries, and the "Type" and "Source" fields are removed.

I will review the latest JSON format, and include the "resource" field if it present.

Thanks,
David
Comment 2 David Reyna 2019-01-04 17:09:47 UTC
And yes, it has been added to the NIST JSON schema:

"references": 
  "reference_data": [
    "url": "http://www.securityfocus.com/bid/103092", "name": "103092", "tags": [], "refsource": "BID"},
    "url": "http://www.securitytracker.com/id/1040180", "name": "1040180", "tags": ["Third Party Advisory", "VDB Entry"], "refsource": "SECTRACK"},
    "url": "https://kb.juniper.net/JSA10828", "name": "https://kb.juniper.net/JSA10828", "tags": ["Mitigation", "Patch", "Vendor Advisory"], "refsource": "CONFIRM"}
 ]}
Comment 3 David Reyna 2019-01-05 02:28:36 UTC
Fix pushed:

commit e61223da184829d911c6247640abb81d08c7ab59
Comment 4 Karin Julenius 2019-01-07 10:57:36 UTC
Hi!

Thank you for a quick fix!
However, some resource links look like they have been parsed  incorrectly, for instance first row in:

http://linux-srtool:8010/srtgui/cve/CVE-2015-8504
Comment 5 Karin Julenius 2019-01-07 11:00:05 UTC
Sorry, for the internal link. I meant to paste this one:

https://nvd.nist.gov/vuln/detail/CVE-2015-8504
Comment 6 David Reyna 2019-01-07 18:30:06 UTC
New fix pushed:

   commit 89a07b2546cfed66ed833c0960ddfc2bc69be9fc

Changing the internal field separator from ';' to a tab key avoids parsing problems with CVE references like:

  http://git.qemu-project.org/?p=qemu.git;a=commitdiff;h=4c65fed8b...

- David
Comment 7 David Reyna 2019-01-12 18:34:13 UTC
commit 98b5bc41ed75b57de4376757a575458e72bf44c3
commit 89a07b2546cfed66ed833c0960ddfc2bc69be9fc
commit e61223da184829d911c6247640abb81d08c7ab59