-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Scan docker image config metadata #3247
base: main
Are you sure you want to change the base?
Conversation
@@ -16,11 +16,11 @@ var ( | |||
}, | |||
[]string{"source_name"}) | |||
|
|||
dockerHistoryEntriesScanned = promauto.NewGaugeVec(prometheus.GaugeOpts{ | |||
dockerImageConfigsScanned = promauto.NewGaugeVec(prometheus.GaugeOpts{ |
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.
I don't really know if it is worth keeping this metric as in most cases it will be the same as dockerImagesScanned
Hey, sorry for letting this fall through the cracks. I'm no docker expert - does this PR preserve the existing behavior of scanning each history entry's |
Yes, it scans the whole config file that contains the Here is an example of what the nginx conf looks like from Nginx docker conf
|
Description:
This is my attempt at solving #3007
The current implementation only scans the
created_by
value in the docker image config (https://github.com/opencontainers/image-spec/blob/main/config.md). This misses e.g. the environment variables of the docker image and other fields that commonly contain secrets.The easiest way to view this metadata is by using "crane config [image]" https://github.com/google/go-containerregistry/tree/main/cmd/crane
Checklist:
make test-community
)? (fails but also fails on main without my changes)make lint
this requires golangci-lint)?