OMAR
Field NotesCV
Red-Teaming Your Own AI Feature
← All Notes
AI Security10 March 2026 · 6 min read

Red-Teaming Your Own AI Feature

An hour of structured attack attempts before launch is worth more than any amount of post-incident analysis.

An hour of structured attack attempts before launch is worth more than any amount of analysis after an incident. This is true of all security work and doubly true of AI features, where the failure modes are unfamiliar and the demo always looks fine.

You do not need a red team. You need a method and an hour.

The manual hour, first

Before reaching for tooling, sit with your own feature and try to break it. I work through five categories:

Scope escape. Can I get the interior design assistant to write me a poem, give medical advice, or discuss a competitor? Every one of those is a screenshot with your client's logo on it.

Instruction extraction. Ask it to repeat its instructions, in various indirect ways. Assume the system prompt is discoverable and check that nothing in it is sensitive.

Indirect injection. Put instructions inside content the system retrieves — a document, a profile field, a filename. This is the one that surprises people, and it is the realistic attack.

Authorisation probing. Ask for another user's data in ten different phrasings. The correct outcome is a permission error from the server, not a polite refusal from the model.

Cost abuse. Send a very long input. Ask for a very long output. Repeat quickly. See what your bill does.

Write down what worked. That list is your fix list.

Then automate it

PyRIT is a framework for making that systematic: define attack strategies, run them at scale, and score responses automatically rather than reading thousands by hand. The value is repeatability — the same suite runs again after every prompt change.

The concepts transfer even if you never adopt the tool: an attack corpus, an automated runner, and a scoring step.

The rule that matters

Only test systems you are authorised to test. Your own application, a client's system with written permission, a deliberately vulnerable lab. Running adversarial tooling against someone else's endpoint without agreement is not research.

What to do with the findings

Most fixes are architectural rather than textual. Scope escapes get a tighter system prompt; authorisation failures get server-side checks; cost abuse gets rate limits and output caps. If your only remediation is a longer prompt, you have probably not fixed it.

Resources

AI SecurityAppSecPyRIT

Need this built properly?

I build secure, fast, bilingual platforms for clients across Egypt, Saudi Arabia, the UAE and Kuwait.

Keep Reading