How to automate security operations