Skip to content

Commit

Permalink
Merge pull request #231 from kubescape/hotfix/too-large
Browse files Browse the repository at this point in the history
Fix too large
  • Loading branch information
David Wertenteil committed May 29, 2024
2 parents 6f76553 + e586757 commit 29d3345
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/services/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (s *ScanService) ScanCVE(ctx context.Context) error {
}

// do not process timed out SBOM
if sbom.Status == helpersv1.Incomplete {
if sbom.Status == helpersv1.Incomplete || sbom.Status == helpersv1.TooLarge {
return domain.ErrIncompleteSBOM
}

Expand Down Expand Up @@ -337,7 +337,7 @@ func (s *ScanService) ScanRegistry(ctx context.Context) error {
}

// do not process timed out SBOM
if sbom.Status == helpersv1.Incomplete {
if sbom.Status == helpersv1.Incomplete || sbom.Status == helpersv1.TooLarge {
return domain.ErrIncompleteSBOM
}

Expand Down
2 changes: 1 addition & 1 deletion repositories/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ func (a *APIServerStore) GetSBOM(ctx context.Context, name, SBOMCreatorVersion s
}

func validateSBOMp(manifest *v1beta1.SBOMSyftFiltered, sbomCreatorVersion string) error {
if status, ok := manifest.Annotations[helpersv1.StatusMetadataKey]; ok && status == helpersv1.Incomplete {
if status, ok := manifest.Annotations[helpersv1.StatusMetadataKey]; ok && (status == helpersv1.Incomplete || status == helpersv1.TooLarge) {
return domain.ErrIncompleteSBOM
}
if manifest.Spec.Metadata.Tool.Version == "v0.101.1" || manifest.Spec.Metadata.Tool.Version == "v0.101.1-hotfix" { // hard coded version. We have a specific workaround for this version
Expand Down

0 comments on commit 29d3345

Please sign in to comment.