diff options
author | Paul Duncan <pabs@pablotron.org> | 2022-02-04 00:01:14 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2022-02-04 00:01:14 -0500 |
commit | bcc1a56f57aee10fc79a14084f425cdab8b0325b (patch) | |
tree | a8e00cd50f8be0a044ae9c80e1a98092aaae65c8 /internal/cpematch/cpematch.go | |
parent | c98ce3189a3171f0594075fe17cc86a40760bee2 (diff) | |
download | cvez-bcc1a56f57aee10fc79a14084f425cdab8b0325b.tar.bz2 cvez-bcc1a56f57aee10fc79a14084f425cdab8b0325b.zip |
add internal/cpematch
Diffstat (limited to 'internal/cpematch/cpematch.go')
-rw-r--r-- | internal/cpematch/cpematch.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/cpematch/cpematch.go b/internal/cpematch/cpematch.go new file mode 100644 index 0000000..9f879c6 --- /dev/null +++ b/internal/cpematch/cpematch.go @@ -0,0 +1,25 @@ +// CPE match feed 1.0 parser. +package cpematch + +// CPE name +type Name struct { + Cpe22Uri string `json:"cpe22Uri"` + Cpe23Uri string `json:"cpe23Uri"` +} + +// CPE match string or range +type Match struct { + Vulnerable *bool `json:"vulnerable"` + Cpe22Uri string `json:"cpe22Uri"` + Cpe23Uri string `json:"cpe23Uri"` + VersionStartExcluding string `json:"versionStartExcluding"` + VersionStartIncluding string `json:"versionStartIncluding"` + VersionEndExcluding string `json:"versionEndExcluding"` + VersionEndIncluding string `json:"versionEndIncluding"` + Names []Name `json:"cpe_name"` // CPE match strings +} + +// CPE matches +type Matches struct { + Matches []Match `json:"matches"` // Array of CPE matches +} |