Check rules files for hidden instructions
Hidden characters in rules files backdoored Copilot and Cursor · Security incident · Hacker News · pillar_sec · Apr 2025
Pillar Security showed invisible Unicode in AI rules files could quietly instruct Copilot and Cursor to insert malicious code.
Lesson
Review rules/config files from shared repos with a tool that reveals hidden characters, and review AI-written diffs.
Fix prompt
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
Before I install anything my AI suggests in GitHub Copilot, help me check it's safe. For the package, extension or MCP server [name]: 1) Check it's the official one (publisher, repo link, download count, how recently it was updated, typo-squatted names). 2) List what permissions or access it gets (files, network, env vars, email). 3) Tell me how to pin the version and review install scripts. 4) Check my project for packages with known security advisories, and tell me how to update them. Don't install or remove anything until I confirm.
Source: Hacker News ↗