stampery / mongoaudit

🔥 A powerful MongoDB auditing and pentesting tool 🔥
https://mongoaud.it
MIT License
1.32k stars 135 forks source link

Exception handling in tests is inconsistent. #10

Open jacob-meacham opened 7 years ago

jacob-meacham commented 7 years ago

I ran into this while debugging #9.

The connection exception, which gives valuable information, is silently swallowed in testers.py#Tester#get_connection. In contrast, tester exceptions themselves aren't caught at all and cause mongoaudit to crash.

Expected behavior: The connection exception is surfaced and testing does not continue If an exception is encountered in a particular test, it is logged and the rest of the tests continue as normal. This allows a user to see the results of the non-crashed tests.