Shadows in the Code: Exploring the Risks and Defenses of LLM-based Multi-Agent Software Development Systems