From 54cc3dc335de3b7905b085ca50d2cddedc186eec Mon Sep 17 00:00:00 2001 From: tanner Date: Mon, 23 Mar 2026 14:13:20 -0400 Subject: [PATCH 1/2] Add date and source IP parameters to index query --- pkg/sdk/index.go | 8 ++++++++ readme.md | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg/sdk/index.go b/pkg/sdk/index.go index f0961cc..079ea45 100644 --- a/pkg/sdk/index.go +++ b/pkg/sdk/index.go @@ -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"` @@ -36,6 +37,7 @@ type IndexQueryParameters struct { Jvndb string `json:"jvndb"` SrcCountry string `json:"src_country"` DstCountry string `json:"dst_country"` + SourceIP string `json:"src_ip"` // PAGINATION RELATED Limit int `json:"limit"` @@ -104,6 +106,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) } @@ -152,6 +157,9 @@ 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) + } // PAGINATION RELATED if queryParameter.Limit != 0 { query.Add("limit", fmt.Sprintf("%d", queryParameter.Limit)) diff --git a/readme.md b/readme.md index eaae7d7..18552a7 100644 --- a/readme.md +++ b/readme.md @@ -134,12 +134,13 @@ vulncheck index browse|list [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 | | --help | | Show help for command | - ### Download a backup Download a backup of a specified index either interactively or retrieve a signed temporary URL From 4a10064d8a6f3e24d66d964e2baa4398bc7a8ecf Mon Sep 17 00:00:00 2001 From: tanner Date: Wed, 1 Apr 2026 10:48:45 -0400 Subject: [PATCH 2/2] Add Source ASN parameter to index query and update README --- pkg/sdk/index.go | 4 ++++ readme.md | 1 + 2 files changed, 5 insertions(+) diff --git a/pkg/sdk/index.go b/pkg/sdk/index.go index 079ea45..3e27b7c 100644 --- a/pkg/sdk/index.go +++ b/pkg/sdk/index.go @@ -38,6 +38,7 @@ type IndexQueryParameters struct { 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"` @@ -160,6 +161,9 @@ func setIndexQueryParameters(query url.Values, queryParameters ...IndexQueryPara 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)) diff --git a/readme.md b/readme.md index 18552a7..563a7c4 100644 --- a/readme.md +++ b/readme.md @@ -138,6 +138,7 @@ vulncheck index browse|list [flags] | --src_country | string | SrcCountry | | --dst_country | string | DstCountry | | --src_ip | string | SrcIp | +| --src_asn | string | SrcASN | | --help | | Show help for command |