trufflesecurity / trufflehog

Find, verify, and analyze leaked credentials
https://trufflesecurity.com
GNU Affero General Public License v3.0
15.83k stars 1.65k forks source link

Scan docker image config metadata #3247

Open AlfredBerg opened 1 month ago

AlfredBerg commented 1 month ago

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:

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.