Applescript or Automator service that automatically trusts certificates
Undesirable Behaviour
There is no intended way to add trusted root certificates without requiring authorisation from the user or an administrator.
Any method that manages to add a trusted root certificate without confirming, at some stage, the credentials of the user would be considered a serious security bug.
What is the Risk?
Once a root certificate is trusted, it provides an automatic degree of trust for other certificates, applications, and content.
If a script, process, or tool could add trusted root certificates without authorisation, then it opens the possibly to perform malicious actions on a Mac – without the user knowing.