Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "FLOP:CVE Monitoring"

From Funtoo
Jump to navigation Jump to search
m
Line 16: Line 16:
== Architecture ==
== Architecture ==
The architecture is simple:
The architecture is simple:
<small>
<syntaxhighlight style="white-space:nowrap">
<syntaxhighlight style="white-space:nowrap">
┌─────────┐                                 
┌─────────┐                                 
Line 27: Line 26:
     │    ┌───┐    │    ***        ***   
     │    ┌───┐    │    ***        ***   
     ├─────┤dev│──────────*  discussion *   
     ├─────┤dev│──────────*  discussion *   
     │    └───┘   │    ***        ***   
     │    └─┬─┘   │    ***        ***   
     │             │        *********       
     │       │      │        *********       
     │             │                       
     │       │      │                       
     │    ┌───┐   │                       
     │    ┌─┴─┐   │                       
     ├─────┤bot│────┘                       
     ├─────┤bot│────┘                       
     │    └───┘                             
     │    └───┘                             
Line 37: Line 36:
     │    ┌───┐                             
     │    ┌───┐                             
     └─────│usr│                             
     └─────│usr│                             
           └───┘                                                                        
           └───┘                          
                                                                     
</syntaxhighlight>
</syntaxhighlight>
</small>                                                                      
* A <tt>dev</tt> uses the tool to query the <tt>redis</tt> cache of the CVE data held in the <tt>mongoDB</tt>, update and admin the <tt>mongoDB</tt>, create reports for ''discussion'',  and control a <tt>bot</tt>.
* The <tt>bot</tt> can query the <tt>redis</tt> cache and create issues to post via the REST api of <tt>jira</tt>.
* A <tt>user</tt> can query the <tt>redis</tt> cache and create reports.
* ''discussion'' produces issues to be posted at <tt>jira</tt>.
 
                                                   
{{FLOPFooter}}
{{FLOPFooter}}

Revision as of 02:53, January 24, 2020

Created on
2020/01/21
Original Author(s)
d4g33z
Git sources (for cloning)
Link
Status
Reference Bug
FL-6938

Funtoo Linux Optimization Proposal: CVE Monitoring

Let's monitor the Common Vulnerabilities and Exposures (CVE) list and flag packages in the current portage tree accordingly. Posting bugs on jira.funtoo.org for affected packages could be automated to a significant extent.

Summary

Ultimately, not all ebuilds are created equal. Hence they are updated at different rates according to their popularity in the tree of available packages and this is generally fine: packages with a lot of use get updated frequently, and vulnerabilities are generally dealt with. Unpopular ebuilds can languish, and no one really cares. However, unpopular ebuilds with a significant vulnerability should be updated, popular or not, as they represent a potential vector for attack, if they can be installed.

Identifying ebuilds with an associated CVE will bring them to 'head of the queue' for pull requests and updates, which should often be trivial, as the vulnerability is dealt with upstream and released as a new hotfix version. Or, we can fork and provide our own mitigation, merging with upstream again when a new release comes out (if at all).

The cver tool is built around redis and mongodb collections that are regularly updated with newly filed CVEs. The tool queries the collections to produce a set of text data appropriate to fill fields on a newly created security vulnerability issue on the Funtoo bug tracker. The data can be output in various formats (current just formatted text on stdout), and eventually input directly to the bug tracker via its REST api.

Architecture

The architecture is simple:

┌─────────┐                                 
│redis    │      ┌────┐                     
│┌───────┐│      │jira│──────────┐          
││mongoDB││      └──┬─┘          │          
│└───────┘│         │            │          
└────┬────┘         │            │          
     │              │        *********      
     │     ┌───┐    │     ***         ***   
     ├─────┤dev│──────────*  discussion *   
     │     └─┬─┘    │     ***         ***   
     │       │      │        *********      
     │       │      │                       
     │     ┌─┴─┐    │                       
     ├─────┤bot│────┘                       
     │     └───┘                            
     │                                      
     │                                      
     │     ┌───┐                            
     └─────│usr│                            
           └───┘
  • A dev uses the tool to query the redis cache of the CVE data held in the mongoDB, update and admin the mongoDB, create reports for discussion, and control a bot.
  • The bot can query the redis cache and create issues to post via the REST api of jira.
  • A user can query the redis cache and create reports.
  • discussion produces issues to be posted at jira.