Best AI security testing and guardrail tools for government and public sector

For government teams, garak, PyRIT and promptfoo cover pre-release testing, while NeMo Guardrails and Guardrails AI cover runtime controls. LLM Guard is archived and should not anchor a new shortlist. Confirm hosted options separately.

On this page

Which AI security testing tools fit government and public sector work

A citizen-facing benefits assistant or a case-handling assistant for caseworkers needs testing before release and, in many cases, screening while it serves users. The testing group (garak, PyRIT and promptfoo) fits the pre-release need, and the runtime group (NeMo Guardrails and Guardrails AI) fits the production screening need. Decide which need applies first, because that decision sets whether you budget for a pipeline job, a service you operate, or both. Most teams need a scanner in the release pipeline and a guard in front of live traffic.

Start with the testing tools. garak is a command-line scanner from NVIDIA under Apache-2.0 that probes for prompt injection, data leakage, jailbreaks and misinformation. It writes a JSONL report of every attempt plus a hit log of successful attacks, which gives an assessor a record to file. PyRIT, Microsoft's MIT-licensed framework, suits teams that want to script multi-turn attacks such as Crescendo and keep results in SQLite or Azure SQL. promptfoo, also MIT-licensed, runs locally from declarative configs and fits pull-request checks. Before adoption, confirm that the ownership change, announced March 9, 2026 when OpenAI agreed to acquire the project, passes your agency's vendor review. The project states that it remains open source.

For runtime guardrails, NeMo Guardrails (Apache-2.0) configures input, dialog, output, retrieval and execution rails in Colang and can serve a /v1/chat/completions endpoint. Guardrails AI (Apache-2.0) runs validators from Guardrails Hub and can run as a Flask REST service. LLM Guard, the MIT-licensed scanner toolkit, was archived on July 9, 2026 and is no longer maintained, so it receives no security fixes. Do not choose it for a new government system. All five named options carry OSI-approved licenses (Apache-2.0 or MIT). Hosted and commercial options were not evaluated here, so confirm their data handling, hosting location, support terms and authorization status for your jurisdiction directly with each vendor.

Which AI security testing tools to shortlist for each government scenario

This table matches common government AI security scenarios to the open-source tool that fits best, with the condition that makes each pick hold and the case for a different one. Treat each row as a starting point for a shortlist, and confirm hosting, data handling and approval rules with your authorizing body before testing any live system. The main takeaway is that red teaming, CI gating and runtime guarding are separate jobs, so a shortlist will often need more than one of these tools.

ScenarioBest fitHold this pick whenChoose something else when
Pre-release red teaming by a central security teamgarakThe central team runs broad probe sets across several targets and needs a JSONL attempt log and hit log per runMulti-turn attack scripts are the main goal, so PyRIT fits better
Scripted multi-turn testing by a specialist teamPyRITThe team writes Python and needs Crescendo, TAP or Skeleton Key style attacks with conversation and score memoryThe team has no Python capacity or wants declarative configs, so promptfoo is simpler
Eval and CI gate inside a product team's pipelinepromptfooThe app is an LLM feature whose prompt tests and red team checks should fail a build, run locally in CI/CDProcurement cannot accept promptfoo's OpenAI ownership, so run CI checks with PyRIT or the garak CLI
Broad scanning across many model endpointsgarakThe same probe set must run against Hugging Face, OpenAI, Bedrock, llama.cpp or REST targetsThe endpoints are one chat app with multi-step workflows, so a scripted tool fits better
Runtime input and output checksNeMo GuardrailsInput and output rails in Colang fit a team that controls dialog flows and wants a server endpointTeams that only need validators on prompts and responses should compare Guardrails AI first
Structured output for case or form workflowsGuardrails AIModel output must match a Pydantic model before it enters a case or form systemConversational flows with fixed dialog paths are better served by NeMo Guardrails rails
Team still running LLM GuardNeMo Guardrails or Guardrails AILLM Guard was archived on July 9, 2026 and gets no security fixes, so plan a scanner-by-scanner moveA documented, short transition that your assessor accepts, with compensating controls, may keep LLM Guard temporarily

Why testing tools and runtime guardrails solve different government problems

Red-team tools and runtime guardrails answer different questions, so a government program should not treat one as a substitute for the other. A red-team tool such as garak sends generated attacks at a system before release to find where it fails. garak combines probes for prompt injection, data leakage, jailbreaks and misinformation with detectors that judge each response, and it writes a JSONL report of every attempt plus a hit log of attempts that found a weakness. A guardrail library works in the request path during production. NeMo Guardrails applies input, dialog, output, retrieval and execution rails defined in Colang, and Guardrails AI runs input and output guards. Each request is checked, blocked or reshaped before it reaches the model or the user.

Most public sector programs need both, and the two roles usually belong to different teams. An assessment or security team schedules the exercises, owns the findings and signs off the release. The team that operates the service configures the guardrails, which change whenever a policy, rail or validator changes. Because the owners differ, the evidence differs too. The testing team holds attack sets, scores and retest results, while the operations team holds the record of what was blocked, reshaped or logged in live use. No tool in this comparison covers both roles equally. PyRIT's memory layer keeps conversations, scores and results in SQLite or Azure SQL, which suits testing records, but its documented role is attack scripting, and it is not a request filter.

An assessor will ask for records of what was tested and what was blocked, and the output format of each tool decides how easily those records are produced. Ask each candidate to show a sample of its raw output before you shortlist it. garak's JSONL report and hit log can be filtered and archived with ordinary tools. promptfoo runs locally from declarative configs that can be kept in version control and run in CI/CD pipelines, which makes its test definitions easy to show. For guardrails, the evidence is the log of blocked or modified requests, so check whether the framework emits structured logs that you can tie to a policy version and a request identifier. Confirm these details in a proof of concept inside your own environment, because the log schema depends on how you deploy the tool and what your team adds to it.

What each open-source option does and under which license

Each option below tests or guards LLM applications, but they act at different points. garak, PyRIT and promptfoo send attacks at a target system, while NeMo Guardrails and Guardrails AI sit in the request path and check inputs and outputs. All six use Apache-2.0 or MIT licenses, but maintenance status differs, and LLM Guard is archived.

garak command-line scanner

garak is NVIDIA's Apache-2.0 scanner, installed from PyPI and run from the command line. Its probes generate attacks for hallucination, data leakage, prompt injection, misinformation, toxicity and jailbreaks, detectors judge each response, generators connect to the target, and harnesses run the whole set. It fits teams that need a repeatable scan of a model or endpoint reachable over REST, including a self-hosted model. Check whether any detector calls a hosted model, since that decides whether test traffic leaves your boundary, and plan review time for the hit log, which lists the attempts that found a weakness.

Published 16 October 2026
v0.17.1
garak repository

PyRIT scripted multi-turn attacks

PyRIT is Microsoft's MIT-licensed Python framework, developed at microsoft/PyRIT after the original Azure repository was archived. It is built from targets, prompt converters, scorers, multi-turn attacks such as Crescendo, TAP and Skeleton Key, and a memory layer that stores conversations and scores. It suits a team with Python engineers who need attacks that adapt across turns and want results kept in SQLite or Azure SQL for review. The limitation is effort: you write and maintain the attack logic yourself, and you should confirm that your pipeline's Python version falls within the supported range before adoption.

Published 4 September 2026
v1.1.0
PyRIT documentation

promptfoo declarative CI testing

promptfoo is an MIT-licensed CLI and library for evaluating and red teaming LLM applications, and OpenAI has acquired it, with its README stating it remains open source. Tests are declared in config files, evals run on your machine and talk directly to the model you configure, and the suite can gate a CI/CD pipeline. Red team plugins and strategies map to the OWASP LLM Top 10 and the NIST AI Risk Management Framework. It fits product teams that want security checks on every change. Ask for written commitments on provider coverage and roadmap after the acquisition, because ownership changes affect procurement reviews.

Community probes per month
10k
promptfoo red teaming docs

NeMo Guardrails runtime rails

NeMo Guardrails is NVIDIA's Apache-2.0 toolkit for runtime control of LLM conversations. You define input, dialog, output, retrieval and execution rails in Colang, and its server exposes a /v1/chat/completions endpoint. It suits an application team that owns the conversation flow and can route all model calls through the rails. The main limitation is that Colang is a language your team must learn and test, and every rail sits in the request path, so measure latency on your own workload before you set any target.

Published 16 September 2026
v0.24.1
NeMo Guardrails repository

Guardrails AI validators and schemas

Guardrails AI is an Apache-2.0 library that runs input and output guards built from validators published on Guardrails Hub. It can also generate structured output that matches Pydantic models, and it can run as a standalone Flask REST service that the OpenAI SDK calls. It suits teams that already define output contracts in code and want format and content checks before a response reaches a citizen-facing service. The limitation is that each validator is a separate package with its own behavior, so review every one you install and pin the versions you approve.

Published 14 August 2026
v0.11.0
Guardrails AI repository

LLM Guard archived upstream

LLM Guard is Protect AI's MIT-licensed set of prompt and response scanners, with 15 input scanners documented, including Prompt Injection, Secrets and Toxicity. The owner has archived the repository, and the project and its Hugging Face models are no longer maintained, so no security fixes will arrive. Do not start a new deployment on it. Keep it only as a reference for scanner design, or use it to plan the migration of an existing deployment by listing the scanners and model versions you run now and mapping each one to a maintained replacement.

Repository archived
9 July 2026
LLM Guard repository

How AI security testing tools compare on coverage, CI fit and licenses

This table compares six open-source AI security tools on license, role, latest release, runtime, interface, coverage, reporting and CI/CD documentation. Read garak, PyRIT and promptfoo as pre-release testing tools and NeMo Guardrails and Guardrails AI as runtime controls, with LLM Guard listed for reference only. Where a capability is not documented, the cell says to confirm it with the maintainer, so check those points before they enter a procurement file.

ToolLicense, role and latest releaseRuntime, interface and coverageReporting and CI/CD use
garakApache-2.0, developed by NVIDIA. Testing scanner. Latest v0.17.1, released 16 October 2026.Python 3.11 or newer, command-line tool installed with pip. Probes hallucination, data leakage, prompt injection, misinformation, toxicity, jailbreaks.JSONL report of every attempt and a hit log of successful attacks. CI/CD use: confirm with the maintainer.
PyRITMIT. Testing framework. Latest v1.1.0 (4 September 2026). Use microsoft/PyRIT, as the Azure repo is archived.Python 3.10 to below 3.15, docs recommend 3.13. Python framework with targets, converters, scorers, Crescendo, TAP and Skeleton Key attacks.Memory layer records conversations, scores and results in SQLite or Azure SQL. CI/CD use: confirm with the maintainer.
promptfooMIT, still open source after OpenAI acquisition. Testing. Latest 0.124.1 (8 October 2026).Node.js 22.22.0 or newer. CLI, library and declarative configs. Runs locally, talking directly to the model.Red team plugins aligned with OWASP LLM Top 10 and NIST AI RMF. CI/CD pipelines documented. Report format: confirm with the maintainer.
NeMo GuardrailsApache-2.0, repository at NVIDIA-NeMo/Guardrails. Runtime guardrails. Latest v0.24.1, released 16 September 2026.Toolkit configured in Colang. Input, dialog, output, retrieval and execution rails. Server exposes /v1/chat/completions. Runtime language: confirm.Coverage depends on the rails you configure. CI/CD use and report format: confirm with the maintainer.
Guardrails AIApache-2.0. Runtime validation library. Latest v0.11.0, released 14 August 2026.Input and output guards built from Guardrails Hub validators. Library or standalone Flask REST service. Runtime language: confirm.Callable through the OpenAI SDK when run as a service. CI/CD use and reporting: confirm with the maintainer.
LLM Guard (reference only)MIT. Runtime scanner, archived 9 July 2026 with no security fixes. Latest PyPI 0.3.16 (19 May 2025).Python 3.10 to below 3.13. Documents 15 input scanners, including Prompt Injection, Secrets and Toxicity.Reference only for existing deployments. CI/CD use: no active maintainer to ask, so check the archived repository.

How to route a government AI system to the right tool group

The route starts with the government AI system you need to test or guard, then asks one question: is the need before release or at runtime? Before release, a security team can script multi-turn attacks with PyRIT, run a broad sweep of weakness classes with garak, or gate builds with evals in promptfoo. At runtime, teams can write dialog rails in Colang with NeMo Guardrails, or add validators and structured output with Guardrails AI. The hand-off to check is ownership. A pre-release tool needs people who can run it inside your own environment, and a runtime tool sits in the request path of a live service. Confirm each option's license and maintainer status before you shortlist it.

The diagram routes a system by timing of need, then by tool family.

What licensing and editions mean for a public body adopting each tool

garak is licensed under Apache-2.0 and is developed in NVIDIA's GitHub organization. PyRIT is licensed under MIT. The original Azure/PyRIT repository was archived on 27 March 2026 and is read-only, so active development is at microsoft/PyRIT. Both licenses permit use, modification and redistribution within your own environment, subject to notice conditions. A license does not, however, include support, indemnity or a service commitment.

  • Apache-2.0 for garak: The license includes a patent grant and notice requirements. Ask counsel which attribution duties apply if your team repackages the garak repository into an internal image.
  • MIT for PyRIT: The license is short and requires that the copyright and license notice stay with copies of the code. Confirm that internal copies keep those notices.
  • Archived upstream repository: Pinned copies or internal forks that still point to Azure/PyRIT will not receive future releases. Confirm which repository your change process references.
  • Hosted or commercial offerings: Commercial or hosted editions built on these projects were not assessed here. Ask any vendor which tool its service runs and under which terms.
  • Support and triage: Neither license includes a support commitment. Name the internal owner who triages scan findings and decides on remediation.

Before adoption, have counsel review the license text at the version you deploy, confirm the notice obligations and document who owns results and fixes.

What running these tools inside your own government network takes

Start with interpreter versions, because they decide which tools your scanning hosts can run at all. garak's PyPI package requires Python 3.11 or newer, PyRIT's package supports Python 3.10 up to but not including 3.15 and its documentation recommends Python 3.13, and promptfoo needs Node.js 22.22.0 or newer. LLM Guard is the outlier: its last PyPI release, 0.3.16, requires Python below 3.13, and the project is archived and no longer maintained. Agencies that standardize on one Python and one Node.js version across scanning hosts should choose a version that satisfies every tool they plan to shortlist, then pin it in the image their security team approves.

The larger effort sits outside the scanner. Each tool needs a route to the model under test. garak's generators can reach Hugging Face, OpenAI, AWS Bedrock, llama.cpp models or a custom REST endpoint, so the team must decide which endpoints the scanning network can reach and which are hosted in-country. API keys belong in a secrets manager with rotation and named owners, kept out of configuration files committed to repositories. Attack output is sensitive as well. garak writes a JSONL report of every attempt and a hit log of successful ones, and PyRIT keeps conversations, scores and results in its PyRIT documentation memory layer, backed by SQLite or Azure SQL. Decide where these files live, who can read them, how long they are kept and how they fit your records schedule.

Plan for upgrades before the first scan. Pin the versions you test against, such as garak v0.17.1, PyRIT v1.1.0 and promptfoo 0.124.1, and record them in each assessment report so results can be reproduced after an upgrade. Air-gapped operation is the question most likely to change the design. Whether each tool installs from an internal package mirror, runs its tests without internet access, reaches a locally hosted model and receives updates through an offline path must be confirmed for each tool with its maintainer and checked against your own network controls. Record those answers in the statement of work before the environment is built, and ask for a demonstration of the pinned setup running on your approved image.

How to choose and pilot an AI security testing stack for a public body

Seven steps take a public body from a long list of AI security tools to a pilot it can defend. Each step leaves a written artifact, so the pilot ends with a justified tool choice, a reviewed evidence trail and a named owner for ongoing testing.

  1. Define the system and its data classification

    The system owner, working with information security and records staff, writes down what the AI system does, which users can reach it, and which models, tools and data sources it calls. Record the highest classification of data it will touch under your public body's scheme, and note any citizen-facing data or records subject to retention rules. This step is done when a one-page system description and a classification decision are signed by the system owner and information security, because the depth of testing and the runtime controls both depend on them.

  2. Split pre-release testing from runtime control

    Decide which risks are checked before a release and which must be controlled while the system runs. Pre-release testing covers probes and red team runs against a build of the model, prompts and tools. Runtime control covers guardrails that inspect prompts and responses in production. The security engineering lead writes two short lists, each with a named control and a check that proves it works. This step is done when both lists are agreed, since a tool chosen for one purpose may leave the other list uncovered.

  3. Shortlist one testing tool and one runtime tool

    Choose one testing tool and one runtime tool that match skills your team already has. garak (Apache-2.0) is a command-line scanner suited to teams comfortable in a shell. PyRIT (MIT) is a Python framework for scripted multi-turn attacks, suited to teams that will write their own attack code. promptfoo (MIT) runs from declarative configs in CI/CD, and it is now part of OpenAI, so procurement should review that ownership change. For runtime, NeMo Guardrails (Apache-2.0) suits teams that will write Colang rails, and Guardrails AI (Apache-2.0) suits teams that prefer Python validators. LLM Guard is archived, so leave it off. This step is done when the shortlist records each tool's license, maintainer and required skill.

  4. Agree a written pilot scope first

    Before any test runs, the security lead and system owner agree a written scope. It names the target endpoint, the probe families and attack categories in use, the test data allowed in prompts, the approvers, the stop conditions and the people who receive findings. The scope also states that the pilot runs only against a non-production endpoint and that production credentials stay out of every configuration file. This step is done when the system owner and the public body's security approver have both signed it, and the pilot does not start until both signatures exist.

  5. Run a bounded pilot on a non-production endpoint

    Point the testing tool at a staging or test endpoint that mirrors the production configuration, using only the probes and attack categories in the signed scope. garak can reach custom REST endpoints, and promptfoo runs locally from its config, so the pilot can run on a workstation or build runner. Keep the run within the agreed limits, watch for the stop conditions, and log any unexpected model behavior for the system owner. This step is done when the run finishes inside scope and the security lead has reviewed the findings with the system owner.

  6. Confirm the evidence each tool produces

    Check what each tool writes and where it is kept before you rely on it. garak writes a JSONL report of every attempt and a hit log of attempts that found a weakness. PyRIT stores conversations, scores and results in its memory layer, in SQLite or Azure SQL. promptfoo results stay on the machine that ran them unless you export them. Runtime guardrail logs depend on how your team deploys them, so confirm that with the deployment team. Check that the storage location, access control and retention match your records policy, and that a sample evidence bundle can be produced for an assessor. This step is done when records and security staff accept the sample.

  7. Name the owner, retest schedule and upgrade path

    Record one accountable owner for each tool, a retest schedule, and the events that trigger an extra retest, such as a model change, a change to prompts or tool permissions, or a new data source. Write down how upgrades will be handled: where the team tracks releases, such as the garak and promptfoo release pages, who tests a new version in staging, and how a tool that stops being maintained will be replaced. This step is done when the owner signs the record and the retest dates appear in the public body's change calendar.

How much effort do AI security testing tools take to run in government

What drives the cost of running open-source AI security tools versus paying a provider?

The tools themselves are free to download, so the cost is the people and infrastructure around them. Agency staff or a contractor write the target configuration, build the test sets, connect the tools to model endpoints, store the JSONL reports and triage every finding, and those hours recur each time a model, prompt or policy changes. The open-source editions of garak (Apache-2.0), promptfoo (MIT) and PyRIT (MIT) carry no license fee, but hosted or vendor-managed services bill for their platform and support. Costs rise with the number of systems tested, the frequency of runs, the evidence an assessor will ask for, and whether an engineer must maintain CI integration. Ask any services provider for a quote that separates one-time setup from recurring retesting and support.

Can our own staff run garak or promptfoo without outside help?

Often yes, for a team with a Python or Node.js engineer and a clear test plan, but the first runs go faster with someone who has done it before. garak installs from PyPI with pip, requires Python 3.11 or newer, and can test Hugging Face, OpenAI, AWS Bedrock, llama.cpp models and any REST endpoint. promptfoo runs locally from declarative configs, requires Node.js 22.22.0 or newer, and its free Community edition includes 10k red team probes per month with community support. The harder work is not installation. It is choosing which attacks fit a citizen-facing service, judging detector verdicts that are wrong, and keeping configs and reports under the agency's change control. Confirm which tools your authorization path accepts before you build on either one.

How long does a first AI security testing pilot take?

No single duration fits every agency, and the length of a first pilot depends on the work in front of it. The main drivers are how many model endpoints and applications are in scope, whether each target can be reached from a test environment, how quickly the agency approves data handling and access requests, and how many findings need a retest before the team trusts the results. A narrow pilot against one chat application and one model is much shorter than a multi-system pilot that also needs CI integration and an evidence pack for an assessor. DeployOpen's engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ask any provider to present the timeline as a list of dependencies: what the agency must provide, and by when.

What does an AI security testing engagement need from our agency?

The agency provides access, information and decisions. Expect to name three things before work starts: a technical contact with authority to approve endpoint access, a classification for the data the model touches, and a named owner who accepts findings and fixes. Endpoint access means test credentials or a staging route to each model, gateway and agent in scope, along with logs the team can share. Data classification determines which test prompts and sample records are permitted and whether any output can leave the enclosure, so confirm handling rules with the data owner before the first run. The named owner signs off scope changes and owns remediation after the report. Ask any provider which of these the agency must supply and which the provider supplies.

Does DeployOpen issue certifications for AI security testing?

No. DeployOpen does not issue audit reports, attestations or certifications. It runs security testing, including AI and agent security review, and it prepares systems, controls and evidence for compliance assessments. The findings report, fixes and retest give an assessor material to review, but an independent auditor or certification body decides whether a control is met and issues any attestation. Agencies that need a formal assessment should ask their assessor which evidence they accept, how they want it packaged and whether they expect testing by a particular party. Choosing garak, promptfoo or PyRIT does not create a certificate either, since each produces reports that need the same review as any other evidence.

Should we migrate off LLM Guard now that it is archived?

Yes, plan to move. The LLM Guard repository was archived by its owner on July 9, 2026, and its README states that the project and its Hugging Face models are no longer under active development or maintained. No security fixes will arrive, so any scanner you keep running carries whatever gaps it has today. The last PyPI release is 0.3.16, uploaded May 19, 2025, and it requires Python 3.10 or newer but below 3.13. Migration effort depends on how many of its scanners your application calls, such as Prompt Injection, Secrets or Toxicity, and how much of your logic depends on their output. Map each scanner to a maintained replacement, then test that replacement against the attacks your application faces before you cut over.

How DeployOpen scopes and supports selection and implementation

DeployOpen helps public sector teams choose and run AI security testing and guardrail tools inside their own infrastructure, from cloud accounts to air-gapped networks. We plan, implement, integrate and harden the chosen tools, and we test AI systems and agents for prompt injection, tool permissions and data exposure. Engagements are fixed-scope, with the scope, deliverables and timelines agreed in writing before work starts.

How we scope

  • The written scope names the tools, AI systems and agents in range, and the environment each one runs in.
  • Deliverables and timelines are agreed in writing before any testing or build work begins.
  • Quotes follow from the written scope, since DeployOpen does not publish a price list.

How we build

  • Plan and implement the chosen tools inside your cloud accounts, data centers or air-gapped network.
  • Integrate SSO, access control and audit logging so your security and compliance teams can review the setup.
  • Customize and harden the configuration, including tool permissions, credentials and admin settings.

How we hand over

  • Deliver a findings report with fixes and a retest, covering prompt injection, permissions and data exposure.
  • Document controls and evidence for independent assessors, who issue any audit reports or certifications.
  • Hand over runbooks and written configuration so your own team can operate the tools after go-live.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, agreed in writing.
  • Ask in the quote whether backups, upgrades and tool version changes fall under the retainer.
  • Re-test after fixes and as tools and models change, if the retainer covers continuous testing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.