A Comparative Survey of Security Risks in AI Systems: from LLMs to AI Agents and Embodied Agents | AMiner