How PyRIT red teaming fits SOC 2 audits of AI products
A SaaS team whose generative AI feature falls inside its next SOC 2 examination needs test evidence that an auditor can trace to controls. PyRIT produces testing records, not the opinion. SOC 2 examinations are measured against the AICPA's 2017 Trust Services Criteria, in the version with revised points of focus published in 2022. The security common criteria, CC1 to CC9, apply to every SOC 2 report, so the AI feature is assessed through the same control environment as the rest of the product. Whether the report is Type 1 or Type 2, the service auditor forms the opinion, and management's written representations, not a PyRIT run, are what stand behind the description of the system.
PyRIT helps most with the criteria on change management (CC8), risk mitigation (CC9) and some logical access questions (CC6). Pre-release scan runs, with scenario configurations and scorer identities recorded in memory, can support evidence that changes to prompts, models and guardrails were tested before deployment. Findings logged with owners and closure dates support the risk mitigation criteria. Access to the memory database and to harmful output supports logical access controls. PyRIT does not address availability, processing integrity, confidentiality or privacy criteria on its own, and it does not show that a control operated over a period. Confirm with your auditor which criteria are in scope before designing the test program, because the category choice determines what evidence is needed.
Which SOC 2 criteria PyRIT evidence can support
This table maps the SOC 2 common criteria most often touched by AI red teaming to the PyRIT capabilities that can generate evidence for each, and the configuration each one needs. Read it as a starting map for your assessor conversation, not a list of requirements, since the AICPA 2017 Trust Services Criteria describe the criteria and their points of focus are optional guidance. A PyRIT run supports a criterion only when the surrounding process, ownership and retention are in place.
| Criterion | PyRIT capability | Configuration needed |
|---|---|---|
| CC3, risk assessment | Scenario runs with scorer results mapped to the harm categories in your risk register | Documented harm list, versioned scenario configs, and a named owner who reviews each run's findings |
| CC6, logical access | CoPyRIT access controls and the memory database holding red team conversations | Group-based access for CoPyRIT, restricted read access to the SQLite or Azure SQL memory store, and access reviews |
| CC7, system operations | pyrit_scan runs against the production-like target to detect unsafe model or app behavior | Scheduled or pipeline-triggered scans, logged run identifiers, and a defined escalation path for failed scans |
| CC8, change management | Pre-release scans tied to model, prompt or configuration changes in the product | Release gate that requires a passing scan record, with the target version and PyRIT version stored with each run |
| CC9, risk mitigation | Finding records showing how each failed attack was fixed and retested | Tracking of finding IDs to closure, with a retest run linked to each fix and approval recorded |
| Evidence integrity | Memory records of conversations, scorer identities and labels | Retention of scorer configuration, PyRIT version and environment settings from the ~/.pyrit/.pyrit_conf file, stored under change control |
| Credential handling | Targets authenticate with keys read from ~/.pyrit/.env | Secrets kept in a managed vault instead of plain files, with access limited to the test operators |
Why a PyRIT run is not a SOC 2 report
A PyRIT run is not a SOC 2 report, and it cannot become one. A SOC 2 report is issued by a CPA firm after an examination of the service organization's system, and the examination is an assertion-based engagement under AT-C section 205 of the AICPA attestation standards. That standard requires the service auditor to obtain written representations from management, so the company's leadership asserts, in writing, what the system does and what its controls achieve. A red team scan produces test evidence that can support those assertions, but it is not itself an assertion or an opinion. Before your audit window opens, confirm with your auditor which report type they expect and how they will use scan output.
The two report types ask different questions. A Type 1 report covers the system description and the suitability of control design as of a specific date. A Type 2 report adds an opinion on operating effectiveness over a period, so the auditor needs evidence that the control ran consistently across the whole window. A single PyRIT assessment before a release fits neither type on its own. It shows that a test was run at one point in time, against one configuration. If your AI features change between tests, the auditor will ask what the testing covered during the period and how each result connects to a change in the system. Agree on the testing cadence and the test scope with the auditor early, not at the end of the period.
The system description is the other fixed reference point. Management prepares the description of the system and the auditor evaluates it against the AICPA 2018 description criteria, known as DC 200, with revised implementation guidance issued in 2022. The description should state which AI features, models and third-party AI providers are in scope, and how PyRIT testing is part of the change and release controls. Treat each PyRIT run as one input management can point to. The auditor decides whether the combined evidence, including tickets, approvals, retest records and access logs, is sufficient for the criteria in scope.
Building a pre-release PyRIT test gate for AI features
This sequence turns PyRIT red teaming into a repeatable release check that blocks or flags changes to an AI feature, and it leaves a run record that ties each result to the change that produced it. Auditors can then trace a finding from the test run to the release decision.
Define the AI feature and its system boundary
The product owner and security lead write down which AI feature is under test, which models, prompts, retrieval sources, tools and endpoints it touches, and which customer data can reach it. Engineering confirms the boundary against the architecture diagram and the list of model providers in use. The step is done when the boundary document is approved and stored with the release record, so an auditor can see what the test covered and what it left out.
Set attack objectives and scenarios
The security team selects the harm categories, attack objectives and PyRIT scenarios that match the feature and the risks listed in the boundary document. They record which datasets and seed prompts are used, and why, so the scope is explicit. Where a scenario does not apply, the reason is written down. The output is a versioned scenario configuration file that is reviewed and approved before any run starts.
Pin the PyRIT version and build a controlled environment
Engineering installs a pinned PyRIT release from PyPI into a dedicated, locked environment, such as a container image or virtual environment built from a fixed requirements file. PyRIT v1.1.0 was released on 4 September 2026, and the package metadata fixes the supported Python range, which covers Python 3.10 up to but not including 3.15, with the documentation recommending Python 3.13. Credentials are kept out of the repository. The check is a recorded hash or version string for the environment, stored with the run.
Run the attacks and capture memory
The security engineer runs the approved scenario from the controlled environment, using the target endpoints for the staging build of the feature. PyRIT memory records conversations and results in SQLite or Azure SQL, so the memory database location and the run identifier are saved with the run. The step closes when the run completes and the memory export is stored in an access-restricted location, with the test target identified by build number.
Record scorer identities and results
Each scorer used in the run is recorded by name, version or model identifier, and configuration, whether it is an LLM judge, Azure AI Content Safety or custom logic. Scorer identity matters because a result cannot be repeated or challenged without it. The security lead reviews a sample of scored responses to confirm the scorers behave as expected. The output is a results summary that lists each objective, its outcome and the scorer that produced it.
Block or flag the release on findings
The release owner applies a written rule that defines which results block a release and which are flagged for risk acceptance, such as a successful attack in a high-severity category. Blocked changes stay out of production until a fix is retested. Accepted risks are signed by a named owner with an expiry for review. The step is complete when the gate decision, the rule applied and the approver are recorded in the release system.
Tie the run to the change ticket
The run identifier, scenario version, PyRIT version, scorer identities, build number and gate decision are attached to the change ticket that authorized the release. Any later fix links back to the original finding and the retest run. Auditors sampling changes under the change management criteria can then follow a release from request to test evidence to approval. The check is that a reviewer can open the ticket and reach the memory export and results without asking the team for additional material.
Tracking PyRIT findings to closure under change management
A SOC 2 auditor will ask whether each AI red team finding was logged, fixed through a controlled change, retested and closed or formally accepted. The four practices below connect PyRIT output to the change and risk records your SOC 2 evidence already depends on. PyRIT produces results and memory, but the workflow that moves a finding to closure lives in your ticketing and change systems.
Log each finding with severity and owner
Every PyRIT finding needs its own record with a severity rating, a named owner, the scenario and scorer that flagged it, and a link to the conversation in PyRIT memory. Record the target version and configuration at the time of the run so the finding can be reproduced. PyRIT does not assign owners or severity for you. Agree on a severity scale before the first run, and check that the record names who is accountable for fixing the issue, not only who ran the scan.
Link fixes to tickets and pull requests
Under CC8, which covers change management, a fix to a model prompt, guardrail, system prompt or application code should trace to a ticket and a reviewed pull request. Auditors sample changes and ask whether the change was authorized, tested and approved before release. Include the finding identifier in the ticket title and the commit message so the chain runs from the red team result to the deployed change. Confirm that your deployment pipeline records who approved each release.
Retest the same objective after the fix
Closing a finding requires evidence that the fix worked. Rerun the same objective, seed prompts, converters and scorer configuration that produced the original result, and record the new scenario run as a separate entry. Compare against the baseline run rather than relying on a single passing attempt, because multi-turn strategies vary between runs. Keep the original failing run in memory so the auditor can see both states of the finding.
PyRIT documentationRecord accepted risk with approval
Some findings will not be fixed before release. Record each accepted risk with a written rationale, the compensating controls in place, an expiry or review date, and sign-off from the person with authority to accept risk for the product. Under CC9, which covers risk mitigation, auditors expect accepted risks to be visible and reviewed, not silently deferred. Do not let a PyRIT scan result stay open indefinitely because no one owns the decision to accept it.
Controlling access to red team data and harmful outputs
With SQLite memory, PyRIT writes conversations and scores to a local database file on one machine. Access is controlled by the operating system account that runs PyRIT and by file permissions on the database and the ~/.pyrit/ directory, which holds .env credentials and .pyrit_conf settings. There is no separate application login, so the evidence for logical access (CC6.1 and CC6.2) comes from the workstation's own controls.
- Operating system accounts: Document which named user accounts can read the database file, and remove shared or generic logins from the machine.
- Credential files: Keep
~/.pyrit/.envout of backups, synced folders and screenshots, and store API keys in a managed secret store where possible. - Disk encryption: Confirm full-disk encryption is enabled and recorded in the endpoint inventory, since copies of harmful outputs sit in plain database files.
- Copies and exports: Restrict exported conversations and reports to approved review folders, and log where they are sent.
- Retirement: Delete or securely wipe the database when a test cycle ends, and record the deletion.
Confirm with your security team whether the workstation falls inside the SOC 2 system boundary, and whether your endpoint management tool can produce access and encryption reports for the audit period.
When several testers share results, PyRIT memory can point to Azure SQL. Access now depends on database authentication, network reachability and role assignments in your Azure tenant, so the evidence moves from workstation controls to cloud identity and database administration records. Your platform team owns most of these controls, and the auditor will test them as a shared service.
- Identity-based access: Grant database roles to named groups, not individual accounts, and review membership on a set schedule (CC6.2 and CC6.3).
- Network restriction: Limit the server to private endpoints or approved address ranges, and record the firewall configuration as part of the system description.
- Separation of duties: Keep the people who run attacks distinct from those who approve closure of findings, where your policy requires it.
- Audit logging: Turn on auditing for database sign-ins and schema or data changes, and send logs to a store the testers cannot edit.
- Harmful content in tables: Limit read access to conversation text and scores to the red team group, and mask or exclude raw prompts from broader reporting views.
Confirm with your cloud team which Azure SQL authentication methods your configuration supports, how long audit logs are retained, and whether they meet the period your auditor will sample.
CoPyRIT is the web GUI for human-led red teaming and team collaboration. Deployed with Entra ID sign-in and group-based access, it gives the clearest logical access story for SOC 2 because authentication, authorization and sign-in history sit in one identity provider. Separate team instances can keep one group's results away from another's.
- Group-based roles: Map Entra ID security groups to CoPyRIT roles, such as tester, reviewer and administrator, and document the mapping as a control.
- Joiner and leaver process: Tie group membership to HR or access request workflows, and show removal within the defined period for leavers.
- Conditional access: Require multifactor authentication and managed devices for anyone who can view harmful outputs.
- Instance separation: Run separate instances for teams with different data sensitivity or customer scope, so access reviews stay simple.
- Sign-in and change logs: Retain Entra ID sign-in logs and application logs for the audit period, and confirm who can change group mappings.
Confirm with the deployment owner whether your CoPyRIT version and hosting setup support these role mappings and log exports as you have described them, and check the current PyRIT documentation for supported configuration.
How PyRIT runs, memory and tickets connect to audit evidence
The flow starts with an approved change request that triggers a PyRIT run against a staging copy of the AI feature. Targets, converters, scorers and attacks produce results that are written to PyRIT memory, which is stored in SQLite or Azure SQL and kept inside the restricted red team store. Confirmed findings move to tickets, and each fix is followed by a retest run. The evidence folder that the auditor reviews should contain references to memory records, not raw harmful transcripts, so check that access to the restricted store is logged.
PyRIT runs, memory, tickets and the auditor evidence folder across trust boundaries.
Evidence to retain for the SOC 2 auditor
A SOC 2 auditor will want to trace a PyRIT result from the release it tested back to the configuration, the scorer and the ticket that closed it. The cards below cover the records that make that trace possible, and the retention decisions your organization must make for each one.
Memory database exports
PyRIT stores conversations and results in SQLite or Azure SQL, and that memory is the primary record of what each attack sent and what the target returned. Export a copy at the end of each test cycle and store it under the same access controls as the source. Check that the export still opens and returns the conversations for a sampled run, because an unreadable export is no evidence at all.
PyRIT docsScenario configurations
Keep the scenario files, attack settings, target definitions and objective datasets used for each run under version control. An auditor asks whether the tests covered the functions described in the system description, and the configuration answers that question. Record which configuration produced which results so a retest can be compared against the original run.
PyRIT version and dependencies
Record the PyRIT version, the Python interpreter version and the pinned dependency set for every run. PyPI supports Python 3.10 up to but not including 3.15, and the documentation recommends Python 3.13, so state which interpreter your team used. Changes between releases can alter scoring or attack behavior, so the version record explains why results from different periods may not be directly comparable.
- Supported Python range
- 3.10 to 3.15
Scorer identities and labels
Each result depends on the scorer that judged it, whether an LLM judge, Azure AI Content Safety or custom logic. Record the scorer name, its model or service version and its configuration alongside each verdict, plus any labels or operation tags applied to the run. Without these, an auditor cannot tell whether a pass reflects the product's behavior or a change in the judge.
Run dates tied to releases
Tie every PyRIT run to the release of the AI feature it tested, using the release identifier, the deployment date and the run timestamp. SOC 2 Type 2 reports cover operation over a period, so the auditor will check that testing happened before releases in the period, not only at the start. Confirm with your auditor how many test dates they expect to see for the audit window.
Finding tickets and retest results
Link each finding to a ticket that records severity, owner, fix, the change that closed it and the retest run that confirmed the fix. This chain shows that findings were tracked to closure, which is the control most often questioned in practice. Keep retest results in the same record so the closure claim can be checked without reconstructing it from chat logs.
Retention periods
PyRIT does not set retention periods for the records it produces, so your organization must define them. Confirm the period for each artifact against your own policy and your auditor's expectations for the audit window, and check that harmful content in memory is covered by the access restrictions that apply to it. Document the schedule and the deletion process together so disposal is provable.
Questions buyers ask about PyRIT and SOC 2 evidence
Does PyRIT alone satisfy a SOC 2 audit?
No. PyRIT produces test results, but a SOC 2 examination assesses your whole system against the AICPA 2017 Trust Services Criteria, including the common criteria CC1 to CC9 that apply to every SOC 2. PyRIT can supply evidence for controls around change management, risk identification and testing before releases, but the auditor also needs a system description, control design, ticketing history, access reviews and, for a Type 2 report, evidence that controls operated over a period. Ask your auditor which controls they will test and map PyRIT outputs to those specific controls before deciding what the scans prove.
What drives the scope and effort of a PyRIT SOC 2 engagement?
The main driver is the system boundary: which products, environments and AI features fall inside the report. Effort rises with the number of AI features, the types of targets PyRIT must reach (hosted model APIs, custom HTTP or WebSocket endpoints, or web chat interfaces driven through Playwright), and the number of scorers and harm categories your controls need to cover. The access model matters too, because red team data contains harmful content and needs role-based restrictions, retention rules and logging. Ask any partner to put the boundary, target list, scorer choices and access design in writing before quoting.
How long does setting up PyRIT for SOC 2 evidence take?
The duration depends on scope, so no fixed figure applies. A single product with one model integration and a small set of scorers is a different job from a multi-product platform with several AI features, multiple environments and an existing ticketing process that must link to findings. Setup time is shaped by target connectivity, credential handling through configuration files or a secrets manager, agreeing the test cadence before releases, and the time your auditor needs to review the design. Request a timeline in the written scope that lists these dependencies separately.
What must our team provide for a PyRIT SOC 2 engagement?
You need to provide a named owner for each system in the boundary, an auditor contact who can confirm which criteria and evidence they expect, access to the non-production and production-like environments PyRIT will test, and the ticketing system where findings will be tracked to closure. You should also supply the list of AI features, the model providers in use and the policies that govern data retention and access to red team outputs. Engineers need test credentials stored under your own controls, not in shared files. Confirm each item before work starts, because gaps here usually delay the evidence rather than the testing.
Can our own security team run PyRIT for SOC 2 without a partner?
Yes, many teams can run PyRIT internally, since it is an open source Python framework that installs with pip and supports Python 3.10 up to but not including 3.15, with the documentation recommending Python 3.13. The harder part is usually not the tool but the evidence discipline: defining the scope, documenting scorer choices, restricting access to harmful outputs, linking findings to tickets and retesting after fixes, all in a way an auditor can follow across the audit period. Assess whether your team has the time and the independence the auditor expects, and whether the same people who build the AI feature will also judge its test results.
What does a SOC 2 Type 2 period require operationally for PyRIT?
A Type 2 report covers a period, so the controls must operate consistently across it, not only on a single date. In practice this means running PyRIT assessments on a defined cadence and before releases, recording the scenario configuration, PyRIT version and scorer identity for each run, tracking every finding to closure with a retest, and reviewing who can access the memory database and stored conversations. Keep the records the auditor will sample, such as run logs, approval records and access reviews. Agree the cadence and evidence list with your auditor at the start of the period, because gaps in one month can weaken the whole report.
Does DeployOpen issue a SOC 2 report for our AI product?
No. A SOC 2 report is issued by an independent CPA firm after its examination. DeployOpen plans and runs security testing of AI systems and agents, and prepares systems, controls and evidence for compliance assessments, so your auditor has what they need to examine. DeployOpen does not issue audit reports, attestations or certifications. Ask your auditor to confirm in advance which evidence they will accept and in what format, and ask any partner to state in writing which parts of the evidence it prepares and which parts remain with your own team and the auditor.
How DeployOpen prepares PyRIT evidence for SOC 2 reviews
DeployOpen plans, runs and documents PyRIT red teaming for SOC 2 audits of AI products inside your own infrastructure, so the results can be reviewed alongside your control descriptions and access records. We prepare the testing and the evidence; the independent auditor decides what the evidence proves.
How we scope
- Written scope agreed before work starts, naming the AI features, endpoints and release points to be tested
- Mapping of each planned test to the SOC 2 criteria your auditor has agreed to examine for the system
- Agreement on which PyRIT datasets, scorers and scenarios apply to your product and which harms are excluded
How we build
- PyRIT configured in your environment with credentials kept in your secrets store, not in project files
- Pre-release test runs wired into your change process, with stored scenario configurations and versions
- Memory database set up with restricted access and labels that tie each result to a build and a scorer
How we hand over
- Findings register tracking each issue from discovery through fix, owner and retest to documented closure
- Written procedure for running, reviewing and retaining red team records, ready for your auditor's walkthrough
- Handover session with your security and compliance staff covering how to rerun tests and read the outputs
How we support
- Ongoing support, upgrades and continuous testing available as a retainer after the initial handover
- Help keeping PyRIT upgrades, scorer changes and test scope aligned with your system description over time
- Retesting of closed findings and preparation of updated evidence for each audit period you schedule

