August 5, 2026
How I’m Learning to Keep AI Safe
So I just finished this amazing learning path on Snyk about OWASP Top 10 for LLMs and GenAI — and honestly? I learned so much that I had to…

By enemri
3 min read
- 1 1. Prompt Injection: The "Ignore Previous Instructions" Trick
- 2 2. Sensitive Information Disclosure: When AI Spills Secrets
- 3 3. Supply Chain Vulnerabilities: It's What's Inside That Counts
- 4 4. Data and Model Poisoning: Tampering with the Recipe
- 5 5. Improper Output Handling: Don't Trust Everything It Says
So I just finished this amazing learning path on Snyk about OWASP Top 10 for LLMs and GenAI — and honestly? I learned so much that I had to share it with you all. They even give you a certificate at the end!
Let me break down the 10 biggest risks we need to watch out for when using Large Language Models. Think of this as my study notes that actually make sense.
1. Prompt Injection: The "Ignore Previous Instructions" Trick
Remember when your friend convinces you to break the rules by saying "just one time"? That's basically prompt injection. Someone types clever instructions to make the AI forget its safety rules.
What happened: A Stanford student got Bing Chat to reveal its secret system prompt by typing "Ignore the previous instructions."
How we fight back:
- Clean and check everything users type
- Keep the AI's rules separate from user input
- Don't let the AI do dangerous stuff without asking humans first
- Train the AI to recognize sneaky manipulation
2. Sensitive Information Disclosure: When AI Spills Secrets
Ever accidentally reveal a friend's secret in a group chat? LLMs do that too — but with passwords, personal data, and company info.
What happened: Samsung engineers pasted their source code into ChatGPT and… oops, it got leaked.
How we fight back:
- Only give the AI the minimum info it needs
- Scan what the AI outputs for sensitive stuff
- Add "noise" to training data so it doesn't memorize everything
- Use privacy techniques that don't centralize data
3. Supply Chain Vulnerabilities: It's What's Inside That Counts
Just like food poisoning from bad ingredients, AI can get "sick" from compromised third-party stuff — models, plugins, datasets.
What happened: A popular AI library had a bug that let hackers run malicious code through fake model files.
How we fight back:
- Double-check the "fingerprint" of every model we use
- Regularly scan all AI dependencies for bugs
- Research third-party providers before trusting them
- Keep a list of all AI ingredients (like a recipe)
4. Data and Model Poisoning: Tampering with the Recipe
Imagine someone spiking your meal with weird stuff. Data poisoning means attackers add malicious data during training to make the AI behave badly.
How we fight back:
- Track where every piece of training data comes from
- Clean training data thoroughly
- Look for weird patterns in the data
- Test the AI regularly for unexpected behavior
5. Improper Output Handling: Don't Trust Everything It Says
If your AI suggests something sketchy (like clicking a weird link), you wouldn't do it right? The same goes for its outputs.
What happened: An AI coding assistant created SQL queries that were directly run, letting hackers sneak in.
How we fight back:
- Treat AI output like a suspicious stranger — verify everything
- Encode outputs properly for where they're going (websites, databases)
- Never let AI directly run dangerous commands
- Test everything before using it
6. Excessive Agency: Don't Give AI Too Much Power
This is like giving your little sibling your car keys because they "know how to drive." AI should only do what it absolutely needs to do.
What happened: An AI with file access got tricked into deleting important system files.
How we fight back:
- Give AI only the tiniest amount of permissions needed
- Make humans approve risky actions
- Put AI in a "sandbox" (like a playpen for toddlers)
- Keep logs of everything it does
7. System Prompt Leakage: Keep the Blueprint Secret
Your system prompt is like your diary — if someone reads it, they know all your secrets. In AI terms, that means knowing how to trick you.
How we fight back:
- Never include passwords or API keys in prompts
- Use different prompts for different security levels
- Hide how the system actually works from users
- Regularly test if your secrets are staying secret
8. Vectors and Embeddings Weaknesses: The Confused Matchmaker
Embeddings help AI understand meaning (like matching similar words). But attackers can mess with this to make bad matches happen.
How we fight back:
- Double-check embedding models for weird behavior
- Protect your knowledge base like a vault
- Verify search results make sense
- Use multiple ways to check if matches are correct
9. Misinformation: When AI Hallucinates
AI sometimes makes things up — confidently. Like that one friend who tells elaborate stories that never happened.
How we fight back:
- Always fact-check important info
- Use multiple sources to verify
- Tell users when info might be uncertain
- Keep humans in the loop for critical decisions
10. Unbounded Consumption: The AI That Ate Everything
AI can consume insane amounts of money and compute power if left unchecked. It's like leaving the water running and getting a huge bill.
How we fight back:
- Set limits on how many requests can be made
- Monitor usage in real-time
- Slow down suspiciously heavy usage
- Budget protection — know what AI costs you
Final Thoughts
Look, AI is incredible but it needs guardrails . Whether you're building AI apps or just using them, understanding these risks makes you smarter and safer.
If you want to learn more (and get that sweet cert), check out Snyk's learning path https://learn.snyk.io/learning-paths/owasp-top-10-llm/ . It's totally free and super readable.
Stay safe !