A map between CVE numbers and upstream SHAs.
More...
#include <CVEHashMap.h>
|
| enum | ShaSize { Long,
Short
} |
| | Store Long or Short SHAs.
|
| |
|
using | CVEHashMapTy = std::unordered_multimap< std::string, std::string > |
| | CVE -> upstream SHA mapping.
|
| |
|
using | SHAHashMapTy = std::unordered_map< std::string, std::string > |
| | Upstream SHA -> CVE mapping.
|
| |
|
| std::string | get_cve (const std::string &sha_commit) const |
| | Get CVE number for sha_commit. More...
|
| |
| std::vector< std::string > | get_shas (const std::string &cve_number) const |
| | Get SHAs for cve_number. More...
|
| |
| std::set< std::string > | get_all_cves () const |
| | Get all stored CVE numbers. More...
|
| |
A map between CVE numbers and upstream SHAs.
◆ create()
| static std::optional<CVEHashMap> SlCVEs::CVEHashMap::create |
( |
const std::filesystem::path & |
vsource, |
|
|
ShaSize |
shaSize, |
|
|
const std::string & |
branch, |
|
|
unsigned |
year, |
|
|
bool |
rejected |
|
) |
| |
|
static |
Create a new CVEHashMap.
- 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/ |
- Returns
- CVEHashMap or nullopt on failure
◆ get_all_cves()
| std::set<std::string> SlCVEs::CVEHashMap::get_all_cves |
( |
| ) |
const |
|
inline |
Get all stored CVE numbers.
- Returns
- Set of CVE numbers
◆ get_cve()
| std::string SlCVEs::CVEHashMap::get_cve |
( |
const std::string & |
sha_commit | ) |
const |
|
inline |
Get CVE number for sha_commit.
- Parameters
-
- Returns
- CVE number
◆ get_shas()
| std::vector<std::string> SlCVEs::CVEHashMap::get_shas |
( |
const std::string & |
cve_number | ) |
const |
|
inline |
Get SHAs for cve_number.
- Parameters
-
- Returns
- Vector of upstream SHAs (possibly empty)
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/slhelpers-20260428.f233ce9/include/cves/CVEHashMap.h