What the Skeleton Key test checks in a PyRIT run
PyRIT's Skeleton Key attack sends a known jailbreak that asks the model to revise its own safety guidelines, and it works as a fast check of a deployment's system prompt and filters. A team about to ship or review an LLM feature often wants a quick, low-effort signal on whether its guardrails hold against a published jailbreak before it commits to a larger test plan. Skeleton Key fits that moment because it needs one objective, one target and one scored response, so a team can run it against a staging endpoint in a short session and see whether the deployed configuration complies with a request to abandon its rules. It is most useful when the system prompt, the content filters or the model version has just changed, and as a regression check that runs every time those controls are edited.
A single-turn result tells the team whether this particular jailbreak, in this particular wording, got past the controls the target had on the day of the run. A refusal is a useful signal, but it does not prove the feature resists other jailbreak families, multi-turn escalation, encoded prompts or injected content from documents and tools. A success is stronger evidence of a weakness, yet the team still needs to confirm that the scorer judged the response correctly and that the target was tested as users reach it, including any input and output filters placed in front of the model. Before the run, confirm which system prompt, filter settings and model version the endpoint uses, and record them with the result so the finding can be reproduced and retested after a fix.
Treat the Skeleton Key run as the first step in a layered plan, not as the whole assessment. Its strength is speed and repeatability: the same objective can be replayed after every prompt or filter change, and its results sit in PyRIT memory alongside other attacks. Its limit is that it measures one known pattern. Teams that need broader coverage should pair it with multi-turn and adversarial attacks, and should decide in advance who reviews a failed result, what counts as a finding for the release decision, and how often the check must be repeated for the feature to stay in scope of its security review.
When a Skeleton Key run is worth its cost
Skeleton Key is a short, cheap probe, so its value lies in running it often and early. The situations below share one purpose: catching a regression or a weak configuration before a slower, costlier attack is needed. None of them replaces the multi-turn or domain-specific testing that finds deeper failures.
Pre-release smoke test
Run Skeleton Key against the candidate build just before it ships, using the same target configuration that users will reach. The run answers one question: does the released deployment still refuse a known jailbreak that asks the model to rewrite its own safety guidelines? Check that the target points at production-equivalent endpoints, not a developer sandbox, or the result proves little. A pass does not certify the release.
Single-turn attacks docsRegression after system prompt changes
Any edit to the system prompt, persona, or tool instructions can weaken guardrails that were working before. Rerun the same Skeleton Key objective after each change and keep the prior results for comparison. Because the probe is fixed, a changed outcome points to the edit rather than to random variation in the attack. The check cannot tell you which phrase caused the change, so pair it with a diff review of the prompt.
Comparing filter configurations
Input and output filters, moderation settings, and content safety thresholds often change independently of the model. Run the same Skeleton Key attack against each filter setting and record which configuration blocks the jailbreak and which lets the response through. This isolates the filter layer from the model's own refusals. It does not show whether a filter catches paraphrased or encoded variants.
Triage before costlier attacks
Skeleton Key is a single-turn check, so it is inexpensive to run before committing to multi-turn strategies such as Crescendo or TAP. If the model fails this known jailbreak, you have a clear, reproducible finding that justifies deeper work on the same system. If it passes, the result does not mean the deployment resists conversational escalation. Treat a pass as permission to continue testing, not as a conclusion.
Verifying a new model version
When a provider or self-hosted deployment moves to a new model version, behavior around known jailbreaks can shift in either direction. Run the Skeleton Key check against both the previous and the new version under identical settings. Confirm with your model provider which safety changes were announced, since the check only observes behavior. It will not reveal training changes that affect other attack classes.
Configuring the target, objective and scorer
The target is the endpoint PyRIT sends prompts to, and it should be the deployed application as users reach it, not the bare model. A Skeleton Key result only means something about your deployment if the system prompt, input filters and output filters that ship to production are active during the run. PyRIT provides targets for OpenAI, Azure, Anthropic, Google and Hugging Face models, custom HTTP or WebSocket endpoints, and web app targets driven through Playwright. Choosing a bare model endpoint is quicker to set up, but it tests the model alone and will overstate the protection your product provides.
- Deployed endpoint: point the target at the same route your users call, so the production system prompt and middleware run.
- Bare model endpoint: useful for comparing base models, but it skips your guardrails and should be labeled as such in the report.
- Web app target: a Playwright-driven target exercises the chat interface, which matters when filtering happens in the front end.
- Stateful versus stateless: confirm whether the endpoint keeps conversation history, because a stateless target receives only the single prompt you send.
- Environment: test a staging copy that mirrors production configuration, and record the configuration version alongside each run.
Before the first run, confirm with your application team that the system prompt and filters on the target match the release you plan to assess.
The objective is the behavior the attack tries to elicit, such as a request for content your policy forbids. Skeleton Key already carries its own jailbreak framing, so the objective decides what harm category the run measures. Using one objective gives a clear pass or fail signal, while an objective set covers more policy areas but produces a larger results table that someone must review. Your choice should follow your acceptable use policy and the harms your product could realistically produce, not a generic list.
- Single objective: fast, easy to explain, and suited to a regression check after a system prompt change.
- Objective set by harm category: broader coverage across content areas your policy names, at the cost of more responses to score.
- Domain-specific objectives: for regulated products, write objectives that reflect the misuse your sector cares about.
- Benign control objectives: include a few requests the model should answer, so you can detect over-refusal.
- Documented source: keep each objective text in version control so later runs can be compared fairly.
Ask your compliance or product owner to sign off on the objective list before testing, since the list defines what a pass means.
The scorer decides whether a response counts as a successful jailbreak. PyRIT scorers can use an LLM as the judge, Azure AI Content Safety, or custom logic that you write. An LLM judge handles nuanced refusals and partial compliance but adds its own model cost and can be wrong, so its verdicts need spot checks. Content Safety classifiers are deterministic for the categories they cover but do not read intent in the same way. Custom logic, such as matching a known string, is the most predictable and the easiest to audit, but it misses paraphrased compliance.
- LLM judge: flexible for judging partial compliance, with the judge model chosen and documented.
- Azure AI Content Safety: a service-based check that requires an Azure resource and its own access setup.
- Custom logic: transparent and repeatable, but limited to the patterns you anticipate.
- Combined scorers: pairing two methods reduces single-judge error, at higher run cost.
- Judge accuracy: label a sample of responses by hand and compare them with the scorer before trusting the totals.
Check which scorer produced each verdict and whether a human reviewed a sample, because an auditor will ask.
PyRIT memory stores conversations and results in SQLite or Azure SQL. The choice determines where prompts, responses and scores live, who can read them, and whether results survive beyond one session. SQLite is a local file, which suits an individual tester or a short evaluation on a secured workstation. Azure SQL suits a team that needs shared access, backups managed by a database service, and central retention. In both cases the stored transcripts may contain sensitive model outputs, so treat the memory store as restricted data.
- SQLite file: simple to start, with the file location and permissions controlled by the operator.
- Azure SQL: shared and centrally managed, with access controlled through the database and identity configuration.
- Retention: decide how long transcripts are kept and who deletes them, since they can contain harmful outputs.
- Run identifiers: record the target configuration and objective set with each run so results can be traced later.
- Backup and access review: confirm who can query the store and that it is included in your backup schedule.
Confirm your data retention rules with your privacy and security teams before the first run writes to memory.
How to set up a Skeleton Key test against your deployment
This sequence takes a team from a clean PyRIT install to a recorded Skeleton Key result against a non-production copy of its AI deployment. The output is a stored conversation and score that show whether the system prompt and filters held under a known jailbreak.
Confirm a supported Python version
The engineer running the test checks the interpreter version before installing anything. The PyPI package supports Python 3.10 up to but not including 3.15, and the PyRIT documentation recommends Python 3.13, so an environment on 3.13 is the safest starting point. Run the version command in a fresh virtual environment. Done when the reported version falls inside that range.
Install PyRIT from PyPI
Install the package from PyPI into the virtual environment with pip, then confirm the installation imports cleanly in a Python shell. Use the PyPI package rather than cloning the archived repository, and pin the version your team has reviewed so later runs are repeatable. Record the installed version in your test notes. Done when the import succeeds and the recorded version matches what you intended to install.
Configure credentials and settings files
Create the PyRIT configuration in your home directory: credentials for the target and any scorer model go in ~/.pyrit/.env, and general settings go in ~/.pyrit/.pyrit_conf. Keep the credential file out of version control and restrict its file permissions to the tester's account. Done when a dry run loads the configuration without a missing-credential error and the target endpoint key is not echoed in logs.
Point a target at a non-production copy
Configure the PyRIT target to send prompts to a staging copy of the deployment that runs the same system prompt, model settings and input and output filters as production. Confirm with the system owner that the copy is not connected to live customer data or live tools with write access. Send one benign question and check that the reply reflects the production system prompt and that filters are active. Done when the benign reply is returned and the filters are confirmed in the staging configuration.
Run the Skeleton Key attack
Run PyRIT's Skeleton Key attack against the configured target with your chosen objective, which is a request the deployment is supposed to refuse. The attack sends a known jailbreak that asks the model to revise its own safety guidelines, so the run tests whether the system prompt and filters hold. Keep the objective and scorer identical across runs so results can be compared. Done when the run completes and returns a response for the attack.
Score the response and review it
Check the outcome with the scorer you configured, and read the full conversation yourself rather than relying only on the score. A refusal that quotes or paraphrases the guideline text, or a partial answer, counts as a finding even if the scorer marks it as safe. Note which filter or instruction the response appears to rely on. Done when each response has a recorded verdict and a short reviewer note.
Verify results in memory
Query PyRIT memory, which stores conversations and results in SQLite or Azure SQL, to confirm that the prompts, responses, scores and run identifiers were all saved. Export the conversation for the review file and check that the stored record matches what the target returned. Repeat the run after any change to the system prompt or filters. Done when the stored record for the run is complete and can be retrieved by its identifier.
Reading a Skeleton Key result without overclaiming
A Skeleton Key success tells you that one known jailbreak got past the current configuration of your system prompt and filters at the time you ran it. It does not tell you the deployment is safe. A failure is equally narrow: the single prompt in the attack's template was refused, but variants, rewordings, other languages or follow-up turns may still get through. Write the finding in those terms before anyone reads it as a clearance or a sign-off. One result is evidence about one attempt, not a measure of overall resistance.
Before you classify a run, open the conversation in PyRIT memory, which stores conversations and results in SQLite or Azure SQL, and read the actual turns. Check whether the target produced harmful content, whether it complied while adding disclaimers, or whether it simply refused. Confirm that the scorer's verdict matches what you read, because an automated judge can misread a partial or hedged answer. Keep the original objective and the full exchange together so a reviewer can trace the verdict to the text that produced it.
Separate filter blocks from model refusals, because they point to different controls. A refusal in the model's own words suggests the system prompt or model alignment handled the request. A canned block message, an empty response or an error from a content filter suggests an external layer intervened. Record which layer answered each turn, since a pass caused by a filter disappears the moment that filter is changed or disabled. Finally, record the exact system prompt text, the model version, and the versions of the filter or moderation services in effect during the run, in the same record as the result. Without those, a later retest cannot tell whether anything changed, and the result cannot be compared across releases.
How a Skeleton Key run flows through your deployment
A Skeleton Key run starts in the tester's environment, where PyRIT's attack sends the known jailbreak prompt to the target endpoint. The prompt then crosses the trust boundary into your deployment, passing the input filter, the system prompt and the model, then the output filter. The response returns to PyRIT's scorer and memory, which record what the model did. Check each hand-off: whether the input filter sees the prompt, whether the system prompt holds, and whether the output filter inspects the reply.
Skeleton Key prompt path from PyRIT through the client's filters and model.
Security and operational considerations for live endpoints
A Skeleton Key run sends a jailbreak prompt to a live model and records the replies, so the test itself creates exposure. The concerns below cover authorization, credentials, stored conversations, target load, harmful output and how to report defects in PyRIT itself. Check each one before the first request leaves your network.
Authorized and approved endpoints only
Run Skeleton Key only against endpoints your organization owns or has approved in writing for adversarial testing, and name the environment (staging, pre-production or a dedicated test deployment) in the test plan. A jailbreak run against production traffic can alter logs, trigger safety alerts, and affect real users. Confirm that the system prompt and filters under test match the deployment you intend to approve, since a passing result on a different configuration proves little.
Protecting credentials in the env file
PyRIT reads credentials from ~/.pyrit/.env, so the file holds API keys for every target the run can reach. Restrict its file permissions to the test operator, keep it out of shared repositories and CI logs, and use a separate, scoped key for each target. Rotate keys after a test engagement ends, and confirm whether your team needs a secrets manager in place of a plain file.
Retention of attack conversations
PyRIT stores each Skeleton Key conversation and score in its memory, which is SQLite by default or Azure SQL when configured. The stored records contain the jailbreak text and the model's replies, which may include unsafe content. Decide who can read the memory database, how long it is kept, and where it is backed up, and agree on deletion before the run begins. Check that this matches your data handling policy.
Rate limits and cost on the target
Skeleton Key is a single known prompt, so the request volume is small, but repeated runs across variants, retries and concurrent workers still consume tokens and count against provider quotas. Metered targets bill for every request, including refused ones. Set a request budget, cap concurrency to what the endpoint allows, and confirm with the provider or platform owner which rate limits and billing alerts apply to the test key.
Handling harmful outputs
A successful jailbreak can produce text the organization would not publish or keep, and analysts reading results may be exposed to it. Limit who views raw transcripts, store them with access controls, and avoid copying harmful replies into tickets, chat or slides. Summarize findings with the prompt category, the scorer result and a short redacted excerpt, and agree in advance how any content that touches a regulated data category will be escalated.
Reporting PyRIT vulnerabilities privately
If a test uncovers a defect in PyRIT itself, such as a flaw in how it handles credentials or stores memory, do not disclose it in a public issue. The project's security policy directs vulnerability reports to the Microsoft Security Response Center in private. Record the PyRIT version you tested, which for current work is the 1.1.0 release, and separate tool defects from weaknesses in the target model or deployment, which go into your own remediation process.
PyRIT on GitHubQuestions teams ask before running Skeleton Key tests
What does it cost to run Skeleton Key tests against our deployment?
No price is published for this work. The Skeleton Key attack itself is a single known prompt pattern in PyRIT, so the cost sits in the surrounding work: wiring PyRIT to your endpoint, deciding how responses are scored, reviewing the results and retesting after fixes. Each of these is a labor cost, and PyRIT's own software is open source under the MIT license. Ask for a quote built from a written scope that lists the target setup, the scoring method, the number of configurations to test, the review hours and whether a retest is included. The main cost drivers are how many deployments and system prompts are in scope and how much access to your environment is needed.
How long does a first Skeleton Key run take to set up?
No duration is published for this work, and the answer depends mostly on access. A team that already has a stable endpoint, a test account and a documented system prompt can get a first run going quickly. A team that must first arrange network access, service credentials, model approvals or a test environment will spend most of the time waiting on those. Other factors include how many targets sit behind the endpoint, whether responses need custom scoring logic and whether the owners of the filters are available to explain their behavior. Ask for a timeline that separates setup from testing and review.
What must our team provide before Skeleton Key testing starts?
The team needs to provide four things before work begins:
- Endpoint access, such as a test deployment or staging URL with a dedicated test account and documented request format
- The system prompt the deployment uses, or a clear description of it, along with any tool or retrieval configuration
- Details of the content filters and guardrails in front of the model, including vendor, version and configured thresholds
- Written approvals from the owners of the model, the application and the test environment, plus rules for handling any harmful output that appears
Without the system prompt and filter details, a pass or fail result tells you little about why the deployment behaved as it did.
Can an in-house engineer run Skeleton Key tests without outside help?
Yes, if the engineer can work in Python and has access to the target. PyRIT installs with pip, supports Python 3.10 up to but not including 3.15, and its documentation recommends Python 3.13. The Skeleton Key attack is documented as a single-turn attack that issues a known jailbreak asking the model to revise its own safety guidelines, so the first run is a small piece of code. The harder parts are scoring responses reliably, keeping results in a form a security reviewer can read and deciding what a failure means for your filters. Those skills usually belong to security or AI platform staff. Whether to do it in-house or with a partner depends on those skills and on how often the test must repeat.
Does passing Skeleton Key tests satisfy an audit or security review?
No. A passing Skeleton Key run is one data point. It shows that one known jailbreak pattern did not succeed against one configuration on the day it was run. It does not show that the deployment is safe in general, and it does not produce an audit report or certification. Independent auditors and certification bodies decide whether controls meet a standard. Reviewers will usually ask how the test was scoped, what was scored as a failure, how results are stored and whether tests were repeated after changes. Keep the run records, the configuration tested and the retest history so they can support the evidence your auditor requests.
What does a Skeleton Key result tell us about our system prompt and filters?
It tells you whether the deployed combination of system prompt and filters resisted this specific known jailbreak. If the attack succeeds, the model accepted a request to revise its own safety guidelines, which points to weak instructions in the system prompt, filters that do not inspect the attack, or both. If it fails, that is only evidence for this pattern and this configuration. Change one variable at a time, such as the system prompt or a filter setting, and rerun the same test to see which change matters. Skeleton Key is a quick check, so use it alongside broader attacks rather than as the sole measure.
Who is responsible for acting on the findings?
Your organization owns the deployment, so your teams decide how to respond to a result. The engineers who own the system prompt and the filters usually make the fixes, and the security team decides whether a residual risk is acceptable. DeployOpen plans, runs and documents security testing inside your own infrastructure under a written scope, and can deliver a findings report with fixes and a retest. Confirm in the scope who receives findings, who approves changes and who signs off on the retest.
When Skeleton Key should lead to deeper PyRIT testing
Treat a Skeleton Key run as a fast first pass, not a verdict on the deployment. A clean result from one known jailbreak does not show that the system prompt and filters hold up against a determined user. Skeleton Key sends a single, fixed jailbreak that asks the model to revise its own safety guidelines, so it tells you whether the deployment resists a well-known pattern. It does not tell you whether the deployment resists adaptation. Record the target configuration, the system prompt version and the scorer you used with each run, so that a later result can be compared with the same setup rather than against a changed one.
A failure, or a result you cannot classify cleanly, is the signal to go deeper. If the target complies, or returns a partial answer that a scorer cannot place, escalate to multi-turn attacks such as Crescendo, which builds toward an objective gradually, or TAP, which branches and prunes adversarial prompts across several candidates. Use the attack strategies hub to choose between them and to see how a compound attack can start with a cheap check and fall back to a heavier one only when the cheap check fails. The decision is about evidence. A Skeleton Key failure already shows a weakness worth fixing, so the deeper run should answer how far the weakness extends, not repeat the same question. Ask your team to confirm, before the run, who will review borderline outputs and what they will do with a result that is neither clearly safe nor clearly unsafe.
How DeployOpen scopes and delivers PyRIT jailbreak testing
DeployOpen runs Skeleton Key jailbreak testing with PyRIT as a fixed-scope engagement inside the client's own environment. We agree the target, the system prompt and filter configuration under test, and the evidence required before any test runs, then document what was sent and what came back.
How we scope
- Agree the target deployments, endpoints and model configurations that the Skeleton Key tests will cover, in writing
- Confirm which system prompts, content filters and guardrail layers are in scope and who approves test traffic
- Define the objectives, scoring method and pass or fail criteria before any test is run
- Fix deliverables and timelines in the written scope; ongoing support is available as a retainer
How we build
- Install and configure PyRIT in the client's infrastructure, with credentials kept out of source control
- Connect PyRIT to the agreed target through the supported target type for that model or application
- Run the Skeleton Key attack against the agreed configurations and record each conversation in PyRIT memory
- Repeat the run after each system prompt or filter change so results can be compared across versions
How we hand over
- Deliver a written report listing each Skeleton Key attempt, the response, the score and the reproduction steps
- Explain which findings point to the system prompt, which to the filters and which to the model itself
- Provide the test configuration and PyRIT settings so the client's own team can rerun the checks
- Walk the client's security and engineering teams through results and agree on remediation owners
How we support
- Retest agreed fixes against the same Skeleton Key prompts and document whether each finding closed
- Rerun the quick check when the system prompt, model version or filter rules change
- Offer ongoing support, upgrades and continuous testing as a retainer, priced from the written scope
- Confirm with your team how often the check should run and who receives the results

