Responding to and mitigating security risks