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

Utilize --source-name and --source-version in syft #346

Open
nettrino opened this issue Jun 17, 2024 · 1 comment
Open

Utilize --source-name and --source-version in syft #346

nettrino opened this issue Jun 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@nettrino
Copy link
Contributor

nettrino commented Jun 17, 2024

Description

Syft offers the following two flags which could be useful for populating metadata on how an SBOM was generated

      --source-name string                        set the name of the target being analyzed
      --source-version string                     set the version of the target being analyzed

When running syft without the above flags, a warning is emitted:

[0000]  WARN no explicit name and version provided for directory source, deriving artifact ID from the given path (which is not ideal)

It seems the flags are not really critical, but they append respective entires under "name" and "version " in the metadata>component section of the SBOM. For instance, without passing --source-name, the component name is a file path, whereas with --source-name it is whatever we pass.

Chalk could make use of that to keep the git remote uri and hash in version potentially, so as to know both the on-host path where the command run, as well as have an authoritative entry for the exact version of the repo (with whatever additional metadata we possibly could care about, like the chalk METADATA_ID, stored directly inside the SBOM).

@nettrino nettrino added the enhancement New feature or request label Jun 17, 2024
@miki725
Copy link
Contributor

miki725 commented Jun 20, 2024

sounds like a good idea although will require exposing external tools con4m functions to be able to access already collected metadata

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
None yet
Development

No branches or pull requests

2 participants