Why the old security rules stop working
Thirty years of security wisdom assumes code and data are separate things. Agents put them in the same pot and stir.
In 60 seconds
Why the old security rules stop working
Thirty years of security wisdom assumes code and data are separate things. Agents put them in the same pot and stir.
Four things that genuinely changed
| Old world | Agent world | Why it hurts |
|---|---|---|
| Input is data | Input can be instructions | Any text the agent reads is a potential command |
| Same input, same output | Same input, different output | You cannot test your way to certainty |
| Permissions are per-user | Permissions are per-agent, and agents act for many users | One compromised agent reaches everything it was ever trusted with |
| Attacks need technical skill | Attacks are written in plain English | The attacker pool is now everyone |
What still works
- Least privilege β give the agent the smallest set of powers that does the job.
- Sandboxing β run risky things where they cannot reach anything valuable.
- Logging and audit β you cannot respond to what you cannot see.
- Approval gates β a human confirms the irreversible steps.
- Rate and spend limits β cap how bad a bad hour can get.
Watch and read more
Lab
The same attack, twice: once against SQL, once against a model.
The problem
' OR 1=1 --. Now fix it with a parameterised query and prove the same input is harmless. Then do the equivalent for an LLM β and write down honestly what your "fix" actually achieves.import sqlite3
db = sqlite3.connect(":memory:")
db.execute("CREATE TABLE users (name TEXT, secret TEXT)")
db.execute("INSERT INTO users VALUES ('alice', 'flag-alice')")
def broken(name):
return db.execute(f"SELECT secret FROM users WHERE name = '{name}'").fetchall()
def fixed(name):
return db.execute("SELECT secret FROM users WHERE name = ?", (name,)).fetchall()You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1State precisely what property parameterised queries have that no prompt technique has.Reveal
Q2Someone proposes a special token that marks untrusted regions, trained so the model never obeys inside them. Give the strongest argument for, then the flaw.Reveal
Questions people ask
Can't we just train the model to ignore instructions in data?
People try, and it helps at the margins. But the model's core skill is following instructions written in natural language, and the attacker writes in the same language you do. Training reduces the success rate; it does not take it to zero, and security controls that "usually work" are not security controls.
Is this just the same as SQL injection?
The shape is identical; the fix is not. SQL injection has a real fix β parameterised queries make confusion structurally impossible. There is no parameterised prompt. That is why this problem is still open.
So are agents just unsafe to use?
No β they are unsafe to use carelessly. Plenty of agents run safely in production. They run with narrow permissions, in sandboxes, with humans on the risky steps, and with logs someone actually reads.
Who is responsible when an agent does damage?
Legally this is still settling, but practically: you are. The operator who deployed it, chose its permissions and skipped the approval gate. "The AI did it" has never once worked as a defence.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.
Sign in with your phone number to take the test and save your progress