feat : scan with image digest (#939)
This commit is contained in:
@@ -1091,6 +1091,7 @@ type WordPressConf struct {
|
||||
type Image struct {
|
||||
Name string `json:"name"`
|
||||
Tag string `json:"tag"`
|
||||
Digest string `json:"digest"`
|
||||
DockerOption types.DockerOption `json:"dockerOption,omitempty"`
|
||||
Cpes []string `json:"cpes,omitempty"`
|
||||
OwaspDCXMLPath string `json:"owaspDCXMLPath"`
|
||||
@@ -1098,6 +1099,13 @@ type Image struct {
|
||||
IgnoreCves []string `json:"ignoreCves,omitempty"`
|
||||
}
|
||||
|
||||
func (i *Image) GetFullName() string {
|
||||
if i.Digest != "" {
|
||||
return i.Name + "@" + i.Digest
|
||||
}
|
||||
return i.Name + ":" + i.Tag
|
||||
}
|
||||
|
||||
// GitHubConf is used for GitHub integration
|
||||
type GitHubConf struct {
|
||||
Token string `json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user