We can read this list from all_estimators and trust them all. This doesn't include everything from sklearn, but is a good starting point and would substantially reduce the size of the untrusted_types, which would in turn make it easier for folks to notice malicious types in it.
We can probably read it dynamically from sklearn instead of hard coding it. Other installed/loaded packages might change the list, but if the user has some malicious packages installed, they're already compromised anyway.
We can read this list from
all_estimatorsand trust them all. This doesn't include everything from sklearn, but is a good starting point and would substantially reduce the size of theuntrusted_types, which would in turn make it easier for folks to notice malicious types in it.We can probably read it dynamically from sklearn instead of hard coding it. Other installed/loaded packages might change the list, but if the user has some malicious packages installed, they're already compromised anyway.