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

Security vulnerabilities are not show when listing artifacts (always 0) #33

Open
jonsv322 opened this issue Dec 21, 2024 · 0 comments
Open

Comments

@jonsv322
Copy link

jonsv322 commented Dec 21, 2024

To be able to get security vulnerabilities displayed correctly the WithScanOverview need to be set to true.
See below example (no it's not the correct fix):

diff --git a/pkg/api/artifact_handler.go b/pkg/api/artifact_handler.go
index d79eba4..d1a6d88 100644
--- a/pkg/api/artifact_handler.go
+++ b/pkg/api/artifact_handler.go
@@ -62,6 +62,7 @@ func ListArtifact(projectName, repoName string, opts ...ListFlags) (artifact.Lis
        if len(opts) > 0 {
                listFlags = opts[0]
        }
+       scanOverview := true
        response, err := client.Artifact.ListArtifacts(ctx, &artifact.ListArtifactsParams{
                ProjectName:    projectName,
                RepositoryName: repoName,
@@ -69,6 +70,7 @@ func ListArtifact(projectName, repoName string, opts ...ListFlags) (artifact.Lis
                PageSize:       &listFlags.PageSize,
                Q:              &listFlags.Q,
                Sort:           &listFlags.Sort,
+               WithScanOverview: &scanOverview,
        })
        if err != nil {
                return artifact.ListArtifactsOK{}, err
@jonsv322 jonsv322 changed the title Security sulnerabilities are not show when listing artifacts (always 0) Security vulnerabilities are not show when listing artifacts (always 0) Dec 21, 2024
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

1 participant