Security risks from AI-generated code are real—but with the right guardrails, teams can use AI to move faster.