A map between CVE numbers and upstream SHAs.
More...
#include <CveShaMap.h>
|
|
| CveShaMap (const CveShaMap &)=delete |
|
CveShaMap & | operator= (const CveShaMap &)=delete |
|
| CveShaMap (CveShaMap &&)=default |
| | Move constructor.
|
|
CveShaMap & | operator= (CveShaMap &&)=default |
| | Move assignment operator.
|
| | CveShaMap (const std::filesystem::path &vsource={}, ShaSize shaSize=ShaSize::Long, const std::string &branch="origin/master", unsigned year=0, bool rejected=false) |
| | Create a new CveShaMap.
|
| std::string_view | getCve (std::string_view shaCommit) const |
| | Get CVE number for shaCommit.
|
| std::vector< std::string > | getShas (std::string_view cveNumber) const |
| | Get SHAs for cveNumber.
|
| std::set< std::string > | getAllCves () const |
| | Get all stored CVE numbers.
|
A map between CVE numbers and upstream SHAs.
◆ CveShaMapTy
Initial value: std::unordered_multimap<std::string, std::string,
Equality test for string and string_view to be used in containers.
Definition String.h:281
Hash for string and string_view to be used in hashing containers.
Definition String.h:254
CVE -> upstream SHA mapping.
◆ ShaCveMapTy
Initial value: std::unordered_map<std::string, std::string,
Upstream SHA -> CVE mapping.
◆ CveShaMap()
| SlCVEs::CveShaMap::CveShaMap |
( |
const std::filesystem::path & | vsource = {}, |
|
|
ShaSize | shaSize = ShaSize::Long, |
|
|
const std::string & | branch = "origin/master", |
|
|
unsigned | year = 0, |
|
|
bool | rejected = false ) |
Create a new CveShaMap.
- Parameters
-
| vsource | Path to the vulns git repository |
| shaSize | Long or Short |
| branch | Branch of vsource to walk |
| year | A specific year to walk or zero |
| rejected | Walk published/ or rejected/ |
◆ getAllCves()
| std::set< std::string > SlCVEs::CveShaMap::getAllCves |
( |
| ) |
const |
|
inline |
Get all stored CVE numbers.
- Returns
- Set of CVE numbers
◆ getCve()
| std::string_view SlCVEs::CveShaMap::getCve |
( |
std::string_view | shaCommit | ) |
const |
|
inline |
Get CVE number for shaCommit.
- Parameters
-
- Returns
- CVE number
◆ getShas()
| std::vector< std::string > SlCVEs::CveShaMap::getShas |
( |
std::string_view | cveNumber | ) |
const |
|
inline |
Get SHAs for cveNumber.
- Parameters
-
- Returns
- Vector of upstream SHAs (possibly empty)
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/slhelpers-20260812.7f9c207-build/slhelpers-20260812.7f9c207/include/cves/CveShaMap.h