2020-06-24 12:38:42 -07:00
|
|
|
// Package cveinfo ...
|
|
|
|
package cveinfo
|
|
|
|
|
|
|
|
import (
|
2022-01-19 17:57:10 +02:00
|
|
|
v1 "github.com/google/go-containerregistry/pkg/v1"
|
|
|
|
"github.com/opencontainers/go-digest"
|
2021-10-04 14:27:26 -07:00
|
|
|
"github.com/urfave/cli/v2"
|
2021-12-04 03:50:58 +00:00
|
|
|
"zotregistry.io/zot/pkg/extensions/search/common"
|
|
|
|
"zotregistry.io/zot/pkg/log"
|
|
|
|
"zotregistry.io/zot/pkg/storage"
|
2020-06-24 12:38:42 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
// CveInfo ...
|
|
|
|
type CveInfo struct {
|
2021-04-05 17:40:33 -07:00
|
|
|
Log log.Logger
|
|
|
|
CveTrivyController CveTrivyController
|
|
|
|
StoreController storage.StoreController
|
2022-07-12 15:58:04 +03:00
|
|
|
LayoutUtils *common.BaseOciLayoutUtils
|
2021-04-05 17:40:33 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type CveTrivyController struct {
|
2021-10-04 14:27:26 -07:00
|
|
|
DefaultCveConfig *TrivyCtx
|
|
|
|
SubCveConfig map[string]*TrivyCtx
|
|
|
|
}
|
2021-12-13 19:23:31 +00:00
|
|
|
|
2021-10-04 14:27:26 -07:00
|
|
|
type TrivyCtx struct {
|
|
|
|
Input string
|
|
|
|
Ctx *cli.Context
|
2020-06-24 12:38:42 -07:00
|
|
|
}
|
2022-01-19 17:57:10 +02:00
|
|
|
|
|
|
|
type ImageInfoByCVE struct {
|
|
|
|
Tag string
|
|
|
|
Digest digest.Digest
|
|
|
|
Manifest v1.Manifest
|
|
|
|
}
|