ClearBlue
|
#include <Vulnerability.h>
Public Member Functions | |
virtual const char * | getFullName ()=0 |
Get the full name of the vulnerability. | |
virtual const char * | getAbbrName ()=0 |
Get the abbr name of the vulnerability. | |
bool | add (std::shared_ptr< Vulnerability > V) |
std::shared_ptr< Vulnerability > | get (size_t Index) const |
size_t | size () const |
std::vector< std::shared_ptr< Vulnerability > >::const_iterator | begin () const |
std::vector< std::shared_ptr< Vulnerability > >::const_iterator | end () const |
virtual void | buildDependence ()=0 |
void | insertHeadDependence (std::shared_ptr< Vulnerability > V1, std::shared_ptr< Vulnerability > V2, GetTraceFunctionTy &Func) |
void | insertTailDependence (std::shared_ptr< Vulnerability > V1, std::shared_ptr< Vulnerability > V2, GetTraceFunctionTy &Func) |
std::set< std::shared_ptr< Vulnerability > >::iterator | head_dep_begin (std::shared_ptr< Vulnerability > V) |
std::set< std::shared_ptr< Vulnerability > >::iterator | head_dep_end (std::shared_ptr< Vulnerability > V) |
std::set< std::shared_ptr< Vulnerability > >::iterator | tail_dep_begin (std::shared_ptr< Vulnerability > V) |
std::set< std::shared_ptr< Vulnerability > >::iterator | tail_dep_end (std::shared_ptr< Vulnerability > V) |
const SEGObject * | getTraceHead (std::shared_ptr< Vulnerability > V1, std::shared_ptr< VulnerabilityTrace > T1, std::shared_ptr< Vulnerability > V2) |
const SEGObject * | getTraceTail (std::shared_ptr< Vulnerability > V1, std::shared_ptr< VulnerabilityTrace > T1, std::shared_ptr< Vulnerability > V2) |
Protected Attributes | |
std::vector< std::shared_ptr< Vulnerability > > | Vulns |
What the multi-vulnerability consists of. | |
typedef std::pair< std::shared_ptr< Vulnerability >, std::shared_ptr< Vulnerability > > | VulnPairTy |
typedef std::function< const SEGObject *(std::shared_ptr< VulnerabilityTrace >)> | GetTraceFunctionTy |
std::map< std::shared_ptr< Vulnerability >, std::set< std::shared_ptr< Vulnerability > > > | HeadDeps |
std::map< std::shared_ptr< Vulnerability >, std::set< std::shared_ptr< Vulnerability > > > | TailDeps |
std::map< VulnPairTy, GetTraceFunctionTy > | HeadDepFctorMap |
std::map< VulnPairTy, GetTraceFunctionTy > | TailDepFctorMap |
This class describes multi-vulnerability, which is a composition of vulnerability instances.
|
inline |
Functions describing what a multi-vulnerability consists of
|
pure virtual |
Override this function to describe how the muti-vulnerability is made of the contained vulnerabilities
Call get(size_t I) to get the Ith part of the vulnerability. The order of its parts follows the order in which it is registered.
Call insertHeadDependence(...) and insertTailDependence(...) in the function to build the dependence between parts of the multi-vulnerability
|
inline |
Given a part of the multi-vulnerability V1
and a trace T1
of this part, return the head and tail of the trace belonging to the part V2
If there is no dependence between V1
and V2
, { nullptr, nullptr } returns.
|
inline |
The iterators that iterates on the parts on which V
depends.
|
inline |
V1's
trace decide the head of V2's
trace Func
provides interface for getting the head.
|
inline |
V1's
trace decide the tail of V2's
trace Func
provides interface for getting the tail.
|
protected |
Dependences between parts of the multi-vulnerability
If HeadDeps[V1].count(V2), V1's trace will decide the head of V2's trace TraceHeadDepMap stores the function that can get the head of V2's trace
|
protected |
If TailDeps[V1].count(V2), V1's trace will decide the tail of V2's trace TraceTailDepMap stores the function that can get the tail of V2's trace