Your web developer is building a booking form. They ask their AI assistant to add email notifications, and thirty seconds later there's working code, a new package installed, and an API key sitting in a config file. The form works. Nobody noticed the package name didn't exist last week, or that the key is about to be pushed to a repository.
AI coding assistants such as GitHub Copilot, Claude Code, Cursor and OpenAI Codex are now normal in any team that builds websites, apps or even PowerShell scripts. They're good, and we're not going to tell you to ban them. But they change how code gets written, and a few specific risks have moved from theory to documented incidents.
If your organisation has anyone writing code, whether in-house or through a contractor, this is about you.
Leaked secrets
AI assistants happily write code with a password or API key in it, because that's the quickest way to make an example work. People then commit it.
GitGuardian, which scans public GitHub for exposed credentials, reported in 2025 that in a sample of about 20,000 repositories where Copilot was active, 6.4% had leaked at least one secret, against 4.6% across all public repositories. Its 2026 report found commits made with Claude Code had a secret leak rate of 3.2%, about double the 1.5% baseline across public commits. GitGuardian is careful to say that's not simply the tool's fault: developers still decide what to accept. The same report counted more than 24,000 unique secrets exposed in MCP configuration files, the files that connect AI tools to other systems.
A leaked key for your email service, payment gateway or Microsoft 365 app registration is a real incident, not a tidy-up job.
Packages that don't exist
AI models sometimes invent package names that sound right. A study presented at USENIX Security 2025 generated 576,000 code samples with 16 popular models and checked every package they recommended. On average, at least 5.2% of packages from commercial models and 21.7% from open-source models didn't exist, and the researchers collected 205,474 unique made-up names.
That's a gift to attackers. Register the name an AI keeps inventing, put malware in it, and wait for someone to run the install command the AI suggested. The trick has been nicknamed "slopsquatting". It's the same idea as typosquatting, except the typo comes from the machine.
Assistants that run commands
The newer tools don't just suggest code. They edit files, install packages and run terminal commands. That makes their own security bugs matter much more, and there have been plenty:
- Claude Code: CVE-2025-54795, fixed in version 1.0.20, let crafted content slip a command past the confirmation prompt. CVE-2025-54794, fixed in 0.2.111, let it reach files outside the project folder. Both were published in August 2025.
- Cursor: CVE-2025-54135, fixed in 1.3.9, let an indirect prompt injection create a new MCP config file and run commands without approval. CVE-2025-54136, affecting 1.2.4 and earlier, let an attacker swap an already-approved MCP config for a malicious one without a new prompt.
- GitHub Copilot and Visual Studio: CVE-2025-53773, patched by Microsoft in August 2025, was a command injection flaw allowing local code execution.
- OpenAI Codex CLI: CVE-2025-61260, affecting version 0.23.0 and earlier, ran commands from a malicious project's config files as soon as someone ran codex in that folder.
A common thread: the attack starts with content the assistant reads, such as a README, an issue or a file in a cloned repository. Our explainer on prompt injection covers why that works.
The tools themselves as a supply chain target
In July 2025 AWS disclosed that an attacker had used an over-permissioned GitHub token to slip code into version 1.84.0 of the Amazon Q Developer extension for VS Code (CVE-2025-8217). The injected code was designed to make the extension call the Q Developer command line tool. AWS said a syntax error stopped it running, pulled the version and released 1.85.0.
A month later, malicious versions of the popular Nx build tool were published to npm. Nx's post-mortem says they scanned machines for sensitive data, tried to use locally installed AI tools such as Claude and Gemini to help, and uploaded what they found to public GitHub repositories.
And in September 2026 Google's threat intelligence group reported tracking a group it calls UNC6780 using several tricks aimed specifically at AI coding assistants and AI security scanners during open source supply chain compromises.
Sensible guardrails
None of this needs a big programme. For a team that builds websites or scripts:
- Use business plans, managed centrally. GitHub Copilot Business or Enterprise, and the team plans of the other tools, give you admin settings, policy control and clearer data terms than personal accounts.
- Keep the tools patched. Put the AI assistant, its editor extensions and any MCP connectors on your normal update cycle. Most of the flaws above were fixed quickly, but only for people who updated.
- Turn on secret scanning with push protection. GitHub's push protection blocks commits containing recognised secrets. Add a pre-commit scanner too, and keep keys in environment variables or a secrets manager, never in code.
- Check every new dependency. Before installing a package the AI suggests, confirm it exists, is the one you meant, has real history and a real maintainer. Commit lockfiles and use
npm ciin builds so versions don't drift. - Don't give the assistant free rein on the terminal. Keep command approval on. Run agents on a project folder, not a whole home directory, and use the sandbox or container options where the tool offers them. Be most careful when opening someone else's repository.
- Keep production credentials off developer laptops. An assistant can only leak what it can see.
- Review AI-written code like a junior's code. Pull requests, a second pair of eyes, and automated security scanning before anything reaches production.
- Write down the rules. Which tools are approved, what data can go into them, and who approves new MCP connectors. One page is enough.
The connectors these tools use have their own risks, covered in our MCP security explainer.
Where Geidi fits
Our cyber security services are aligned to the Essential Eight and backed by a 24/7 security operations centre. If your team or your web developer is using AI coding tools, talk to us.
Sources
- GitGuardian: Yes, GitHub's Copilot can leak (real) secrets (March 2025) (opens in a new tab)
- GitGuardian: The State of Secrets Sprawl 2026 (17 March 2026) (opens in a new tab)
- USENIX Security 2025: We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs (opens in a new tab)
- NVD: CVE-2025-54795 (Claude Code) (opens in a new tab)
- NVD: CVE-2025-54794 (Claude Code) (opens in a new tab)
- NVD: CVE-2025-54135 (Cursor) (opens in a new tab)
- NVD: CVE-2025-54136 (Cursor) (opens in a new tab)
- NVD: CVE-2025-53773 (GitHub Copilot and Visual Studio) (opens in a new tab)
- NVD: CVE-2025-61260 (OpenAI Codex CLI) (opens in a new tab)
- AWS Security Bulletin AWS-2025-015: Amazon Q Developer extension for VS Code version 1.84 (23 July 2025) (opens in a new tab)
- Nx: s1ngularity post-mortem (opens in a new tab)
- Google Threat Intelligence Group: From prompting to autonomy, the evolution of adversarial AI (9 September 2026) (opens in a new tab)
- GitHub Docs: About push protection (opens in a new tab)




