Bug 12997 - MITRE import not working
Summary: MITRE import not working
Status: RESOLVED FIXED
Alias: None
Product: Security Response Tool
Classification: Yocto Project Subprojects
Component: General (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.7 M1
Assignee: David Reyna
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-11-09 12:49 UTC by Ross Burton
Modified: 2018-12-22 02:18 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 Ross Burton 2018-11-09 12:49:23 UTC
Running the MITRE fetch command manually:

$ ./bin/srtool_mitre.py -u --source="Mitre 2018"
--file=data/allitems-cvrf-year-2018.xml
--url-file=allitems-cvrf-year-2018.xml
MITRE downloading
'https://cve.mitre.org/data/downloads/allitems-cvrf-year-2018.xml' as
'/home/ross/Yocto/srtool/data/allitems-cvrf-year-2018.xml'
Traceback (most recent call last):
  File "./bin/srtool_mitre.py", line 314, in <module>
    main(sys.argv[1:])
  File "./bin/srtool_mitre.py", line 304, in main
    init_mitre(args.source,args.url_file,args.cve_file)
  File "./bin/srtool_mitre.py", line 181, in init_mitre
    result_returncode,result_stdout,result_stderr = execute_process(
NameError: name 'execute_process' is not defined
Comment 1 David Reyna 2018-11-09 21:00:10 UTC
Add missing "execute_process" helper method.
Comment 2 Ross Burton 2018-11-12 11:30:53 UTC
So this happens:

$ ./bin/srtool_mitre.py -u --source="Mitre 2018" --file=data/allitems-cvrf-year-2018.xml --url-file=allitems-cvrf-year-2018.xml
MITRE File already downloaded:/home/ross/Yocto/srtool/data/allitems-cvrf-year-2018.xml

Shouldn't it be refreshing the file?

Once I delete that file then the download is successful.
Comment 3 David Reyna 2018-12-22 02:18:46 UTC
The automatic source file update will happen when we start the CRON job that triggers the refresh actions via "bin/common/srtool_utils.py --run-all-updates".

This tool in turn examines the datasource list for the update frequency, and executed the update actions accordingly.