feat : scan with image digest (#939)

This commit is contained in:
Tomoya Amachi
2020-03-03 16:51:06 +09:00
committed by GitHub
parent fe3f1b9924
commit 9aa0d87a21
8 changed files with 83 additions and 11 deletions

View File

@@ -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:"-"`