|
SlHelpers
|
A map between CVE numbers and upstream SHAs. More...
#include <CveShaMap.h>
Public Types | |
| enum struct | ShaSize { Long , Short } |
| Store Long or Short SHAs. | |
| using | CveShaMapTy |
| CVE -> upstream SHA mapping. | |
| using | ShaCveMapTy |
| Upstream SHA -> CVE mapping. | |
Public Member Functions | |
| 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.
CVE -> upstream SHA mapping.
Upstream SHA -> CVE mapping.
| 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.
| 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/ |
|
inline |
|
inline |
|
inline |
Get SHAs for cveNumber.
| cveNumber | CVE number |