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

Example or documentation on how to use it via an API #106

Open
drupol opened this issue Feb 8, 2024 · 4 comments
Open

Example or documentation on how to use it via an API #106

drupol opened this issue Feb 8, 2024 · 4 comments

Comments

@drupol
Copy link

drupol commented Feb 8, 2024

Hello,

I'm currently investigating how I could potentially embed SBOMs in OCI containers made with Nix.
I would like to use this project which seems quite mature, but I wish I could use it through a Nix API, it would make sense to use it through it when building the container.

I have opened an issue at https://discourse.nixos.org/t/generate-sbom-from-oci-container-made-with-nix/39430, and I'm currently able to do what I want, but I wish I could also evaluate the use of this project too.

Thanks for shedding some lights on this!

@drupol drupol changed the title Example on how to use it via an API Example or documentation on how to use it via an API Feb 8, 2024
@henrirosten
Copy link
Collaborator

Thanks, this is a valid reguest. I'll look into this as soon as possible.

@drupol
Copy link
Author

drupol commented Feb 9, 2024

Cool looking forward to it !!!

@henrirosten
Copy link
Collaborator

@drupol: Sorry for the delay in response.

Re-visiting the discussion here: https://discourse.nixos.org/t/generate-sbom-from-oci-container-made-with-nix/39430/14
I believe what you are trying to do cannot be done with sbomnix since it uses nix-store internally, and using nix-store
inside nix-build (in runCommand) will not work due to nix build sandbox.

Changing sbomnix so that it could be used during buildtime would require a major refactor.

If you (or anyone else reading this) have ideas how to workaround this limitation we certainly appreciate any suggestions or contributions.

@drupol
Copy link
Author

drupol commented Mar 18, 2024

So sad, thanks for the clear explanation.

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