Documentation
¶
Index ¶
- Variables
- func DB() (*sql.DB, error)
- func IPIntelSearch(indexName, country, asn, cidr, countryCode, hostname, id string) ([]IPEntry, *Stats, error)
- func ImportIndex(filePath string, indexDir string, progressCallback func(int)) error
- func MetaByCVE(cve string) (*sdk.IndexVulncheckNvd2Response, error)
- func PURLSearch(indexName string, instance packageurl.PackageURL) ([]PurlEntry, *Stats, error)
- type Column
- type IPEntry
- type PurlEntry
- type Schema
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var Schemas = []Schema{ { Fallback: true, Name: "fallback", Indices: []string{}, Columns: []Column{ {Name: "data", Type: "TEXT", Index: true, NotNull: true, IsJSON: true}, }, }, { Indices: []string{"vulncheck-nvd2"}, Name: "nvd", Results: true, Columns: []Column{ {Name: "id", Type: "TEXT", Index: true, NotNull: true}, {Name: "published", Type: "TEXT", Index: false, NotNull: false, IsJSON: false}, {Name: "vulncheckKEVExploitAdd", Type: "TEXT", Index: false, NotNull: false, IsJSON: false}, {Name: "metrics", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "weaknesses", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "description", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, }, }, { Indices: []string{"ipintel-3d", "ipintel-10d", "ipintel-30d"}, Name: "ipintel", Columns: []Column{ {Name: "ip", Type: "TEXT", Index: true, NotNull: true}, {Name: "country", Type: "TEXT", Index: true, NotNull: true}, {Name: "asn", Type: "TEXT", Index: true, NotNull: true}, {Name: "country_code", Type: "TEXT", Index: true, NotNull: true}, {Name: "hostnames", Type: "TEXT", Index: true, NotNull: false, IsJSON: true}, {Name: "type", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "port", Type: "INTEGER", Index: false, NotNull: true}, {Name: "ssl", Type: "BOOLEAN", Index: false, NotNull: true}, {Name: "lastSeen", Type: "TEXT", Index: false, NotNull: true}, {Name: "city", Type: "TEXT", Index: false, NotNull: false}, {Name: "cve", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "matches", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "type_kind", Type: "TEXT", Index: false, NotNull: false}, {Name: "type_finding", Type: "TEXT", Index: false, NotNull: false}, {Name: "feed_ids", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, }, }, { Name: "purl PM", Indices: []string{ "cargo", "golang", "cocoapods", "hex", "npm", "gem", "pypi", "maven", "nuget", "composer", "hackage", "cran", "pub", "conan", "swift", "go", "dub", "elixir", "julia", "luarocks", "opam", "r", "vcpkg", }, Columns: []Column{ {Name: "name", Type: "TEXT", Index: false, NotNull: true}, {Name: "version", Type: "TEXT", Index: false, NotNull: true}, {Name: "purl", Type: "TEXT", Index: true, NotNull: true, IsJSON: true}, {Name: "licenses", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "cves", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "vulnerabilities", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, }, }, { Name: "purl OS", Indices: []string{ "alpine-purls", "rocky-purls", "debian-purls", "ubuntu-purls", }, Columns: []Column{ {Name: "name", Type: "TEXT", Index: false, NotNull: true}, {Name: "version", Type: "TEXT", Index: false, NotNull: true}, {Name: "purl", Type: "TEXT", Index: true, NotNull: true, IsJSON: true}, {Name: "licenses", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "cves", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, {Name: "vulnerabilities", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, }, }, { Name: "cpecve", Indices: []string{"cpecve"}, Columns: []Column{ {Name: "vendor", Type: "TEXT", Index: true, NotNull: false}, {Name: "product", Type: "TEXT", Index: true, NotNull: false}, {Name: "version", Type: "TEXT", Index: true, NotNull: false}, {Name: "update", Type: "TEXT", Index: true, NotNull: false}, {Name: "edition", Type: "TEXT", Index: true, NotNull: false}, {Name: "language", Type: "TEXT", Index: true, NotNull: false}, {Name: "sw_edition", Type: "TEXT", Index: true, NotNull: false}, {Name: "target_sw", Type: "TEXT", Index: true, NotNull: false}, {Name: "target_hw", Type: "TEXT", Index: true, NotNull: false}, {Name: "other", Type: "TEXT", Index: true, NotNull: false}, {Name: "cpe23Uri", Type: "TEXT", Index: true, NotNull: false}, {Name: "cves", Type: "TEXT", Index: false, NotNull: false, IsJSON: true}, }, }, }
Functions ¶
func IPIntelSearch ¶
func ImportIndex ¶
func MetaByCVE ¶ added in v0.10.0
func MetaByCVE(cve string) (*sdk.IndexVulncheckNvd2Response, error)
func PURLSearch ¶
func PURLSearch(indexName string, instance packageurl.PackageURL) ([]PurlEntry, *Stats, error)
Types ¶
type IPEntry ¶
type IPEntry struct {
IP string `json:"ip"`
Port int `json:"port"`
SSL bool `json:"ssl"`
LastSeen string `json:"lastSeen"`
ASN string `json:"asn"`
Country string `json:"country"`
CountryCode string `json:"country_code"`
City string `json:"city"`
CVE []string `json:"cve"`
Matches []string `json:"matches"`
Hostnames []string `json:"hostnames"`
Type struct {
ID string `json:"id"`
Kind string `json:"kind"`
Finding string `json:"finding"`
} `json:"type"`
FeedIDs []string `json:"feed_ids"`
}
Click to show internal directories.
Click to hide internal directories.