Why PyRIT red teaming fits SaaS release cycles and customer copilots
PyRIT lets a SaaS team run the same red teaming suite against its AI feature before every release and keep each run as stored evidence for customer security reviews. For a multi-tenant product, the AI feature is usually a copilot or agent that reads tenant data, calls tools and answers customers in the same interface. A one-off red team report from last year does not show whether the current build still refuses a prompt injection in a support ticket or leaks one tenant's records into another tenant's chat. PyRIT is built from targets, converters, scorers, attacks, memory and datasets, so the team can point the same objectives at a staging endpoint on every build and compare results over time.
Once red teaming moves into the release process, the work changes in three ways. First, the target becomes a versioned endpoint, typically a custom HTTP or WebSocket app or a web app driven through Playwright, so the test must reach the same path customers use, including the tenant-scoped authentication. Second, the pass criteria must be written down before the run: which scorer decides a response is unsafe, which attacks are blocking and which are advisory, and who signs off when a blocking attack succeeds. Third, memory becomes a record. PyRIT stores conversations and results in SQLite or Azure SQL, and the team must decide where that database lives, how long it is kept and who can read tenant-related test content. Confirm these settings with your own data handling policy before the first run.
The product and security teams keep different parts of this. Product engineering owns the feature, the fixes and the staging environment. Security owns the objectives, the scoring thresholds and the decision to release despite a finding. The team should also confirm that test data is synthetic, because a copilot that answers from real tenant content would put customer data into the test memory. Keep the sign-off trail and the scorer configuration with each release so that a later customer questionnaire can be answered from the same records.
What customer AI security reviews ask for and what it means for PyRIT scope
This table maps the requirements customers raise in AI security reviews to the PyRIT work that produces evidence for them. Read each row as a question to answer before the scope is written, then check whether the PyRIT runs, scorers and memory records can support the answer. The main takeaway is that a SOC 2 or GDPR question usually needs a documented PyRIT activity, not only a test result.
| Requirement or question | Source | What it means for the PyRIT build |
|---|---|---|
| Which Trust Services Criteria are in scope, and do the security common criteria CC1 to CC9 apply? | AICPA 2017 Trust Services Criteria | Security common criteria apply to every SOC 2, so scope the PyRIT program under them. Map each scenario to the control it supports, and confirm with your auditor which optional categories apply. |
| Is the report a Type 1 (design as of a date) or Type 2 (operating effectiveness over a period)? | AICPA SOC 2 report types | A Type 1 answer needs a documented, repeatable PyRIT procedure at one date. A Type 2 answer needs dated runs across the period, so schedule recurring scenarios and keep run history in memory. |
| Does the AI feature process customer data only on documented instructions, including transfers? | GDPR Article 28(3) | Add leakage scenarios that try to pull other tenants' data or cross-border transfer details, and record the instructions the target was configured with for the run. |
| Are security of processing measures in place for the AI feature? | GDPR Article 32 | Test prompt injection, data exposure and access boundaries through the copilot or agent, and link each finding to a remediation and a retest. |
| Can the customer switch to another provider or on-premises infrastructure? | EU Data Act, Articles 23, 25 and 50 | Run PyRIT against the target model and endpoint configuration you would hand over, so switching does not leave untested prompts, scorers or memory records behind. |
| Does NIS2 or the Cyber Resilience Act apply to the product or to the provider? | NIS2 Annex I; Regulation (EU) 2024/2847 | Scope questions decide what evidence is asked for. Confirm applicability with counsel first, then decide whether PyRIT results feed vulnerability handling for in-scope products. |
| How were harmful outputs judged, and how reliable is the judge? | Customer questionnaire follow-ups | Document the scorer choice, such as an LLM judge or Azure AI Content Safety, and measure its accuracy on labeled examples before quoting attack success rates. |
| How long are prompts and responses kept, and who can read them? | Customer data handling questions | Set memory location and retention for PyRIT results, restrict access, and avoid storing real customer data in test conversations. |
Which AI surfaces to test first: copilots, agents, APIs and internal tools
A customer-facing chat copilot is usually a web application with a chat interface that sits behind your login and calls a model through your own backend. For PyRIT, the target is either a custom HTTP or WebSocket endpoint that your chat backend exposes, or a web app target driven through Playwright when the chat UI is the only reliable entry point. Start with the harms your customers would notice first: unsafe or off-policy content, system prompt disclosure, and attempts to make the copilot answer questions about other tenants. Write objectives that use a test account in tenant A and try to elicit content from tenant B, along with objectives that ask the copilot to summarize documents, tickets or contacts it should not see.
- Target choice: Use a custom HTTP or WebSocket target when the backend API is stable and authenticated; use a Playwright web target when session handling or the UI is the only path that matches production.
- Cross-tenant objectives: Write prompts that name records, workspace IDs or customer names from a second test tenant and check whether the response includes them.
- System prompt and policy objectives: Target instructions, internal tool names and guardrail wording that a customer should not be able to extract.
- Multi-turn harms: Plan multi-turn attacks for gradual escalation, since a single-turn refusal does not show whether the copilot holds its policy over a conversation.
- Scoring criteria: Define in advance what counts as a leak, such as a record from another tenant, so reviewers apply the same standard.
Before testing, confirm with your engineering team which tenant and session identifiers the chat backend uses, and whether test tenants have data that can safely be seeded.
Agents that read customer data, call internal APIs or take actions on a customer's behalf carry the highest risk in a multi-tenant product, because a manipulated prompt can drive a tool call that the user never requested. The PyRIT target is usually a custom HTTP or WebSocket endpoint that wraps the agent runtime, and the test must observe tool calls and their arguments, not only the final text. The main harms are tool misuse, privilege escalation through the agent's service credentials, and cross-tenant data access through retrieval or search tools. Objectives should ask the agent to search, export or modify records outside the requesting tenant, and to call tools that the user's role should not permit.
- Tool misuse objectives: Ask the agent to perform actions such as bulk export, deletion or permission changes and record whether the tool was invoked.
- Indirect injection objectives: Place instructions inside documents, emails or tickets that the agent retrieves, and test whether the agent follows them. This is the path most often used by attackers in tools that read external content.
- Credential scope checks: Confirm with the platform team which service account the agent uses and whether its permissions are broader than the requesting user's.
- Tenant boundary objectives: Test retrieval queries that include another tenant's identifiers, and compare what the agent returns against the requesting user's permissions.
- Logging and evidence: Require the test harness to capture tool call traces, since a text-only score can miss a successful unauthorized action.
Confirm with your team whether the agent can take irreversible actions in test environments, and whether those actions can be disabled or sandboxed for the test run.
Many SaaS products expose AI features through an API that customer integrations call directly, such as a summarization endpoint, a classification service or a generation endpoint used inside a customer's own system. The PyRIT target is a custom HTTP endpoint, and the test must mirror how a customer's integration authenticates, including API keys, OAuth tokens and per-tenant identifiers. The harms that matter most are cross-tenant data exposure through object identifiers in the request, abuse of rate limits and cost, and inputs that cause the feature to return data from other accounts. Objectives should vary the tenant identifier, the API key scope and the request body together, because many breaches of this kind happen where authorization is checked for one field and not another.
- Authorization objectives: Submit requests using a valid key for tenant A with object IDs that belong to tenant B and record whether the response differs from an unauthorized request.
- Injection through payloads: Place instructions inside fields that the API passes to the model, such as names, comments or uploaded text.
- Abuse and cost objectives: Test whether repeated or long requests can exhaust quotas or run up model costs for one tenant at another's expense.
- Error and verbosity objectives: Check whether error messages reveal internal prompts, model names or stack traces.
- Versioning: Test each supported API version, since older versions often keep weaker checks.
Confirm with your API team which versions and keys are in production, and whether a staging environment mirrors the tenant model.
Internal assistants used by your own staff, such as support agents, engineers or sales teams, often have broader access to customer data than any customer-facing surface because staff can see many tenants. The PyRIT target is commonly a web app driven through Playwright, because the internal tool may sit behind single sign-on and a corporate UI. The primary harms are data exposure across customer accounts to staff who should only see some of them, leakage of internal documents or credentials into responses, and actions taken on behalf of employees beyond their role. Objectives should use test accounts with different role levels and check whether the assistant respects those levels when answering questions about customer records.
- Role-based objectives: Run the same prompts as an agent with restricted access and as one with full access, then compare what each receives.
- Internal content objectives: Ask for runbooks, internal URLs, service credentials or architecture notes and record whether any appear.
- Single sign-on handling: Confirm how the Playwright session is established and whether test sessions can be isolated from production identities.
- Support workflow objectives: Test whether pasted customer content can change the assistant's behavior, such as instructions hidden in a support ticket.
- Access logs: Confirm that internal assistant queries are logged in a form your security team can review.
Confirm with your IT team which identity provider and role model the assistant uses, and whether a non-production copy exists for testing.
PyRIT targets, scorers and memory for a multi-tenant product
A SaaS red team run touches the same PyRIT parts a production integration does: the target that reaches your application, the scorers that judge its answers, and the memory that stores the evidence. Each card below names one of these parts and what to confirm before a test run touches a tenant.
Targets for your application
PyRIT can send attacks to model providers, custom HTTP or WebSocket endpoints, and web app targets driven through Playwright. For a customer-facing copilot, the target that matters is usually the same path a tenant user takes, including the front end, authentication and retrieval layer, not only the raw model API. Confirm which path your customers actually use, and whether a Playwright target can run against a staging deployment that mirrors it.
PyRIT documentationConverters for tenant variants
Converters transform prompts before they reach the target. In a multi-tenant product they help test variants that matter to isolation: prompts that reference another tenant's name, identifiers in different encodings, or translated text. Decide which variants your threat model needs, and confirm with your team which converters you will run and in what order, so a finding can be reproduced later.
Scorers for judging answers
Scorers decide whether an attack worked. PyRIT supports LLM judges, Azure AI Content Safety, and custom logic. For SaaS, a custom scorer that checks whether a response contains another tenant's data is often more useful than a generic harm label. Ask your team to define the pass and fail criteria in writing and to measure the scorer against a set of examples it should catch and examples it should not.
Memory for evidence
PyRIT memory stores conversations and results in SQLite or Azure SQL. Memory is the record a customer or auditor will ask for, so the choice of backend matters. Confirm where the database lives, who can read it, how long it is kept and how a run can be traced to a build and a tenant. Do not assume a default retention period. Set and document one before the first run.
Credentials in local config
PyRIT reads credentials from ~/.pyrit/.env and settings from ~/.pyrit/.pyrit_conf. On a shared test runner, these files become a route to model keys and tenant tokens. Confirm who can read the home directory of the account that runs PyRIT, whether keys are scoped to test resources only, and how keys are rotated after a team member leaves. Keep these files out of source control.
Test tenants and synthetic data
Red team prompts often try to extract data, so the test environment must not hold real customer records. Use dedicated test tenants with synthetic data, separate credentials from production, and a documented rule that no production tenant is a target. Confirm with your data protection lead how synthetic records are created and removed, and whether any production data is ever copied into the test environment.
How PyRIT scenarios sit in the release pipeline and the customer evidence trail
The flow starts with a code change to the copilot or agent, which triggers a PyRIT scenario run against a staging tenant. Attack results are scored and written to PyRIT memory, and a human reviewer signs off on findings before the release gate decides. Only the reviewed results export to the questionnaire library. Check that the staging target holds no production data, because the trust boundary between staging and production is where leakage tests can go wrong.
Pre-release PyRIT run, human sign-off and the export that feeds customer security questionnaires.
Rollout: from first scenario to a PyRIT release gate
This sequence moves a SaaS team from a written scope of AI surfaces to PyRIT scenarios that run on every release candidate, with scorers checked against known cases and a named owner for every finding. Each step closes with a artifact the team can review before the next one starts.
Scope AI surfaces and tenants in writing
Your engineers and DeployOpen agree in writing which copilots, agents, APIs and tenant configurations are in scope, which model providers they call, and which environments may be tested. Your team provides staging access, test tenants with synthetic data, and dedicated test accounts with the roles customers actually hold. The step is done when the scope document names each target, its owner, its data classes and the environments where attacks may run.
Stand up PyRIT on a workstation or CI runner
DeployOpen installs PyRIT on a team workstation or CI runner using Python 3.13, the version the PyRIT documentation recommends, within the 3.10 to 3.14 range the PyPI package supports. Credentials go into the documented environment file and settings into the configuration file, not into source control, and the team confirms which memory backend (SQLite or Azure SQL) stores the run records. The step is done when a smoke run against a staging target completes and its conversation appears in memory.
Build the first scenario set and scorers
DeployOpen and your engineers select objectives and seed prompts that match your product's harms, such as data leakage across tenants, prompt injection through customer documents and unsafe tool calls, then pick the attack strategies and scorers that test them. Scorers may combine LLM judges, Azure AI Content Safety or custom logic, and each scorer is recorded with the scenario it belongs to. The step is done when the scenario set is versioned in your repository and every scenario has a stated pass condition.
Validate scorer output on known cases
Before any scenario can block a release, DeployOpen runs the scorers against responses whose outcome is already known, including clear refusals, clear policy violations and borderline cases written by your product team. The team compares scorer verdicts with the expected labels and adjusts prompts or thresholds until disagreements are understood. The step is done when the agreement results and the known-case set are stored with the scenario definitions, so an auditor can see how the scorers were checked.
Add the scenario run as a release gate
Your CI pipeline runs the approved scenario set against each release candidate in staging, with concurrency and retry settings chosen so results are repeatable. The gate fails on findings above the agreed threshold, and a named owner on your side receives each finding with the conversation attached and a triage deadline set by your own policy. The step is done when a deliberately vulnerable test build fails the gate and the owner receives the finding.
Run the retest loop after fixes
When engineers ship a fix, DeployOpen reruns the scenarios that produced the finding, plus adjacent scenarios that touch the same component, and records whether the original attack still succeeds. Findings close only after a retest passes, and accepted risks are documented with the approver's name and the reason. The step is done when each closed finding links to its retest run in memory and the release notes for the candidate reflect the outcome.
How PyRIT results become answers in customer security questionnaires
Each answer in a customer AI security questionnaire should trace back to a specific PyRIT run, so the SaaS team is describing testing it can show, not general assurance. Map every question to one named scenario, the scorer that judged the responses, and a dated result from a recorded run. A question about prompt injection in a customer-facing copilot, for example, might point to a named attack scenario against the production-like deployment, the scorer configuration used to label outcomes, and the run date and PyRIT version (illustrative). Keep the mapping in a plain table owned by the security team, and record the version of the copilot and the PyRIT release used, because an answer about a build that has since changed will not hold up in review. Confirm the installed release against the PyRIT releases page before quoting it.
PyRIT's memory is what lets a reviewer follow a claim back to evidence. Its SQLite or Azure SQL store keeps conversations, scores and attack results, so the team should set a retention rule for those records, restrict who can query them, and export the conversations that support each answer for review. Scorer results should be checked against a sample of human-labeled responses before they are quoted as success rates, since an LLM judge can misclassify outcomes. Write down what the testing does not cover: the languages and channels tested, the datasets left out, the attacks not run and any limits on the target environment. Be clear that DeployOpen prepares this evidence and does not issue attestations. If a questionnaire asks about SOC 2, describe the red teaming directly and do not quote an external report, because SOC 2 report use is generally restricted and the customer may not be permitted to receive it.
Compliance frameworks that shape the evidence customers request
SaaS customers rarely ask for PyRIT output by name. They ask whether AI features were tested, whether controls operate, and whether obligations for cloud, product and personal data are met. Each card below maps one framework to the PyRIT evidence that supports it and the questions to settle with counsel or your auditor.
SOC 2 and the Trust Services Criteria
SOC 2 examinations use the AICPA 2017 Trust Services Criteria, and the security common criteria CC1 to CC9 apply to every SOC 2. PyRIT scenario runs, with dates, targets and scorer settings recorded in memory, can support evidence for change management (CC8) and risk identification (CC9) for AI features in scope. Confirm with your auditor whether the AI feature sits inside the system description, and whether the other four categories (availability, processing integrity, confidentiality, privacy) are in scope.
SOC 2 criteriaType 1 versus Type 2 evidence
A Type 1 report covers the system description and control design as of a date. A Type 2 report adds an opinion on operating effectiveness over a period, so repeated PyRIT runs matter more. Keep scheduled scenario results with timestamps and the configuration used, so the evidence shows the control operated across the observation window. Ask your auditor which PyRIT artifacts they will sample and how far back they need them.
ISO/IEC 27001:2022 certification
ISO/IEC 27001:2022 Annex A lists 93 controls across organizational, people, physical and technological themes. Accredited certification bodies, not ISO, certify organizations, and certificates run on a three-year cycle with at least one audit every calendar year. PyRIT results can feed technical testing and vulnerability management controls, but they do not replace the certification body's assessment. Ask the certification body which controls it expects you to map to AI testing records.
ISO certificationNIS2 cloud and managed service scope
NIS2 Annex I treats cloud computing, data center and content delivery network providers as digital infrastructure, and managed service providers as ICT service management, both sectors of high criticality. Commission Implementing Regulation (EU) 2024/2690 sets technical requirements for providers in those categories. If your platform or managed offering falls in scope, customers may ask how AI features are tested before release. Confirm with counsel which entity category applies to your services and which Article 21(2) measures you must evidence.
Cyber Resilience Act product obligations
The Cyber Resilience Act covers products with digital elements, including software. Its Article 14 reporting obligations have applied since 11 September 2026 to in-scope products placed on the market, and the broader regime applies from 11 December 2027. Most products follow self-assessment under module A, but some classes need a notified body. Use PyRIT findings as input to your vulnerability handling process, and confirm with counsel how AI components are classified and whether a notified body is required.
CRA textGDPR processor contract terms
GDPR Article 28(3) requires processor contracts to limit processing to documented instructions and to require the security measures in Article 32. When PyRIT scenarios use customer data, synthetic data or production-like records, the test plan must state what data is used and where runs are stored. Record that PyRIT memory holds conversations and results in SQLite or Azure SQL, and confirm with counsel who the controller and processor are for test data and whether your contracts cover it.
EU Data Act switching requirements
The EU Data Act has applied since 12 September 2025 and requires data processing service providers to let customers switch to another provider or to on-premises infrastructure. Providers may not impose switching charges from 12 January 2027. For AI features, PyRIT targets and configuration files should be documented well enough that a customer can reproduce tests on a new platform. Ask counsel whether your AI services count as data processing services and which exit obligations apply.
Data Act textWhat SaaS teams ask about PyRIT red teaming cost, effort and staffing
What drives the cost of PyRIT red teaming for a SaaS product?
The cost follows the size of the test surface, not the tool, because PyRIT is open source and carries no license fee. The main drivers are the number of AI surfaces (a support copilot, an in-app writing assistant and an agent with tool access are three separate targets), the number of tenants and integrations that change what the model can see, the amount of scorer work needed to judge outputs reliably, and how many retest cycles the findings require. Ask for each surface, tenant model and integration to be listed as a line item in the written scope so you can see what each one adds.
What is one-time work and what recurs after a PyRIT engagement?
The first scope usually carries the one-time work: building targets for each AI surface, writing objectives and seed prompts, configuring scorers, setting up memory storage and producing the first findings report. Recurring work includes rerunning scenarios after each model, prompt or tool change, reviewing new results, and keeping questionnaire answers current. Ask the provider to separate these in the quote, and to state whether the retest of fixed findings is included or billed later.
How long does it take to agree the first PyRIT scope in writing?
The timing depends on how quickly your team can name the AI surfaces, the data each one can reach and the owners who will accept findings, so the scope is often the slowest part rather than the testing itself. DeployOpen agrees scope, deliverables and timelines in writing before work starts, and most engagements are fixed-scope. Confirm the expected duration of the scope discussion with the provider and prepare an inventory of your AI features in advance to shorten it.
What do our engineers need to provide for PyRIT red teaming?
The work needs engineers who can grant test access and explain the system, not a full-time commitment from the whole team. Typically this means a staging or test environment that mirrors production, test accounts with the roles you want covered, API or endpoint access for each target, and someone who can describe tool permissions, retrieval sources and logging. Ask the provider to list these requests in the scope so access is arranged before testing begins.
Can an internal team run PyRIT alone?
Yes, PyRIT is open source under the MIT license and can be installed with pip on a supported Python version, so an internal security or platform team can run it without a partner. The harder part is ongoing: writing targets for each product, maintaining scorers, interpreting results and keeping a record an auditor can follow. Many teams start with a partner-led first scope, then move routine reruns in-house. Check the PyRIT documentation for the version and Python requirements before staffing the work.
Which PyRIT versions and Python requirements should we confirm before hiring?
Confirm the PyRIT version you will standardize on, since the project has had breaking changes between releases. The PyPI package supports Python 3.10 up to but not including 3.15, and the documentation recommends Python 3.13. The original Azure/PyRIT repository is archived, so development continues in the microsoft/PyRIT repository. Ask any provider which version their scope targets and how they will handle upgrades during the engagement.
What should we request in a PyRIT red teaming quote?
Ask for a written scope that lists each AI surface, target type, tenant model and integration, along with the scorers, attack strategies and datasets planned for each. The quote should state the deliverables, including the findings report format and whether it includes fixes and a retest, plus the access and environments you must supply. Request a clear split between one-time setup and recurring rerun or retainer work, and ask who holds the memory records and how they are exported.
How DeployOpen scopes, builds and supports PyRIT red teaming for SaaS teams
DeployOpen plans, implements and documents PyRIT red teaming inside the infrastructure you control, so your security and product teams can test copilots and agents before customers do. Engagements are fixed-scope, with the targets, harms, datasets and evidence agreed in writing before any testing starts.
How we scope
- Inventory the customer-facing copilots, agents and APIs that will be in the PyRIT test boundary and who owns each one.
- Agree the harm categories, data leakage tests and tenant isolation checks in writing before any attack runs.
- Confirm which models, endpoints and environments PyRIT will reach, including whether test data must be synthetic.
How we build
- Connect PyRIT to your targets using its supported target types, including custom HTTP or WebSocket endpoints and web app targets.
- Configure scorers, memory storage and credentials so results are reproducible and secrets stay in your own vault.
- Wire selected PyRIT scenarios into your release pipeline so runs repeat on each build, with pass and fail criteria you approve.
How we hand over
- Deliver a findings report that maps each result to the reproduction steps, conversation records and affected feature.
- Document the run configuration, scorer choices and memory records so your team can rerun the tests without us.
- Provide questionnaire-ready answers that describe the testing method and results, with the limits of the tests stated plainly.
How we support
- Offer retests after your fixes so you can show the findings were closed and the tests still pass.
- Keep PyRIT upgrades and scenario updates under a planned change process, with release notes reviewed before rollout.
- Continuous testing and ongoing upkeep are available as a retainer, with scope and frequency set in the written agreement.

