* change: never refer to ChangeLog
* change raspberry pi os use debian oval at report
* change do not use r.Family
* change gost do not use r.Family
* change use r.Family because family has a large impact
* change replace MaineK00n/goval-dictionary@raspberrypi-oval
* note Raspbian Scan Policy
* add Raspbian Changelog support policy
* change grep Package for Raspbian at fast-scan mode
* add changelog preprocessing for Raspbian
* add take note of TODO
* change Changelog fetch part to function
* change error handling
* change solve one TODO
* change make ChangelogDir once
* add comment
* fix oval support Amazon Linux :refs #824
* change to useScannedCves from ovalSupproted
* change confidence for Raspbian
* change skip package for raspbian in OVAL DB
* change separate raspbian implementation from util
* change error, log format
* change print format
* change log format(delete newline)
* change support changelog.(Debian.)gz
* Revert "change support changelog.(Debian.)gz"
This reverts commit 2265a72c67.
* change test chnage.(Debian.)gz
* change support raspbian package(*raspberry*)
* change error format
* fix regexp pattern
* fix typo
* fix changelog cache
* change rename function name
* add TestParseChangelog
* change changelog lenient match for raspbian
* fix test case
* change clog dir support symbolic link, clog save dir name append suffix
* change remove more package for raspberry pi
* fix error handling
* change module update
* change refactoring around identifying raspbian package
* update go module
* update scan image
* update scan image
* change clarify scan mode
* change raspiPackNamePattern and add test case
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			816 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			816 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package gost
 | 
						|
 | 
						|
import (
 | 
						|
	cnf "github.com/future-architect/vuls/config"
 | 
						|
	"github.com/future-architect/vuls/models"
 | 
						|
	"github.com/knqyf263/gost/db"
 | 
						|
)
 | 
						|
 | 
						|
// Client is the interface of OVAL client.
 | 
						|
type Client interface {
 | 
						|
	DetectUnfixed(db.DB, *models.ScanResult, bool) (int, error)
 | 
						|
	FillCVEsWithRedHat(db.DB, *models.ScanResult) error
 | 
						|
 | 
						|
	//TODO implement
 | 
						|
	// CheckHTTPHealth() error
 | 
						|
	// CheckIfGostFetched checks if Gost entries are fetched
 | 
						|
	// CheckIfGostFetched(db.DB, string, string) (bool, error)
 | 
						|
	// CheckIfGostFresh(db.DB, string, string) (bool, error)
 | 
						|
}
 | 
						|
 | 
						|
// NewClient make Client by family
 | 
						|
func NewClient(family string) Client {
 | 
						|
	switch family {
 | 
						|
	case cnf.RedHat, cnf.CentOS:
 | 
						|
		return RedHat{}
 | 
						|
	case cnf.Debian, cnf.Raspbian:
 | 
						|
		return Debian{}
 | 
						|
	case cnf.Windows:
 | 
						|
		return Microsoft{}
 | 
						|
	default:
 | 
						|
		return Pseudo{}
 | 
						|
	}
 | 
						|
}
 |