Secure development lifecycle (SSDLC): what it is and how to put it in place
What the secure development lifecycle is, what happens in each phase, what SAST, DAST and SCA add, and where to start if you have nothing in place today.
What happens on each day of an AI penetration test, what you get at the end, what you need ready before we start, and the things this test will not tell you.
An AI pentest is a penetration test whose target happens to contain a model. NIST SP 800-115 defines penetration testing as security testing in which assessors "mimic real-world attacks to identify methods for circumventing the security features of an application, system, or network". Having a model in the stack does not change that.
What changes is the attack surface. The subject is the assistant or agent around the model: the prompt that assembles context, the documents it retrieves, the tools it may call, the identity those tools run as, and the application that renders what comes back. Most findings with real impact live in that plumbing, not in the weights.
It is not a benchmark of your model, and not a safety or bias evaluation; neither of those is what a pentest report answers. The commercial shape sits on the AI pentesting page; this is the method.
Nothing is touched until scope is signed. NIST SP 800-115 says the assessment plan, its term for the rules of engagement, answers five questions: scope, authorisation, logistics, handling of sensitive data, and what happens in the event of an incident. Four more are specific to AI:
Ready on day one: the AI feature switched on in that environment; credentials for every role that matters, two tenants if the product is multi-tenant; the tools the model can call and the permissions each holds; the system prompts for a grey box test; and a named technical contact.
Discovery is where anything is first touched, and on AI systems it earns its keep, because the inventory you start from is usually wrong.
We enumerate every entry point that reaches a model (chat window, public API, batch job, webhook, IDE plugin), every model behind them, every retrieval source and the route a document takes into it, and every tool the model can invoke with its scopes. This usually surfaces something the platform team did not know was live: an endpoint still serving a previous system prompt, a cheaper fallback model, an internal assistant wired to production data.
The rest of recon maps where untrusted content enters the context window: uploaded files, scraped pages, inbound email, ticket bodies, calendar invitations, and the third-party servers an agent talks to.
This is not a web test with a chat box bolted on. Four layers, in order, every finding tagged to the OWASP Top 10 for LLM Applications 2025.
Prompt injection is LLM01, and it splits in two. Direct injection is a user talking to the model; indirect prompt injection is the model reading instructions out of content somebody else controls. The second scales, because the attacker never touches your login page.
OWASP’s own text is blunt: "Given the stochastic influence at the heart of the way models work, it is unclear if there are fool-proof methods of prevention for prompt injection." So the question is not whether a prompt can be injected, but what it can reach: permissions, not wording. System prompt leakage, LLM07, goes in the same pass.
Where the system uses retrieval-augmented generation, the corpus is attack surface: LLM08, Vector and Embedding Weaknesses. We test whether one tenant’s documents surface in another tenant’s answers, and whether a document with instructions buried in it changes behaviour for the next reader.
Where the model can act, impact stops being theoretical. LLM06, Excessive Agency, names three causes: excessive functionality, excessive permissions and excessive autonomy. We take the tool registry apart and ask what each function does with attacker-controlled arguments: object level authorisation inside its own API, request forgery from anything that fetches a URL, injection into anything that builds a query or reads a file. Then we chain them: an agent that can read a ticket and call an internal API is two steps from a data path nobody drew. Prompt injection is how the instruction gets in; the tool registry decides how far it travels.
Improper output handling, LLM05, is where AI features reintroduce vulnerabilities the web solved a decade ago: output rendered as HTML, a model-supplied image URL used as an exfiltration channel, generated SQL run unparameterised. For the model itself we work to NIST’s adversarial machine learning taxonomy, AI 100-2 E2025, which separates evasion, poisoning and privacy attacks on predictive systems from poisoning, direct prompting and indirect prompt injection attacks on generative ones. Unbounded consumption, LLM10, closes the layer: on metered inference, denial of service is also an invoice.
800-115 draws the line that matters: "while vulnerability scanners check only for the possible existence of a vulnerability, the attack phase of a penetration test exploits the vulnerability to confirm its existence". An assistant talked into rudeness is not a finding; one that reads another customer’s invoice is.
Two habits are specific here. Chaining: we hunt the path from content an outsider writes, through a tool call carrying your privileges, to data leaving by a channel we control. Repeatability: model output is stochastic, so every finding is re-run a fixed number of times and reported with the rate at which it worked, ten out of ten or two out of ten. A technique that fires once in fifty is still a finding, and you should know which one. Where the fix belongs in telemetry rather than in the prompt, the report says so instead of proposing another filter.
800-115 describes the deliverable as a report that identifies the vulnerabilities found, presents a risk rating and gives guidance on mitigating them. Ours lets three audiences read one document:
It is handed over in a working session with the engineers who have to act on it.
The number is agreed in writing before we start, and retest days sit inside it rather than being added afterwards. What moves it:
The working days go in writing once we have seen the surface.
The frameworks that change what actually gets done:
If the system is high-risk under the EU AI Act, Article 15 requires that such systems "shall be resilient against attempts by unauthorised third parties to alter their use, outputs or performance by exploiting system vulnerabilities", with technical solutions expected to address data poisoning, model poisoning, adversarial examples and model evasion. A pentest is evidence towards that duty, not compliance with it.
A finding is not closed because a ticket is closed. Among the responsibilities 800-115 assigns to assessors is "conducting additional examinations and tests when needed to validate mitigation actions". That is the retest.
We re-run every finding as originally reproduced, the same class of finding elsewhere, and the full chain, because a fix in the middle sometimes only moves it. On AI findings we repeat the same fixed number of attempts: a filter that takes a success rate from ten out of ten down to two out of ten has reduced the noise, not fixed the problem, and the report says so.
You get an updated report with a status and a date against each finding, which is what security questionnaires ask for. To apply this to your own architecture, start with an AI penetration testing engagement.
If any of this looks like a problem you are carrying, half an hour on a call scoping it with a senior pentester is worth more than reading another article.
Hablar con un pentester seniorPick a time that suits you. You tell us what you need and where you are, and we explain how we work and how we can help.