models

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebianCVE

type DebianCVE struct {
	ID          int64
	CveID       string
	Scope       string
	Description string
	Package     []DebianPackage
}

type DebianCveJSON

type DebianCveJSON struct {
	Scope       string                       `json:"scope"`
	Debianbug   int                          `json:"debianbug"`
	Description string                       `json:"description"`
	Releases    map[string]DebianReleaseJSON `json:"releases"`
}

type DebianCveMap

type DebianCveMap map[string]DebianCveJSON

type DebianJSON

type DebianJSON map[string]DebianCveMap

type DebianPackage

type DebianPackage struct {
	ID          int64
	DebianCVEID int64 `sql:"type:bigint REFERENCES debian_cves(id)"`
	PackageName string
	Release     []DebianRelease
}

type DebianRelease

type DebianRelease struct {
	ID              int64
	DebianPackageID int64 `sql:"type:bigint REFERENCES debian_packages(id)"`
	ProductName     string
	Status          string
	FixedVersion    string
	Urgency         string
	Version         string
}

type DebianReleaseJSON

type DebianReleaseJSON struct {
	Status       string            `json:"status"`
	Repositories map[string]string `json:"repositories"`
	FixedVersion string            `json:"fixed_version"`
	Urgency      string            `json:"urgency"`
}

type RedhatAffectedRelease

type RedhatAffectedRelease struct {
	RedhatCVEID int64  `sql:"type:bigint REFERENCES redhat_cves(id)" json:",omitempty"`
	ProductName string `json:"product_name"`
	ReleaseDate string `json:"release_date"`
	Advisory    string `json:"advisory"`
	Package     string `json:"package"`
	Cpe         string `json:"cpe"`
}

type RedhatBugzilla

type RedhatBugzilla struct {
	RedhatCVEID int64  `sql:"type:bigint REFERENCES redhat_cves(id)" json:",omitempty"`
	Description string `json:"description"`
	BugzillaID  string `json:"id"`
	URL         string `json:"url"`
}

type RedhatCVE

type RedhatCVE struct {
	ID int64 `json:",omitempty"`

	// gorm can't handle embedded struct
	ThreatSeverity       string
	PublicDate           time.Time
	Bugzilla             RedhatBugzilla
	Cvss                 RedhatCvss
	Cvss3                RedhatCvss3
	Iava                 string
	Cwe                  string
	Statement            string
	Acknowledgement      string
	Mitigation           string
	AffectedRelease      []RedhatAffectedRelease
	PackageState         []RedhatPackageState
	Name                 string
	DocumentDistribution string

	Details    []RedhatDetail    `json:",omitempty"`
	References []RedhatReference `json:",omitempty"`
}

func (RedhatCVE) GetDetail

func (r RedhatCVE) GetDetail(sep string) string

func (RedhatCVE) GetPackages

func (r RedhatCVE) GetPackages(sep string) (result string)

type RedhatCVEJSON

type RedhatCVEJSON struct {
	ThreatSeverity       string         `json:"threat_severity"`
	PublicDate           string         `json:"public_date"`
	Bugzilla             RedhatBugzilla `json:"bugzilla"`
	Cvss                 RedhatCvss     `json:"cvss"`
	Cvss3                RedhatCvss3    `json:"cvss3"`
	Iava                 string         `json:"iava"`
	Cwe                  string         `json:"cwe"`
	Statement            string         `json:"statement"`
	Acknowledgement      string         `json:"acknowledgement"`
	Mitigation           string         `json:"mitigation"`
	TempAffectedRelease  interface{}    `json:"affected_release"` // affected_release is array or object
	AffectedRelease      []RedhatAffectedRelease
	TempPackageState     interface{} `json:"package_state"` // package_state is array or object
	PackageState         []RedhatPackageState
	Name                 string `json:"name"`
	DocumentDistribution string `json:"document_distribution"`

	Details    []string `json:"details" gorm:"-"`
	References []string `json:"references" gorm:"-"`
}

type RedhatCVEJSONAffectedReleaseArray

type RedhatCVEJSONAffectedReleaseArray struct {
	AffectedRelease []RedhatAffectedRelease `json:"affected_release"`
}

type RedhatCVEJSONAffectedReleaseObject

type RedhatCVEJSONAffectedReleaseObject struct {
	AffectedRelease RedhatAffectedRelease `json:"affected_release"`
}

type RedhatCVEJSONPackageStateArray

type RedhatCVEJSONPackageStateArray struct {
	PackageState []RedhatPackageState `json:"package_state"`
}

type RedhatCVEJSONPackageStateObject

type RedhatCVEJSONPackageStateObject struct {
	PackageState RedhatPackageState `json:"package_state"`
}

type RedhatCvss

type RedhatCvss struct {
	RedhatCVEID       int64  `sql:"type:bigint REFERENCES redhat_cves(id)" json:",omitempty"`
	CvssBaseScore     string `json:"cvss_base_score"`
	CvssScoringVector string `json:"cvss_scoring_vector"`
	Status            string `json:"status"`
}

type RedhatCvss3

type RedhatCvss3 struct {
	RedhatCVEID        int64  `sql:"type:bigint REFERENCES redhat_cves(id)" json:",omitempty"`
	Cvss3BaseScore     string `json:"cvss3_base_score"`
	Cvss3ScoringVector string `json:"cvss3_scoring_vector"`
	Status             string `json:"status"`
}

type RedhatDetail

type RedhatDetail struct {
	RedhatCVEID int64 `sql:"type:bigint REFERENCES redhat_cves(id)" json:",omitempty"`
	Detail      string
}

type RedhatEntry

type RedhatEntry struct {
	CveID             string        `json:"CVE"`
	Severity          string        `json:"severity"`
	PublicDate        time.Time     `json:"public_date"`
	Advisories        []interface{} `json:"advisories"`
	Bugzilla          string        `json:"bugzilla"`
	CvssScore         interface{}   `json:"cvss_score"`
	CvssScoringVector interface{}   `json:"cvss_scoring_vector"`
	CWE               string        `json:"CWE"`
	AffectedPackages  []interface{} `json:"affected_packages"`
	ResourceURL       string        `json:"resource_url"`
	Cvss3Score        float64       `json:"cvss3_score"`
}

type RedhatPackageState

type RedhatPackageState struct {
	RedhatCVEID int64  `sql:"type:bigint REFERENCES redhat_cves(id)" json:",omitempty"`
	ProductName string `json:"product_name"`
	FixState    string `json:"fix_state"`
	PackageName string `json:"package_name"`
	Cpe         string `json:"cpe"`
}

type RedhatReference

type RedhatReference struct {
	RedhatCVEID int64 `sql:"type:bigint REFERENCES redhat_cves(id)" json:",omitempty"`
	Reference   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL