-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(image): save layers metadata into report #8394
base: main
Are you sure you want to change the base?
Conversation
pkg/scanner/scan.go
Outdated
@@ -140,7 +141,7 @@ type Scanner struct { | |||
// Driver defines operations of scanner | |||
type Driver interface { | |||
Scan(ctx context.Context, target, artifactKey string, blobKeys []string, options types.ScanOptions) ( | |||
results types.Results, osFound ftypes.OS, err error) | |||
results types.Results, osFound ftypes.OS, layersMetadata ftypes.LayersMetadata, err error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if returning a new struct like ScanReponse
or types.Report
? IIUC, it will not break compatibility unless we change the protobuf interfaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added scanResponse - 945ddc3
pkg/types/report.go
Outdated
RepoTags []string `json:",omitempty"` | ||
RepoDigests []string `json:",omitempty"` | ||
ImageConfig v1.ConfigFile `json:",omitempty"` | ||
LayersMetadata ftypes.LayersMetadata `json:",omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It belongs to Metadata
. Layers
is descriptive enough for me.
LayersMetadata ftypes.LayersMetadata `json:",omitempty"` | |
Layers ftypes.LayersMetadata `json:",omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in fb65b08
Description
We added
--max-image-size
flag.But we decided to go further and provide users with information about the image layers.
Changes:
Related PRs
Checklist