From 5c8b8b6c2f8d2d5256cf31a4c47dde66821e086e Mon Sep 17 00:00:00 2001 From: sethho Date: Wed, 3 Apr 2024 09:50:32 -0400 Subject: [PATCH] adding more error checking for user field in manifest --- src/confcom/azext_confcom/security_policy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/confcom/azext_confcom/security_policy.py b/src/confcom/azext_confcom/security_policy.py index 008eda8b325..86de9267d59 100644 --- a/src/confcom/azext_confcom/security_policy.py +++ b/src/confcom/azext_confcom/security_policy.py @@ -468,7 +468,7 @@ def populate_policy_content_for_all_images( if ( not deepdiff.DeepDiff(image.get_user(), config.DEFAULT_USER, ignore_order=True) - and image_info.get("User") != "" + and (image_info.get("User") != "" and image_info.get("User") is not None) ): # valid values are in the form "user", "user:group", "uid", "uid:gid", "user:gid", "uid:group" # where each entry is either a string or an unsigned integer