Skip to content

AI prompt · Offensive AI · Web pentesting

Prompt: test plan for an LLM-based application

Prompt that builds a test plan for an LLM-based application per the OWASP Top 10 for LLM Applications: objectives, expected behaviour and evidence.

By Steven Carrier Published

Works with: Claude, other chat assistants

You are a security tester specialising in generative AI applications. Prepare the test plan for the LLM-based application described below, structured around the OWASP Top 10 for LLM Applications.

Authorised scope: {{scope}}
Application architecture: {{architecture}}
Functions and tools available to the model: {{model_capabilities}}
Engagement constraints: {{constraints}}

For each Top 10 category relevant to this architecture:
1. justify in one sentence why it applies (or why you rule it out);
2. state the test objectives, meaning what we are trying to establish rather than a list of messages to send;
3. describe the expected safe behaviour of the application, in a verifiable way;
4. specify the evidence to collect (logs, screenshots, conversation identifiers, observed tool calls);
5. give the priority (high, medium, low) and the prerequisites (accounts, datasets, log access).

Rules:
- do not provide any list of attack messages, bypass attempts or payloads: describe scenarios in terms of objective and success criterion;
- do not invent category identifiers: if you are not sure of the numbering in the version used, give the category name and the words "to be verified";
- flag tests that may have side effects (real actions triggered by a tool, model call costs, production data affected) and suggest an alternative;
- do not propose any test outside the stated scope.

Finish with an effort estimate per category, then the list of questions to ask the client before starting.

Replace the highlighted variables before use.

This prompt prepares the outline of a security test for an application built on a language model (assistant, agent, retrieval-augmented search, content generation). It organises the work by risk category and sets out, for each test, what is expected and what must be kept as evidence. It is useful at pre-sales stage as well as at kick-off.

When to use it

  • Before a penetration test that includes a generative AI feature (chatbot, internal assistant, agent that calls tools).
  • To define what the client must provide: test environment, accounts, log access, documentation of the tools exposed to the model.
  • To compare two architectures: the plan shows which categories weigh most when the model has access to data or actions.

Fill in the variables

Variable Example
{{scope}} support assistant at https://assistant.staging.example.org, staging environment only
{{architecture}} web interface, API gateway, model hosted by a provider, retrieval-augmented search over an internal document base
{{model_capabilities}} reads the document base, creates support tickets, no write access to customer data
{{constraints}} grey box, two test accounts, cap of 2,000 model requests, no testing in production

The more precisely you describe what the model can do, the more useful the plan: risk depends mainly on what the model can read and act on. Reuse the items agreed in the pentest scoping checklist.

Review the output

  • Check category names and numbering against the OWASP project site: the Top 10 changes between versions and a model readily mixes up editions.
  • Check that every expected behaviour is observable: "the application refuses" is not enough, you must say how you will establish it.
  • Rule out or adapt tests that trigger real actions or costs not covered by the contract.
  • Language model output varies from one run to the next: plan to repeat each test and note how often the behaviour is observed.
  • Do not paste into the prompt any client information (detailed architecture, system names, configuration extracts) that your agreement does not allow you to share with an AI service.

Sources

Related resources

  • AI skill · Offensive AI · Web pentesting

    LLM application testing skill

    Claude Code skill that produces an LLM application test plan per the OWASP Top 10 for LLM Applications: objectives, safe behaviour, evidence, fixes.

    Published

  • AI skill · Web pentesting · Offensive AI

    Security code review skill

    Claude Code skill that reviews a diff or file from a security angle and reports sourced findings: file:line, CWE, severity rationale and a suggested fix.

    Published

  • AI prompt · Web pentesting

    API test plan prompt

    Prompt that builds an API test plan from an OpenAPI excerpt: endpoints by risk, authorisation matrix and tests per OWASP API Top 10 category.

    Published

BEAROPS

Need a penetration test?

BEAROPS experts test your applications, infrastructure and cloud, black box or grey box, following OWASP, NIST and ANSSI guidance.