Skip to content

include package metadata in chiseled images #148

@sozercan

Description

@sozercan

custom ubuntu chiseled images doesn't seem to contain package metadata. This makes it unable to be scanned for vulnerabilities or patched with https://github.com/project-copacetic/copacetic

$ trivy image <chiseled>
...
024-07-12T16:29:43Z	WARN	No OS package is detected. Make sure you haven't deleted any files that contain information about the installed packages.
2024-07-12T16:29:43Z	WARN	e.g. files under "/lib/apk/db/", "/var/lib/dpkg/" and "/var/lib/rpm"
...

For example, Google distroless contains package information in /var/lib/dpkg/status.d/
https://oci.dag.dev/layers/gcr.io/distroless/static-debian12@sha256:e9168165836a0e692fbd161177ea950bfc17e3ec476fff726ff7c038e62e5cc8/var/lib/dpkg/status.d/

and similarly in Azure Linux in /var/lib/rpmmanifest/
https://oci.dag.dev/layers/mcr.microsoft.com/cbl-mariner/distroless/minimal@sha256:421cb3d7179891ba8ab574f6170b9b2e9e19531575446df7b5abffd4c6f2394b/var/lib/rpmmanifest/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions