Most of my containers run images somebody else built, and I rarely know what is inside. Trivy can tell me.
trivy image scans an image. By default it looks for vulnerabilities and secrets; licences and misconfigurations are off unless you ask with --scanners.
trivy image example/app:1.2
On a popular image that prints a long list, mostly low-severity entries. Two flags make it readable. --severity takes a comma-separated list from UNKNOWN, LOW, MEDIUM, HIGH and CRITICAL, and shows all five by default. --ignore-unfixed shows only vulnerabilities that already have a fix.
trivy image --severity HIGH,CRITICAL --ignore-unfixed example/app:1.2
What remains is a list you can act on: a fixed version exists, so pulling a newer image or rebuilding may help. With --exit-code 1 the command returns that exit code when it finds anything, so a script or CI job can stop on it.
A finding means the image contains a package with a known flaw. Whether your container can be attacked through it is another question, and a library the app never loads still shows up. An empty list only says nothing known turned up at that moment. I use the result to choose between two images or to decide when to update.
Further reading: Trivy: container image scanning, trivy image CLI reference