How to delete or untrust all root certificates in OSX?
If You want to change set of system root certificates, they are in /System/Library/Keychains/.
Example of using security there is in this answer to similar question.