chainguard-dev / malcontent

detect malicious program behaviors
Apache License 2.0
407 stars 26 forks source link

Add nil checks when iterating over sync.Maps #435

Closed egibs closed 3 weeks ago

egibs commented 3 weeks ago

Closes: https://github.com/chainguard-dev/bincapz/issues/434

I noticed a handful of panics when looking at the bincapz Job logs. This PR checks whether the key, value, or both are nil before we try to access their values across various sync.Maps.