Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pkg/sdk/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type IndexQueryParameters struct {
LastModEndDate string `json:"lastModEndDate"`
PubStartDate string `json:"pubStartDate"`
PubEndDate string `json:"pubEndDate"`
Date string `json:"date"`
ThreatActor string `json:"threat_actor"`
MitreId string `json:"mitre_id"`
MispId string `json:"misp_id"`
Expand All @@ -36,6 +37,8 @@ type IndexQueryParameters struct {
Jvndb string `json:"jvndb"`
SrcCountry string `json:"src_country"`
DstCountry string `json:"dst_country"`
SourceIP string `json:"src_ip"`
SourceASN string `json:"src_asn"`

// PAGINATION RELATED
Limit int `json:"limit"`
Expand Down Expand Up @@ -104,6 +107,9 @@ func setIndexQueryParameters(query url.Values, queryParameters ...IndexQueryPara
if queryParameter.PubEndDate != "" {
query.Add("pubEndDate", queryParameter.PubEndDate)
}
if queryParameter.Date != "" {
query.Add("date", queryParameter.Date)
}
if queryParameter.ThreatActor != "" {
query.Add("threat_actor", queryParameter.ThreatActor)
}
Expand Down Expand Up @@ -152,6 +158,12 @@ func setIndexQueryParameters(query url.Values, queryParameters ...IndexQueryPara
if queryParameter.DstCountry != "" {
query.Add("dst_country", queryParameter.DstCountry)
}
if queryParameter.SourceIP != "" {
query.Add("src_ip", queryParameter.SourceIP)
}
if queryParameter.SourceASN != "" {
query.Add("src_asn", queryParameter.SourceASN)
}
// PAGINATION RELATED
if queryParameter.Limit != 0 {
query.Add("limit", fmt.Sprintf("%d", queryParameter.Limit))
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,14 @@ vulncheck index browse|list <index> [flags]
| --threat_actor | string | ThreatActor |
| --updatedAtEndDate | string | UpdatedAtEndDate |
| --updatedAtStartDate | string | UpdatedAtStartDate |
| --date | string | Date |
| --src_country | string | SrcCountry |
| --dst_country | string | DstCountry |
| --src_ip | string | SrcIp |
| --src_asn | string | SrcASN |
| --help | | Show help for command |



### Download a backup

Download a backup of a specified index either interactively or retrieve a signed temporary URL
Expand Down
Loading