feat(detector): add known exploited vulnerabilities (#1331)
* feat(kevuln): add known exploited vulnerabilities * chore: transfer repository owner * feat: show CISA on top of CERT * chore: rename var * chore: rename var * chore: fix review * chore: fix message
This commit is contained in:
		@@ -248,7 +248,7 @@ func (cnf *GostConf) Init() {
 | 
			
		||||
	cnf.DebugSQL = Conf.DebugSQL
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MetasploitConf is gost go-metasploitdb
 | 
			
		||||
// MetasploitConf is go-msfdb config
 | 
			
		||||
type MetasploitConf struct {
 | 
			
		||||
	VulnDict
 | 
			
		||||
}
 | 
			
		||||
@@ -274,3 +274,30 @@ func (cnf *MetasploitConf) Init() {
 | 
			
		||||
	cnf.setDefault("go-msfdb.sqlite3")
 | 
			
		||||
	cnf.DebugSQL = Conf.DebugSQL
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// KEVulnConf is go-kev config
 | 
			
		||||
type KEVulnConf struct {
 | 
			
		||||
	VulnDict
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const kevulnDBType = "KEVULN_TYPE"
 | 
			
		||||
const kevulnDBURL = "KEVULN_URL"
 | 
			
		||||
const kevulnDBPATH = "KEVULN_SQLITE3_PATH"
 | 
			
		||||
 | 
			
		||||
// Init set options with the following priority.
 | 
			
		||||
// 1. Environment variable
 | 
			
		||||
// 2. config.toml
 | 
			
		||||
func (cnf *KEVulnConf) Init() {
 | 
			
		||||
	cnf.Name = "kevuln"
 | 
			
		||||
	if os.Getenv(kevulnDBType) != "" {
 | 
			
		||||
		cnf.Type = os.Getenv(kevulnDBType)
 | 
			
		||||
	}
 | 
			
		||||
	if os.Getenv(kevulnDBURL) != "" {
 | 
			
		||||
		cnf.URL = os.Getenv(kevulnDBURL)
 | 
			
		||||
	}
 | 
			
		||||
	if os.Getenv(kevulnDBPATH) != "" {
 | 
			
		||||
		cnf.SQLite3Path = os.Getenv(kevulnDBPATH)
 | 
			
		||||
	}
 | 
			
		||||
	cnf.setDefault("go-kev.sqlite3")
 | 
			
		||||
	cnf.DebugSQL = Conf.DebugSQL
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user