-
Notifications
You must be signed in to change notification settings - Fork 103
add code for attaching sbom #336
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Rizul Gupta <[email protected]>
Signed-off-by: Rizul Gupta <[email protected]>
Collaborator
Author
|
@bupd can you review this once ? |
bupd
requested changes
Mar 15, 2025
Collaborator
bupd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was testing this. But getting the below error.
│ ✔ Container.from(address: "anchore/syft:v1.9.0"): Container! 3.5s
│ ✔ .withMountedDirectory(
│ │ │ path: "/src"
│ │ │ source: no(digest: "sha256:9238d928642f223db27e5a22ffc3a5760ea5cf8584c419da5587bf78643dc8ce"): Missing
│ │ ): Container! 0.0s
│ ✔ .withWorkdir(path: "/src"): Container! 0.0s
│ ✘ .withExec(args: ["syft", "packages", "go.mod", "-o", "spdx-json"]): Container! 0.6s
│ ┃ panic: exec: "syft": executable file not found in $PATH
│ ┃
│ ┃ goroutine 1 [running]:
│ ┃ main.main()
│ ┃ /app/cmd/init/main.go:115 +0x906
│ ! process "syft packages go.mod -o spdx-json" did not complete successfully: exit code: 2
│ ✘ .stdout: String! 3.6s
│ ! process "syft packages go.mod -o spdx-json" did not complete successfully: exit code: 2
│ │ ✔ remotes.docker.resolver.HTTPRequest 0.3s
│ │ ✔ remotes.docker.resolver.HTTPRequest 0.6s
│ │ ✔ remotes.docker.resolver.HTTPRequest 0.8s
│ │ ✔ remotes.docker.resolver.HTTPRequest 2.2s
│ │ ✔ remotes.docker.resolver.HTTPRequest 0.9s
│ │ ✔ remotes.docker.resolver.HTTPRequest 0.9s
Error logs:
✘ .publishImageAndSign(
│ │ imageTags: ["sbom"]
│ │ registry: "demo.goharbor.io"
│ │ registryPassword: ✔ secret(uri: "env://REGPASS"): Secret! 0.0s
│ │ registryUsername: "harbor-cli"
│ ): String! 28.7s
🛠️ Building with Dagger...
provided tags: [sbom]
Published image address: demo.goharbor.io/harbor-cli/harbor-cli:sbom@sha256:b214d890869725166c15f2b06aa00f3e0e05887f73a8e8b4f56131c5fb522067
! process "syft packages go.mod -o spdx-json" did not complete successfully: exit code: 2
✘ .withExec(args: ["git", "rev-parse", "--short", "HEAD", "--always"]): Container! 0.3s
fatal: not a git repository: /home/bupd/s/code/OSS/harbor-cli/worktrees/pr
! process "git rev-parse --short HEAD --always" did not complete successfully: exit code: 128
✘ .withExec(args: ["syft", "packages", "go.mod", "-o", "spdx-json"]): Container! 0.6s
panic: exec: "syft": executable file not found in $PATH
goroutine 1 [running]:
main.main()
/app/cmd/init/main.go:115 +0x906
! process "syft packages go.mod -o spdx-json" did not complete successfully: exit code: 2
Setup tracing at https://dagger.cloud/traces/setup. To hide set DAGGER_NO_NAG=1
A new release of dagger is available: v0.15.4 → v0.16.3
To upgrade, see https://docs.dagger.io/install
https://github.com/dagger/dagger/releases/tag/v0.16.3
Collaborator
Author
|
Oh I will check it once what is the issue. Sorry for that |
Member
|
@rizul2108 can you rebase your changes on top of main... |
Collaborator
|
closing in favor of #491 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Support for Attaching SBOM to Artifacts
Description
This pull request introduces functionality to attach a Software Bill of Materials (SBOM) to artifacts.
By incorporating SBOMs, users can enhance the security and transparency of their artifacts by providing detailed metadata about their contents.
Key Changes
go.modfile instead of the binary, asgo.modincludes all license information, whereas the binary does not.Related Issue
This PR addresses issue #229, highlighting the need for improved artifact metadata management.