Skip to content

Question: Feasibility of using "oc image extract --preserve-ownership=true" to pull and unpack images for check-payload scans? #311

@zxiong

Description

@zxiong

Is it feasible to use oc image extract --preserve-ownership=true to pull and unpack an image for check-payload scans? We’ve observed that oc image extract is faster than skopeo copy + umoci raw unpack --rootless --image, reducing pull and unpack time by approximately 20–30% for large images.

I compared the unpacked directories produced by both approaches. The only differences observed are in file ownership and group, for example:

$ rsync -avnc --delete --itemize-changes unpacked-dir1 unpacked-dir2

.d....o.... opt/app-root/
.L....o.... opt/app-root/lib64 -> lib
.f....o.... opt/app-root/pyvenv.cfg
.d....o.... opt/app-root/bin/
.f....o.... opt/app-root/bin/Activate.ps1
.f....o.... opt/app-root/bin/activate
.f....o.... opt/app-root/bin/activate.csh
.f....o.... opt/app-root/bin/activate.fish
...

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