Skip to content

Access rootful containers storage #515

@p5

Description

@p5

What would you like to be added:

As a follow-up to the discussion around UBlue images and SBOM scanning from the livestream earlier today, I'd like to propose an additional input parameter to the action which runs syft as a rootful user, giving it access to resources only accessible to root.

After some debugging,

Something as simple as

- uses: anchore/sbom-action@v0
  with:
    image: my-registry.com/my/image
    rootful: true

This could even be more intelligent - "if the rootful Podman socket is detected, check if the image is present". That way, we don't need to add any new input parameters to the action.

Why is this needed:

Sometimes it's useful to run Podman builds as a rootful user (i.e. with sudo), which stores images in a different location to when it's ran with non-root users. Currently the sbom-action runs Syft as the regular GitHub Actions user, so Syft cannot reach out to the rootful container storage required when Podman is ran as sudo.

When building images with Docker, this is not an issue since the same storage is used for root and rootless users by default.

Additional context:
I'm happy to look into implementing this feature request if the Anchore team is okay with the suggestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions