Which PyRIT memory records an auditor can follow
PyRIT memory can serve as audit evidence, but only when your team adds retention, access and version records around it. PyRIT stores conversations and results in SQLite or Azure SQL, which gives you the raw record of what was sent to a target and what came back. It does not, on its own, tell an auditor which PyRIT release produced the run, which scenario configuration was used, who had access to the output, or how long the records must be kept. This section covers the memory records an auditor will ask to follow, and it applies to work mapped to the EU AI Act, NIST AI RMF, ISO/IEC 42001 and SOC 2. None of these frameworks is claimed here as a certification. DeployOpen prepares systems, controls and evidence for assessments, but independent auditors and certification bodies issue the opinions.
Start by deciding which database backs your memory and confirm where it lives. Record the database type (SQLite file or Azure SQL), its location, its backup method and who administers it. Keep the PyRIT settings that point to it, typically in ~/.pyrit/.pyrit_conf, under the same change control as the test scenarios. Then pin the exact PyRIT version in your environment file or lock file, since the 1.1.0 release and earlier versions can differ in how they structure stored results. Export a copy of the scenario configuration for each run, including the target identity, scorer identities and labels applied to each operation. An auditor who sees a finding in memory will want to trace it back to the target version, the scorer that judged it and the person who launched the run. Confirm with your team that these identities are stable across reruns, because a changed scorer name or unrecorded target update breaks that trace.
Mapping audit questions to PyRIT memory fields and configuration
This table pairs each question an auditor typically asks about a PyRIT assessment with the memory field, configuration file or process that answers it. Read each row as a checklist item: the middle column names where the evidence lives, and the last column names what your team must set up or confirm in its own environment.
| Audit question | Where PyRIT holds the answer | Configuration or step needed |
|---|---|---|
| What was tested? | Conversations and attack results stored in PyRIT memory, which uses SQLite or Azure SQL | Choose the memory backend deliberately and export a dated copy of the database after each scan |
| Which target was tested? | Target identity recorded alongside the conversations in memory | Record target endpoint, model name and deployment in your own run log, and confirm which target fields memory captures in your version |
| Which PyRIT version ran the test? | Version of the installed package, which the memory record may not capture automatically | Pin the version in your environment and store it with each run. Confirm the release used, for example v1.1.0 released 4 September 2026 |
| Which configuration and credentials were used? | Settings in ~/.pyrit/.pyrit_conf and credentials in ~/.pyrit/.env | Keep the configuration under version control, exclude the .env file from evidence exports, and record the configuration hash per run |
| Who or what scored the results? | Scorer identity recorded in memory, which can be an LLM judge, Azure AI Content Safety or custom logic | Name each scorer and its model or service version in the test plan. Confirm which scorer metadata your memory schema stores |
| Who can see harmful outputs? | Stored prompts and responses in the memory database, which may contain harmful content | Restrict file system and database permissions to named reviewers. Confirm how your team controls access to the SQLite file or Azure SQL database |
| How long are records kept? | Memory persists until someone deletes or archives it | Set a documented retention period and a deletion procedure. Confirm your retention schedule with your compliance owner, as PyRIT does not set one |
| Were findings labeled and tracked? | Labels and operation names stored with results, as supported by your PyRIT version | Apply consistent labels at run time and confirm which labels persist in memory before relying on them as evidence |
What to retain from PyRIT for auditors
An auditor can only trace a PyRIT finding back to its source if the run leaves a complete, unchanged trail. The six items below connect the stored data, the code that produced it, and the people and scorers who judged it. Store each one at the moment the run finishes, not when the audit starts.
Memory database and backups
The memory store holds every conversation, prompt, response and score PyRIT recorded, and it is the primary record an auditor will query. Keep a copy of the SQLite file or Azure SQL export taken immediately after the run, and record its checksum. Confirm with your team whether the store contains harmful model output and who may open it. Test restoring a backup to a separate host so you know the copy is readable.
PyRIT documentationScenario and run configuration files
The scenario definition, target settings, converter chain, attack strategy and scorer selection determine what was tested. Save the exact configuration files used for each run, including any .pyrit_conf settings, and keep them with the run identifier. Remove credentials before storage and keep them in your secrets manager instead. Without these files, an auditor cannot tell whether two runs tested the same thing.
PyRIT version and dependency pins
Results depend on the PyRIT release and its packages, so record the exact version and a lock file for every run. PyPI lists support for Python 3.10 up to but not including 3.15, and the documentation recommends Python 3.13. The v1.1.0 release arrived on 4 September 2026, so runs before and after that date may differ. Store the lock file alongside the memory export.
PyPI packageLabels and operation identifiers
Labels tie each conversation to a business purpose, a system under test and a test cycle, which is how an auditor matches results to a release or control. Define a naming standard before the first run, such as one operation identifier per assessment and one label set per target. Changing labels after the fact breaks the link, so record any corrections as new entries with a reason.
Scorer identities and configuration
A score only means something alongside the scorer that produced it. Record the scorer class, the model or service behind it, its version or deployment name, and the prompt or threshold it used. Scorers from different vendors or prompt revisions can disagree, so an auditor will ask how accuracy was measured. Store scorer settings with the run so a rescoring can be reproduced later.
Exported conversation reviews
Human reviewers decide whether flagged output is a real failure, and that decision is evidence in its own right. Export the reviewed conversations with reviewer name, date, decision and rationale, and store them in a restricted location. Because exports contain harmful content, limit access to named reviewers and set a retention period agreed with your compliance team. Hash each export so later edits are visible.
How to restrict access to harmful content in PyRIT memory
PyRIT memory holds the raw prompts and model responses from every attack, and some of that text will be harmful by design. Access to the memory store should therefore be limited to a named list of reviewers, and that list should be written down before the first scan runs. For a SQLite deployment, the database file is the primary control: restrict it with operating system file permissions so that only the service account that runs PyRIT and the named reviewers can read it, and keep it off shared drives and out of general backup sets that many staff can open. PyRIT reads its credentials from ~/.pyrit/.env and its settings from ~/.pyrit/.pyrit_conf, so those files and the home directories holding them also need the same restriction, since they reveal how the memory is reached.
For Azure SQL, file permissions do not apply, so the controls move to the network and the database roles. Confirm which identities can reach the server through its firewall rules or private network path, and create database roles that separate people who run scans from people who read results. Reviewers who only need scores should not hold rights to the raw conversation tables. Separate CoPyRIT team instances, each with its own memory store, so that one team's harmful test content is not visible to another team that has no need for it. Group-based access in CoPyRIT should map to the same reviewer list you keep for the database, so the two access paths do not drift apart.
Exports are the easiest way for harmful content to leave the controlled store. Log who exported conversations, when, from which store and for what review, and keep that log with the audit evidence rather than in the tool that produced the export. Make exports rare and deliberate, and store any exported file under the same restrictions as the source database. The exact access model, including which roles exist in your identity provider, what the Azure SQL network settings are and whether your CoPyRIT deployment supports the grouping you need, must be confirmed in your own environment. DeployOpen designs the access model during setup, so the reviewer list, roles, file permissions and export logging are settled and documented before evidence collection begins.
Configuring PyRIT memory for an evidence trail
This sequence sets up PyRIT so that every run leaves a memory database, a settings record and a set of labels that an auditor can trace back to a fixed version and a known configuration. Each step ends with an artifact the reviewer can open and check.
Pin the PyRIT and Python versions
The platform engineer chooses one PyRIT release and one Python interpreter inside the range the PyPI package supports, which is Python 3.10 up to but not including 3.15. The PyRIT documentation recommends Python 3.13, so record that choice unless you have a documented reason to differ. Save the exact PyRIT version and interpreter path in a lock file or environment manifest kept in version control. Done means a reviewer can rebuild the same environment from that file and see the same version string when running the package.
Select and document the memory backend
The engineer chooses SQLite or Azure SQL as the PyRIT memory backend, since PyRIT stores conversations and results in one of these two. SQLite suits a single controlled workstation or server, while Azure SQL suits a shared, centrally administered store. Record the choice, the database location or connection name and the owner in an architecture note. Confirm with your own security team how the chosen store is backed up and who holds administrative rights, because the auditor will ask. Done means the note names one backend and one database location for each test environment.
Move credentials into a restricted env file
The engineer places API keys and endpoint secrets for each target in the file ~/.pyrit/.env, which PyRIT reads for credentials. Set file permissions so only the service account that runs tests can read the file, and keep the file out of version control and out of shared logs. Store a record of which secret names exist, without values, in the evidence folder. Done means the permission listing for the file shows owner-only access, and the secret inventory lists every target that appears in the scenario configs.
Record settings in the configuration file
The engineer writes the run settings, such as the memory backend, default targets and scorer choices, into ~/.pyrit/.pyrit_conf, which PyRIT uses for its settings. Commit a copy of this file, with secrets removed, to the evidence repository alongside the scenario definitions. Any change to the file is then a reviewable diff. Done means the committed copy matches the file the test runner uses, and the diff history shows who changed each setting and when.
Define labels and operation names before testing
Before the first run, the test lead defines a fixed vocabulary of labels and operation names, such as the system under test, the release identifier, the scenario name and the scorer identity. Write the vocabulary into a controlled list and require every run to use only those values. This lets an auditor query memory later and match each result to a release and a scorer. Done means the list is approved by the test lead, stored with the evidence, and every planned scenario config references its values.
Snapshot the database and configs after each run
After each scenario finishes, the engineer copies the memory database file or exports the Azure SQL data for that run, together with the scenario config, the settings file without secrets and the PyRIT version. Store the snapshot in write-once or versioned storage with a checksum and the run identifier in the file name. Done means each run has a snapshot folder with a checksum file, and a spot check can reopen the database and find the labels that match the run record.
Restrict access to harmful content in memory
Memory holds prompts and model responses that may contain harmful content, so the team limits who can open the database and export files. Grant read access only to the reviewers named in the evidence plan, log exports, and keep a copy of the access list with the snapshots. Confirm with your security and legal teams how harmful content is handled in reports and how long reviewers may keep exports. Done means the access list is recorded, the export log exists, and the reviewer roster matches the list.
Document the retention schedule
The compliance lead writes a retention schedule that states how long memory snapshots, scenario configs, settings files and exports are kept, when each is deleted, and who approves deletion. Set the periods with your legal and compliance owners, because the right periods depend on the regulation and contracts that apply to you. Record the schedule in the evidence index and review it at each planned release. Done means the schedule is approved, each artifact type has a period and an owner, and deletions are logged.
What PyRIT memory does not cover for compliance
PyRIT memory records what was run and what it returned, but it is not a compliance system. The cards below mark the decisions and controls that stay with your organization, so an auditor can see who owns each gap and how it is closed.
Retention periods are yours to set
PyRIT stores conversations and results in SQLite or Azure SQL, but the framework does not enforce how long those records live. Your organization must define retention periods for the memory database, exported conversations and scenario outputs, then apply them through database jobs, storage policies or manual deletion. Confirm in writing who runs the deletion and how it is logged, because an auditor will ask for both.
No audit reports or certifications
A PyRIT memory export shows test activity, but it is not an audit report, attestation or certification. Independent auditors and certification bodies decide whether your controls meet a standard, and they will read the memory records as one input among policies, tickets and approvals. Ask your auditor early which artifacts they accept and in what format.
Scorer accuracy measured by your team
Each memory record stores the identity of the scorer that judged a response, but that label does not show the scorer was correct. Your team needs to test scorers against a labeled sample of responses, record precision and disagreement rates, and keep those results with the scenario evidence. Without this step, a reported attack success rate can rest on an unvalidated judge.
Framework mapping stays with you
PyRIT does not decide which framework controls apply to your system. The mapping from a scenario to an EU AI Act obligation, a NIST AI RMF function, an ISO/IEC 42001 control or a SOC 2 criterion is a decision your compliance lead documents. Keep that mapping in your control register, and record which PyRIT scenario and memory identifiers support each entry.
Access review and finding tickets
PyRIT does not manage who can open the memory database or CoPyRIT, and it does not track findings to closure. Access reviews, change approvals and the ticket trail for each finding must live in your identity system and issue tracker. Ask who can read harmful content in memory, how often that list is reviewed and where each finding's fix and retest are recorded.
Reference the active repository
The original Azure/PyRIT repository was archived and is read-only, and development continues at microsoft/PyRIT. Records that name the archived repository can confuse an auditor about which version produced a result. Reference the active project in your evidence index, and record the exact PyRIT version used for each run.
- Archive date
- 27 March 2026
How PyRIT runs flow into retained evidence
The flow starts with the target and scenario configuration, which feed a PyRIT run. Converters, attacks and scorers write conversations and results to PyRIT memory, stored in SQLite or Azure SQL. Exports, snapshots and access controls then produce the evidence set that the compliance team holds. The harmful content boundary wraps the memory store, and the points where versions and scorer identities are recorded should be checked against your own run records.
Shows how a PyRIT run moves data into memory and out as a controlled evidence set.
Questions teams ask about PyRIT audit evidence
How much effort does a PyRIT memory retention and access design take?
Effort depends mostly on how many systems PyRIT tests, how many people touch the memory database, and how many audits the evidence must support. A design that covers one team running scans against one target is much smaller than one covering several products, shared Azure SQL instances and CoPyRIT users. The main drivers are the number of data stores, the count of roles that need access to harmful prompts and responses, and how many retention rules your legal, security and compliance teams must agree on. Ask any provider to split the work into one-time design, recurring access reviews and retention enforcement, and to state which items you will own afterward.
How long does the work take, and what must our team supply?
Duration is set by the written scope, not by PyRIT itself, so no fixed timeline applies. Expect the schedule to move with three inputs: how quickly your team confirms retention periods and data classification, how many environments hold PyRIT memory (developer laptops, CI runners, shared databases), and how fast access approvals are granted. Your team will usually need to supply a list of PyRIT deployments, the target systems under test, the policies that govern harmful content and logs, and named owners for access decisions. Ask for milestones tied to those inputs.
Can our internal team set this up without outside help?
Often yes, if the team has engineers who know PyRIT's memory layer (SQLite or Azure SQL), your identity provider and your logging and retention tooling. The harder parts are usually not technical: agreeing what counts as evidence, deciding who may read prompts that contain harmful content, and documenting the decisions in a form an auditor can follow. Internal teams commonly struggle with keeping configuration and version records consistent across runs. Check whether you have someone who can own the design after handover and run the periodic access reviews, since that work recurs.
What would a consultant deliver for PyRIT audit evidence?
A written scope should list concrete artifacts. Typical deliverables include an inventory of PyRIT memory stores and their locations, a retention schedule per record type, an access model that restricts harmful content to named roles, a method for recording scenario configurations, PyRIT versions, labels and scorer identities, and a runbook for exports and reviews. DeployOpen plans and documents these controls for infrastructure you control and prepares the evidence for compliance assessments. It does not issue audit reports, attestations or certifications, which remain the work of independent auditors. Ask for the deliverables and acceptance criteria in writing before work starts.
How does PyRIT memory relate to SOC 2 or ISO/IEC 42001 audits?
Memory records are one source of evidence. For SOC 2, an auditor typically looks at whether testing happens on a defined cadence, whether findings are tracked to closure, and whether access to red team data is controlled, so memory records must show those events reliably. For ISO/IEC 42001, memory supports risk assessment and impact records within your management system. Neither framework is satisfied by a database alone. Confirm with your auditor which control areas they will test and which records they expect, and map those to the retained memory and configuration data before the audit period starts.
What should we ask for in a written scope?
A useful scope names the PyRIT deployments and versions in use, the storage backend, the retention periods for each record type, the roles with access to harmful content and how access is reviewed, and the logs that show who exported or queried memory. It should also state what is one-time and what recurs, such as access reviews, retention jobs and upgrades when PyRIT releases change, and which party owns each item after handover. Request the list of assumptions, the client inputs required and the acceptance tests for each deliverable.
How DeployOpen works on this
DeployOpen treats the PyRIT memory database as part of the evidence trail, not as a side effect of testing. We scope which records, configurations and access controls your auditors will ask for, build them into the PyRIT setup you run, and hand over documentation your compliance team can follow without our involvement.
How we scope
- Agree in writing which memory records, scenario configs and version details the audit will request
- Confirm which PyRIT memory backend you run, SQLite or Azure SQL, and where it is hosted
- Define retention periods and who may read harmful content, with the scope fixed before work starts
How we build
- Configure consistent labels and scorer identities so each result traces to a specific run
- Pin PyRIT versions and record scenario configuration files alongside every assessment
- Set role-based access controls and logging around the memory store and its exports
How we hand over
- Deliver a written retention and access procedure your compliance and security teams can review
- Provide a walkthrough of querying memory and exporting conversations for an auditor
- Document the evidence map showing which record supports which control in your assessment
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts
- Ongoing support, upgrades and continuous testing are available as a retainer
- Retainers can cover re-running assessments and keeping memory records current across PyRIT upgrades

