Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to read (tar) stream from stdin #2312

Open
deitch opened this issue Nov 9, 2023 · 3 comments
Open

Ability to read (tar) stream from stdin #2312

deitch opened this issue Nov 9, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@deitch
Copy link
Contributor

deitch commented Nov 9, 2023

What would you like to be added:

Syft is able to scan directory, as well as a tar file as if it were a directory, so I can do syft packages path/to/file.tar.

It would be helpful if it could read that from stdin:

cat file.tar | syft packages -

Why is this needed:

There are two use cases I have come across:

  1. Downloading a very large tar from network
  2. Docker container wherein mounting the dir might not work

Thanks!

@deitch deitch added the enhancement New feature or request label Nov 9, 2023
@tgerla
Copy link
Contributor

tgerla commented Nov 9, 2023

Thanks @deitch, we will put this in the backlog for the future. If you're interested in working on it, please let us know and we can help get you started.

@tgerla tgerla moved this to Backlog in OSS Nov 9, 2023
@elifarley
Copy link

I would expect that the script below would work, but it doesn't:

mkfifo /tmp/image.tar
skopeo >/dev/null 2>&1 copy docker://alpine:latest docker-archive:/tmp/image.tar &
syft -o cyclonedx-json packages docker-archive:/tmp/image.tar

Apparently, Syft needs to seek back in the file, which doesn't work on a named pipe.

@popey
Copy link
Contributor

popey commented Sep 26, 2024

Duplicate of #569

@popey popey marked this as a duplicate of #569 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

4 participants