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

Update intbitset #53

Open
criztovyl opened this issue Jan 21, 2024 · 6 comments
Open

Update intbitset #53

criztovyl opened this issue Jan 21, 2024 · 6 comments

Comments

@criztovyl
Copy link

I was looking around for a way to inspect (docker) container images on android (using termux, without root) and discovered this tool.

initially i ran into funny issues with intbitset due to python 3.11 (inveniosoftware-contrib/intbitset#81), but if you update intbitset to 3.0.2, the tool runs quite fine in termux! :)

unfortunately this tool cannot download images, but for that i used https://github.com/NotGlop/docker-drag.

@pombredanne
Copy link
Collaborator

@criztovyl Thanks! I happen to maintain https://github.com/inveniosoftware-contrib/intbitset so we can handle this easily enough.
FYI, ScanCode.io does the full processing of Docker images but requires Postgres... so may be too big to run inside Android ... but this can show you what to call in container inspector.
https://github.com/nexB/scancode.io/blob/main/scanpipe/pipelines/docker.py

Are you really trying to run "inside" an Android device?

NB: ScanCode.io does also download images from a container images registry/OCI using a bundled skopeo using this plugin https://github.com/nexB/scancode-plugins/tree/4df0cf04e1b7b6774ba6e983c7c57002f19327c9/builtins/fetchcode_container and this function https://github.com/nexB/scancode.io/blob/b10df0dbf5128f57e9dbc79d8eb5daa8f28eab7a/scanpipe/pipes/fetch.py#L214

@criztovyl
Copy link
Author

Ah "inspecting" here means "curiously look into"; I do not intend to run ScanCode.io inspections on Android. :)

I shortly considered skopeo independently, but did not further look into it. It might be a fun challenge, though.

@pombredanne
Copy link
Collaborator

re:

unfortunately this tool cannot download images, but for that i used https://github.com/NotGlop/docker-drag.

This could be a nice way too, aside from skopeo.... Unfortunately there is no license there.... I pinged @NotGlop in NotGlop/docker-drag#35

@pombredanne
Copy link
Collaborator

pombredanne commented Jan 21, 2024

Ah "inspecting" here means "curiously look into"; I do not intend to run ScanCode.io inspections on Android. :)

I shortly considered skopeo independently, but did not further look into it. It might be a fun challenge, though.

@criztovyl http://scancode.io should have a decent doc to get started.
The syntax for docker images download is docker://image:tag_or_hash as in docker://debian

Creating a project will look like this:
Screenshot 2024-01-21 at 12-38-41 ScanCode io

I reckon you you maybe looking for a CLI tool though you can also run ScanCode.io using the CLI and no UI. All the primitive functions are in this project as well as scancode-toolkit and fetchcode. scancode.io brings them together in a pipeline

@pombredanne
Copy link
Collaborator

The results look like this:
Screenshot 2024-01-21 at 12-42-43 ScanCode io docker __debian unstable-slim

and you can get various outputs and SBOMs out too

The CLI tutorials is at https://scancodeio.readthedocs.io/en/latest/tutorial_cli_analyze_docker_image.html

@pombredanne
Copy link
Collaborator

@criztovyl https://github.com/NotGlop/docker-drag now has a license added by @NotGlop in NotGlop/docker-drag#35 but this is a GPL which does not work here for use in an Apache-licensed library. We could instead integrate fetchcode_container but I still think we are better off doing this in ScanCode.io unless we have a pure python utility for here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants