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

expose hasSBOM and hasSLSA IDs #2076

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/assembler/clients/helpers/bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
)

type AssemblerIngestedIDs struct {
hasSBOMIDs []string
hasSLSAIDs []string
HasSBOMIDs []string
HasSLSAIDs []string
}

func GetBulkAssembler(ctx context.Context, logger *zap.SugaredLogger, gqlclient graphql.Client) func([]assembler.AssemblerInput) (*AssemblerIngestedIDs, error) {
Expand Down Expand Up @@ -606,7 +606,7 @@ func ingestHasSLSAs(ctx context.Context, client graphql.Client, hs []assembler.H
if err != nil {
return fmt.Errorf("SLSAForArtifacts failed with error: %w", err)
}
ingestedIDs.hasSLSAIDs = append(ingestedIDs.hasSLSAIDs, hasSLSAArtResponse.IngestSLSAs...)
ingestedIDs.HasSLSAIDs = append(ingestedIDs.HasSLSAIDs, hasSLSAArtResponse.IngestSLSAs...)
}
return nil
}
Expand Down Expand Up @@ -757,14 +757,14 @@ func ingestHasSBOMs(ctx context.Context, client graphql.Client, hs []assembler.H
if err != nil {
return fmt.Errorf("hasSBOMArtifacts failed with error: %w", err)
}
ingestedIDs.hasSBOMIDs = append(ingestedIDs.hasSBOMIDs, hasSBOMArtResponse.IngestHasSBOMs...)
ingestedIDs.HasSBOMIDs = append(ingestedIDs.HasSBOMIDs, hasSBOMArtResponse.IngestHasSBOMs...)
}
if len(pkgIDs) > 0 {
hasSBOMPkgResponse, err := model.IngestHasSBOMPkgs(ctx, client, pkgIDs, pkgSBOMs, pkgIncludes)
if err != nil {
return fmt.Errorf("hasSBOMPkgs failed with error: %w", err)
}
ingestedIDs.hasSBOMIDs = append(ingestedIDs.hasSBOMIDs, hasSBOMPkgResponse.IngestHasSBOMs...)
ingestedIDs.HasSBOMIDs = append(ingestedIDs.HasSBOMIDs, hasSBOMPkgResponse.IngestHasSBOMs...)
}
return nil
}
Expand Down
Loading