Skip to content

Commit

Permalink
Merge pull request #288 from anchore/nil-pointer-fix
Browse files Browse the repository at this point in the history
fix: check for nil pointer when imageDigest is not found
  • Loading branch information
bradleyjones authored Aug 6, 2024
2 parents 9d5476a + 3a30b2e commit 56af02e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/inventory/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ func buildContainerTagMap(tasks []*ecs.Task) map[string]string {
// check if the container tag consists of an @ symbol
if !strings.Contains(*container.Image, "@") {
// Good tag image, store map
containerMap[*container.ImageDigest] = *container.Image
if container.ImageDigest != nil {
containerMap[*container.ImageDigest] = *container.Image
}
}
}
}
Expand Down

0 comments on commit 56af02e

Please sign in to comment.