Troubleshooting security policies and profiles