Skip to content

Commit

Permalink
ignore empty instance ID
Browse files Browse the repository at this point in the history
Signed-off-by: David Wertenteil <dwertent@armosec.io>
  • Loading branch information
David Wertenteil committed Jan 9, 2024
1 parent 97f2f3e commit c758261
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/relevancymanager/v1/relevancy_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ func (rm *RelevancyManager) handleRelevancy(ctx context.Context, watchedContaine
ctxPostSBOM, spanPostSBOM := otel.Tracer("").Start(ctx, "RelevancyManager.handleRelevancy")
defer spanPostSBOM.End()

// SBOM validation moved to monitorContainer

if watchedContainer.InstanceID == nil {
logger.L().Debug("ignoring container with empty instanceID", helpers.String("container ID", containerID), helpers.String("k8s workload", watchedContainer.K8sContainerID), helpers.Error(err))

Check failure on line 156 in pkg/relevancymanager/v1/relevancy_manager.go

View workflow job for this annotation

GitHub Actions / pr-created / test / Create cross-platform build

undefined: err
return
}
fileList, err := rm.fileHandler.GetAndDeleteFiles(watchedContainer.K8sContainerID)
if err != nil {
logger.L().Debug("failed to get file list", helpers.String("container ID", containerID), helpers.String("k8s workload", watchedContainer.K8sContainerID), helpers.Error(err))
Expand Down

0 comments on commit c758261

Please sign in to comment.