Safeguard
Topic

AI Security

In-depth guides and analysis on ai security from the Safeguard engineering team.

786 articles

AI Security

Prompt injection attacks: direct vs indirect

Direct prompt injection comes from the chat box; indirect injection hides in the data your AI agent trusts. Here's how the two attack types differ and what stops each.

Jun 14, 20266 min read
AI Security

Agent hijacking: the real-world impact of prompt injection

From a zero-click Microsoft 365 Copilot breach to poisoned MCP servers, AI agent hijacking is now a real, documented software supply chain threat.

Jun 14, 20267 min read
AI Security

Securing Model Context Protocol (MCP) servers

MCP server security explained through real 2025 CVEs, tool poisoning, and rug-pull attacks, plus concrete controls security teams need to defend AI agent tool calls.

Jun 14, 20267 min read
AI Security

mcp-scan: detecting malicious MCP tool definitions

MCP lets AI agents call tools via plain-text descriptions the model trusts blindly. Here's how mcp-scan catches poisoning, rug-pulls, and shadowing.

Jun 13, 20266 min read
AI Security

Can AI write secure code? Auditing AI-generated code

AI writes code fast, but studies from 2021 to 2025 show it also reproduces insecure patterns and invents fake dependencies. Here's what the data says.

Jun 13, 20267 min read
AI Security

GitHub Copilot code security: XSS vulnerabilities found in React

Copilot commonly suggests dangerouslySetInnerHTML and unsanitized DOM writes in React. Here's the data on AI-generated XSS risk and how to catch it.

Jun 13, 20267 min read
AI Security

How Copilot amplifies insecure codebases

Copilot writes ~46% of code where enabled, and studies show ~40% of its security-relevant suggestions are vulnerable. Here's the data on the risk.

Jun 12, 20266 min read
AI Security

How to Audit the Dependencies of an AI Agent

An AI agent's dependency tree spans packages, MCP servers, models, and system prompts. A step-by-step audit method that actually enumerates all four layers.

Jun 12, 20266 min read
AI Security

AI-Generated Code Security: risks and controls

AI now writes up to 40%+ of new code, and models hallucinate nonexistent packages in 5-22% of outputs. Here's why Black Duck-style SCA misses that risk, and what controls actually work.

Jun 12, 20267 min read
AI Security

5 best practices for adopting GitHub Copilot securely

GitHub Copilot has 1.3M+ paid seats. Five concrete, evidence-based practices for locking down content exclusion, licensing, code quality, and prompt injection risk.

Jun 12, 20267 min read
AI Security

AI hallucinations and their security implications for developers

LLMs hallucinate nonexistent packages in up to 1 in 5 code samples — and slopsquatting attacks are already exploiting that predictability in the wild.

Jun 12, 20266 min read
AI Security

GenAI Code Review Tools: A 2025 Field Test

We field-tested five GenAI code review tools against 240 seeded security defects to see which catch real issues and which hallucinate findings.

Jun 11, 20264 min read

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.

AI Security (Page 18) — Supply Chain Security Blog | Safeguard