Bug 13132

Summary: Cannot force updates using srt manage
Product: [Yocto Project Subprojects] Security Response Tool Reporter: Ross Burton <ross.burton>
Component: GeneralAssignee: David Reyna <david.reyna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium    
Version: unspecified   
Target Milestone: 2.7 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2019-01-10 14:37:51 UTC
It looks like I should be able to force an update (ie from a cron, or manually) using srt manage.  However:

$ ./bin/srt manage lsupdates
SRT_MAIN_APP=yp
The system will manage.
Skipping datasource SRT database schema for command line tools (already loaded)
Skipping datasource Table of package keyword filters (already loaded)
Skipping datasource Table of notification categories (already loaded)
Skipping datasource NIST 2015 (already loaded)
Skipping datasource NIST 2016 (already loaded)
Skipping datasource NIST 2017 (already loaded)
Skipping datasource NIST 2018 (already loaded)
Skipping datasource NIST Modified Data (no init action)
Skipping datasource NIST Common Weakness Enumeration Data (already loaded)
Skipping datasource MITRE 2015 (already loaded)
Skipping datasource MITRE 2016 (already loaded)
Skipping datasource MITRE 2017 (already loaded)
Skipping datasource MITRE 2018 (already loaded)
Skipping datasource Debian (already loaded)
Skipping datasource RedHat (no init action)
Skipping datasource Yocto Project Product Table (already loaded)
Skipping datasource Sample User Table (already loaded)
Skipping datasource Local CVE (no init action)
Skipping datasource Weekly archive database backup (no init action)
Skipping datasource Daily archive database backup (no init action)
Skipping datasource Preset New CVEs (already loaded)
Skipping datasource Score CVEs (already loaded)
Comment 1 David Reyna 2019-01-11 19:58:25 UTC
Hi,

The "lsupdates" is currently focused on the "initialization" phase, and in your example output you will observe that all of the datasources are already initialized.

The "bin/common/srtool_utils.py" is the tool that handles the "updates" and the CRON job connection. That tool is being ported to the current SRTool release (as per bug 13131). Once I have this working I will update the documentation on how to connect it to CRON jobs.

We discussed "force an update" facility in a different enhancement request. I will look at extending "lsupdates" (or another management tool) to support that.
Comment 2 David Reyna 2019-03-04 17:02:13 UTC
This has been implemented. See "./bin/srt manage update -h".