1package scan 2 3import ( 4 "github.com/future-architect/vuls/config" 5 "github.com/future-architect/vuls/models" 6 "github.com/future-architect/vuls/util" 7) 8 9// inherit OsTypeInterface 10type pseudo struct { 11 base 12} 13 14func detectPseudo(c config.ServerInfo) (itsMe bool, pseudo osTypeInterface, err error) { 15 p := newPseudo(c) 16 p.setDistro(config.ServerTypePseudo, "") 17 return c.Type == config.ServerTypePseudo, p, nil 18} 19 20func newPseudo(c config.ServerInfo) *pseudo { 21 d := &pseudo{ 22 base: base{ 23 osPackages: osPackages{ 24 Packages: models.Packages{}, 25 VulnInfos: models.VulnInfos{}, 26 }, 27 }, 28 } 29 d.log = util.NewCustomLogger(c) 30 d.setServerInfo(c) 31 return d 32} 33 34func (o *pseudo) checkScanMode() error { 35 return nil 36} 37 38func (o *pseudo) checkIfSudoNoPasswd() error { 39 return nil 40} 41 42func (o *pseudo) checkDeps() error { 43 return nil 44} 45 46func (o *pseudo) preCure() error { 47 return nil 48} 49 50func (o *pseudo) postScan() error { 51 return nil 52} 53 54func (o *pseudo) scanPackages() error { 55 return nil 56} 57 58func (o *pseudo) parseInstalledPackages(string) (models.Packages, models.SrcPackages, error) { 59 return nil, nil, nil 60} 61 62func (o *pseudo) detectPlatform() { 63 o.setPlatform(models.Platform{Name: "other"}) 64 return 65} 66