From 095510e8e2aedfb69d5143d8b044463c6ac0e47f Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Tue, 27 Mar 2018 20:54:18 +0300 Subject: [PATCH] Add filtering of invalid results, otherwise it'll propagate --- infection_monkey/system_info/azure_cred_collector.py | 1 + 1 file changed, 1 insertion(+) diff --git a/infection_monkey/system_info/azure_cred_collector.py b/infection_monkey/system_info/azure_cred_collector.py index d51587840..ad7db0307 100644 --- a/infection_monkey/system_info/azure_cred_collector.py +++ b/infection_monkey/system_info/azure_cred_collector.py @@ -30,6 +30,7 @@ class AzureCollector(object): :return: List of (user/pass), possibly empty """ results = [self.extractor(filepath) for filepath in self.file_list] + results = [x for x in results if x] LOG.info("Found %d Azure VM access configuration file", len(results)) return results