# AI safety vs AI security

AI safety is about an AI system not causing harm through its own behavior, and AI security is about defending that system against people who attack it. Most products need both, and one layer of checks can enforce both.

## The difference

A safety failure needs no attacker. A security failure has someone behind it.

| | AI safety | AI security |
| --- | --- | --- |
| Harm comes from | The system's own behavior | Someone attacking the system |
| Question asked | What the system can do wrong by itself | What someone can make it do |
| Examples | Dangerous advice, [hallucination](/glossary/hallucination), an agent deleting the wrong files | [Prompt injection](/glossary/prompt-injection), data exfiltration, poisoned training data |
| Typical work | Post-training, evals | Threat modeling, least privilege |

## Where they overlap

The line is not sharp. A [jailbreak](/glossary/jailbreak) is an attack (security) whose result is harmful output (safety).

A check outside the model does not need to know why a policy was broken. The check that stops an unsafe answer written by mistake also stops the same answer extracted by an attacker. So one layer of [guardrails](/glossary/ai-guardrails) can enforce both, and [red teaming](/glossary/ai-red-teaming) can test both.

## Which to pick

Both. List what must not happen, then mark each item as possible by accident, by attack or both. Anything that talks to the public needs safety work. Anything that reads untrusted text or calls tools needs security work, and that is nearly every product.

## With White Circle

Our policies cover safety and security, along with compliance, reliability, model output quality and integrity. [Control](/products/control) checks inputs, outputs and tool calls against them in real time.

