garak for public sector LLM applications

Government assistants need scans that match their data, networks and review obligations. This page covers how to plan garak runs for public sector LLM applications and the evidence that reviewers ask for.

On this page

Why garak fits public sector LLM applications and what changes for government teams

A public sector team preparing a citizen-facing or internal assistant for review needs a scanner it can run inside its own network. garak is an Apache 2.0 licensed command-line scanner that can test self-hosted models from a restricted network, and its probes, the data at risk and the evidence reviewers expect all differ from what a commercial sector would need. The tool is free, installs from PyPI with pip, and requires Python 3.11 or newer, so the cost question is mostly about people and environment, not licensing. What drives the work is the scan plan: which application shapes are in scope, which probes match the data the assistant can reach, and where results will be stored for a review that may come years later.

Government teams should start by writing down the decision the scan supports. A benefits-eligibility assistant that reads case files, an internal policy bot with access to personnel records and a public information chat each expose different weaknesses, so each needs its own probe selection and pass criteria. Confirm with your security office which data classes the assistant may touch, whether prompts and responses are logged, and who can read the JSONL reports that garak writes for every attempt. Those reports can contain sensitive content from the target, so their storage and access controls belong in the plan from the start.

Air-gapped and restricted hosts change the installation and update steps more than the testing itself. Before the scan, confirm how garak and its Python dependencies will reach the scanning host, who approves each package version, and how the garak version is recorded alongside the report. Ask your procurement and governance reviewers which evidence they require, such as the scan configuration, the probe list, the run date and the failure rates by probe, and agree on that format before the first run. Treat the scan as one input into the governance file, not a substitute for the review itself.

Public sector requirements that shape a garak scan plan

This table maps the public sector requirements most likely to affect a garak scan plan to what each one asks for, the evidence an assessor may expect, and what it changes in the garak configuration or system boundary. Use it to decide which requirements apply to your assistant before you choose probes, and confirm applicability with your compliance team and legal counsel.

RequirementWhat it asks forWhat it means for garak
FISMA and NIST SP 800-53 control baselinesFederal agencies select controls from the SP 800-53 catalog using the low, moderate or high baseline in SP 800-53B. Inspectors General assess agency system security under FISMA.Map scan results to the control families your system is assessed against, and keep dated JSONL reports as assessment evidence. Confirm which baseline your system is categorized at.
FedRAMP scope for cloud-hosted assistantsApplies to cloud products that create, collect, process, store or maintain federal information on behalf of an agency. Single-agency systems not offered as a shared service are out of scope.If the assistant runs on a provider's cloud and serves federal data, scan the provider's endpoint inside the authorized boundary. Confirm with the agency whether FedRAMP applies before you pick a hosting model.
FBI CJIS Security Policy v6.1 for criminal justice informationSets minimum controls for criminal justice information, including FIPS 140-3 modules or AES-256 for data at rest and in transit outside physically secure locations, and vulnerability scanning at least monthly.Schedule recurring garak runs against any assistant that touches CJI, and keep reports in the CJIS-compliant store. Confirm with your CJIS Systems Officer whether scan output containing prompts with CJI is itself CJI.
32 CFR 2002.14(h)(2) for CUI on non-federal systemsFederal agencies use NIST SP 800-171 to set safeguards for controlled unclassified information on non-federal systems, unless the CUI category sets other safeguards.Use synthetic CUI-like test data in probes and detectors, and keep scan logs on systems that meet the safeguards required for the CUI category. Confirm which safeguards apply to your data category.
ADA Title II WCAG 2.1 deadlinesState and local government web content and mobile apps, including vendor-provided ones, must meet WCAG 2.1 Level A and AA from 26 April 2027 for entities serving 50,000 or more people, and from 26 April 2028 for smaller entities and special districts (28 CFR 35.200).garak tests model behavior, not interface accessibility. Pair scans with separate accessibility testing of the chat UI, and record the accessibility test results alongside garak reports for the same release.
NIS2 public administration scopeCovers central government entities regardless of size and lists public administration as a high-criticality sector. Member States may extend it to local administration. National security, defense and law enforcement entities are excluded.For in-scope EU entities, include the assistant in your risk assessment and keep dated scan evidence for supplier and incident reviews. Confirm your entity classification and whether your Member State extends the scope.

How the deployment environment changes garak scans

A citizen-facing assistant usually sits behind a public endpoint, often in a cloud account the agency or its contractor controls. garak can reach it through the REST generator, which connects to any endpoint that returns plaintext or JSON and is described in a short YAML file. The scan itself runs from a host with internet access, so installation from PyPI is straightforward, and the JSONL report and garak.log are written to that host. Because the target is public-facing, the test traffic looks like real traffic to the rate limits, logging and web application firewall in front of it.

  • Generator choice: Point the REST generator at the chat endpoint, with headers and request body mapped in the YAML file, rather than calling the model vendor directly, so the scan tests the deployed guardrails and prompt wrapper.
  • Installation: Install with pip on a Python 3.11 or newer host, pinned to a known release such as v0.17.1.
  • Report storage: Move JSONL reports and garak.log into the agency's evidence store, since these files can contain adversarial prompts and sensitive sample responses.
  • Access to the target: Confirm which source addresses the scan host uses and whether the provider's terms and the agency's acceptable use rules allow automated probing of a live service.
  • Load and monitoring: Agree a scan window with the operations team so alerts from the scan are not confused with a real attack.

Confirm with the hosting team and the procurement office who owns the endpoint, who may authorize testing against it, and whether a staging copy exists for scans.

Which garak settings matter for government assistants

Government assistants are reviewed on what they can expose, what they can get wrong about benefits and policy, and whether the test is repeatable. The settings below map each of those review questions to a garak configuration choice, so the scan record can answer them directly.

REST generator endpoint definition

The REST generator connects garak to any endpoint that returns plaintext or JSON, described in a short YAML file. For an agency assistant, this file is the record of exactly which system was tested: the gateway or chat service, the model behind it, and the request format. Reviewers will ask whether the scan hit the production path, including the retrieval layer and the system prompt, or a bare model. Confirm the endpoint, authentication method and any guardrail in front of it before the first run, and store the file under version control with the report.

garak README

Probes for data leakage

Assistants that answer questions about case files, benefit records or citizen accounts can disclose personal data if retrieval or context is misconfigured. Select the data leakage probes deliberately rather than relying on a general run, and confirm they cover the categories of data the assistant can reach. Reviewers ask which data categories were tested for leakage and whether the test used synthetic records, so document both. Test accounts and seeded data should stand in for real citizen records throughout.

Prompt injection and misinformation probes

Benefit eligibility, tax deadlines and policy answers are where a wrong answer causes direct harm to a member of the public. Pair prompt injection probes, which test whether instructions embedded in uploaded forms or web pages can override the assistant, with misinformation probes that check factual claims about policy. Reviewers will ask how these probes were chosen for the agency's own content, so record the probe families and the reasons for each.

Five generations and FAIL rates

By default garak makes 5 generations per prompt and marks a probe as FAIL with a failure rate when any attempt produces undesirable output. A single failed attempt therefore fails the probe, which is a stricter reading than a pass rate. Reviewers need to know the generation count used, because changing it changes the rate. Report the failure rate per probe alongside the setting, and decide in advance who reviews a FAIL and what remediation triggers a retest.

JSONL reports and garak.log retention

Each run writes a JSONL report of every attempt and its evaluation, and garak.log continues across runs for debugging. Together they form the evidence trail an AI governance review or procurement team will request. Set a retention period with the agency's records office, decide where the files are stored in the restricted network, and restrict access, since reports contain the prompts and model outputs that were tested. Confirm whether garak.log contents need the same handling as the reports.

garak user guide

Harness choice for repeatable runs

The default probewise harness runs each probe with its recommended detectors, which suits a first baseline. A reviewer comparing scans over time needs to know that the same harness and probe set ran each time, so write the harness into the configuration file rather than leaving it to defaults. Record the garak version too, since releases can change scores. Confirm the chosen harness against the release installed, as the agency's change board will want the configuration fixed before a scan is cited.

How a garak scan flows through an isolated government network

The scan starts on a garak host inside the restricted network, where the REST generator sends prompts to the agency assistant and its self-hosted model. Responses return to the detectors, which mark each attempt, and the run writes a JSONL report and a garak.log file. Before any package or container image crosses the boundary into the isolated network, it must be checked for integrity and authenticity, which is the control the diagram marks at the entry point. Confirm with your security team which evidence store is approved for report retention.

Scan data path through the isolated network, with the verified transfer point marked.

Rollout phases for a government garak scan programme

This sequence takes a government team from agreed scope and data boundaries to a repeatable garak scan programme whose results can be handed to procurement and AI governance reviewers. Each phase closes with a named output so the next phase starts from a documented position.

  1. Agree scope and data boundary

    The agency, the application owner, the security team and the data protection or records officer agree which assistant, model, endpoints and user groups are in scope, and which data categories must never reach a test run. The agreement names the test environment, who may view raw prompts and outputs, and where logs are kept. Done means a signed scope note that lists in-scope systems, excluded data classes and named owners for each decision.

  2. Install garak offline and verify packages

    The platform team builds an offline install host, using a package mirror or wheel bundle prepared on a connected system, and confirms the host runs Python 3.11 or newer. Each package and its hashes are checked against the mirror manifest before transfer across the isolated boundary, which is the same integrity question NERC CIP-013-2 raises for vendor software in other sectors. Done means a recorded inventory of installed packages, a verified version of garak and a test run that completes with no outbound calls.

  3. Run baseline scan on a test deployment

    The team points garak at a test deployment of the assistant, using a staging model and synthetic or public test documents rather than citizen records, and runs the default probe set with its recommended detectors. The run uses a fixed configuration file so the same settings can be repeated later. Done means a stored JSONL report, a garak.log file and a short list of failing probe families reviewed by the application owner.

  4. Tune configuration and review detectors

    Reviewers examine whether failing results are true weaknesses or detector false positives, and whether probes that match the assistant's actual exposure, such as document-injection or data-leakage probes, are included. Changes to generations, probe selection or system prompts are recorded in the configuration file with a reason. Done means a frozen configuration version and a detector review note that explains each retained or excluded probe.

  5. Remediate findings and rerun scans

    Teams fix the weaknesses they accept as real, which may involve system prompt changes, input or output filtering, retrieval restrictions or model replacement, and then rerun the frozen configuration. Results are compared against the baseline report to show which failure rates moved and which remain open. Done means a findings register with status, owner and the rescan result for each item, plus an explicit record of risks the agency accepts.

  6. Package evidence for procurement and governance

    The team assembles the scope note, install verification record, configuration versions, JSONL reports, detector review notes and findings register into one evidence folder with a readme that explains how each item was produced. Governance and procurement reviewers confirm which requirements the evidence addresses, such as the controls named in the agency's own baseline. Done means an evidence package the agency can version, retain and hand to reviewers, with a record of what the scans do not cover.

What procurement and AI governance reviewers ask to see

Which garak probes ran against the assistant?

Each garak run records the probes it executed, and the JSONL report lists every attempt with its evaluation, so reviewers can trace each result back to a named probe. The agency should define the probe set before the scan, tied to the assistant's exposure (for example, data leakage for assistants with access to case files, and prompt injection for assistants that read uploaded documents). Record the probe selection in a versioned config file, and state why each probe family was included or excluded. DeployOpen can help plan that selection and keep it reproducible, but the agency owns the scope decision and the risk acceptance that follows.

Which model version and endpoint were tested?

A garak report shows the generator and configuration used for the run, but it does not capture the full identity of the system under test on its own. Reviewers expect the exact model name, weights hash or container image tag, system prompt, retrieval settings and guardrail layers in place at scan time. The agency should export these from its model registry or deployment manifest and store them next to the report. Without that pairing, a clean result cannot be tied to the version that will go live.

How long are scan reports and logs retained?

Retention is set by the agency's records schedule and by any applicable federal or state rules, not by garak. Each run writes a JSONL report and appends to a garak.log file that continues across runs, so the agency must decide where these files are stored, who can read them, and how long they are kept. Reports may contain sample prompts and model outputs that are sensitive, so store them in the same classification boundary as the system under test. Confirm the retention period with your records officer and your governance board before the first scan.

How are failures triaged and who accepts residual risk?

garak marks a probe as FAIL with a failure rate when any of its attempts, by default five generations per prompt, produces undesirable output. That result is a signal, not a finding of severity, so each FAIL needs a documented review: whether the output is a true positive, how exposed the affected data or function is, and what mitigation applies. The agency should assign owners, set a severity scale and record who signs the risk acceptance for anything left open. DeployOpen can run the triage workshop and draft the findings register, but the accountable decision stays with the agency's system owner.

How do rescans follow changes to the assistant?

A scan is evidence for one configuration at one time, so reviewers expect a rescan whenever the model, system prompt, retrieval sources, tools or guardrails change. Set a change trigger list in the change management process and run the same versioned config each time, so results stay comparable. Note that garak upgrades can shift scores, so record the garak version alongside each report. Scheduled rescans in a restricted network typically run on a host the agency controls, and their frequency should follow the agency's own risk policy.

Does a garak report satisfy an audit or accreditation?

No. garak produces test results, and the report is an input to a review, not an attestation. Independent auditors and certification bodies decide whether controls meet a framework, and the agency's inspector general or assessor performs the independent assessments that FISMA and related programs require. DeployOpen prepares the systems, controls and evidence, including scan configuration, report packaging and remediation records, for those reviewers. The agency should confirm with its assessor which evidence format and which control identifiers, such as those in NIST SP 800-53, the review expects.

What does a scan cost and who pays for it?

garak is free to use under Apache 2.0, so the main costs are people, compute and hosting rather than licenses. Cost components include staff time to define probes and triage results, model compute for the generations (which scales with probe count and the default five generations per prompt), and storage and access controls for reports. Ask any partner for a fixed-scope quote that lists these components separately, and confirm whether retention, rescans and remediation support are one-time or recurring. Costs for hosted endpoints depend on the provider's own pricing, which the agency must check directly.

Compliance considerations that connect to garak evidence

Public sector assistants answer to several overlapping frameworks, and garak covers only part of what each one asks for. The cards below show where a scan result can serve as testing evidence, where a different control owns the requirement, and what to confirm with your assessors before relying on either.

Vulnerability scanning under RA-5

NIST SP 800-53 control family RA (Risk Assessment) includes RA-5, which covers vulnerability monitoring and scanning. The CJIS Security Policy references RA-5 for agencies handling criminal justice information. A garak run tests the model and application for LLM weaknesses such as prompt injection and data leakage, but it does not replace infrastructure vulnerability scanning. Ask your assessor whether they will accept LLM probe results as part of the RA-5 evidence set and how often they expect them to run.

SP 800-53 Rev. 5

CJIS cryptography for hosting

CJIS Security Policy version 6.1, which took effect on 26 June 2026, requires FIPS 140-3 certified modules or AES with at least 256-bit keys for criminal justice information in transit and at rest outside physically secure locations. This affects where an assistant can be hosted and which model servers, vector stores and logs can receive CJI. Before a scan, confirm with your CJIS Systems Officer which data the assistant may touch, since probe prompts and generated responses can contain sensitive content that must be stored under the same rules.

CJIS bulletin 2026-ISRS-001

FedRAMP scope for cloud-hosted assistants

FedRAMP applies to cloud products that create, collect, process, store or maintain federal information on behalf of an agency. An assistant hosted on a commercial cloud model API for a federal agency will usually fall inside that scope, while a single-agency system on cloud infrastructure that is not offered as a shared service may fall outside it. Determine the scope with your authorizing official before choosing a hosting path, and keep the garak generator configuration and report archives in the same authorized boundary as the assistant.

FedRAMP scope

CUI handling under NIST SP 800-171

Where an agency's assistant processes controlled unclassified information on a non-federal system, 32 CFR 2002.14(h)(2) directs agencies to use NIST SP 800-171 when setting protection requirements, unless the CUI category prescribes other safeguards. Scan reports can contain excerpts of CUI that a probe elicited, so store JSONL reports and garak.log files under the same marking and access rules as the source data. Confirm with your CUI program office how probe results should be labeled and who may read them.

32 CFR Part 2002

Supply chain integrity for scan tooling

NERC CIP-013-2 is an energy sector standard, so it applies only if the assistant supports a regulated utility. Its supply chain logic still translates well: verify the integrity and authenticity of software and packages before they enter a restricted network. For garak, this means checking the release you install against the published source and pinning the version, since report comparisons change between releases. Ask your team to record the version and hash of every package carried across an isolated boundary.

garak releases

WCAG deadlines are outside garak

The ADA Title II rule requires state and local government web content and mobile apps, including those provided through contracts, to meet WCAG 2.1 Level A and AA. Entities serving 50,000 or more people must comply from 26 April 2027, and smaller entities and special districts from 26 April 2028. garak does not test accessibility, so accessibility evidence needs a separate audit. Plan that work on its own schedule and do not cite garak results as accessibility conformance.

28 CFR Part 35

What a garak scan does not prove for a government assistant

A garak scan proves only what its probes and detectors tested, on the day they ran, against the model and configuration named in the report. It probes model and application behavior for weaknesses such as prompt injection, data leakage, jailbreaks and hallucination, but it does not replace accessibility testing, identity review, infrastructure hardening or records retention. A citizen-facing assistant that passes a prompt injection scan can still fail the ADA Title II web and mobile accessibility requirement, which the rule sets at WCAG 2.1 Level A and AA with compliance dates of 26 April 2027 for entities serving 50,000 or more people and 26 April 2028 for smaller entities and special districts. Accessibility testing with assistive technology, run by people who know the WCAG success criteria, is a separate workstream and belongs in the plan from the start.

Identity and infrastructure controls also sit outside garak's reach. garak will not tell you whether your single sign-on configuration limits internal staff to the roles they need, whether administrative consoles are reachable from the wrong network segment, or whether the self-hosted model server is patched. Those questions go to your identity, network and operations reviews, and for federal or criminal justice data they map to control families in NIST SP 800-53 Rev. 5 and, where applicable, the FBI CJIS Security Policy. Records retention is another gap: the JSONL report and the garak.log file are useful evidence, but they are not a records schedule. Confirm with your records officer how long scan outputs must be kept, where they are stored, and who can read prompts that may contain citizen data.

Treat scan results as a dated snapshot. A report reflects the probe set, detectors, generation count and model version in use on that run, so a change in any of them can move the failure rate without any change in the assistant's safety. Before comparing runs across garak releases or model updates, record the garak version (the current release is v0.17.1, released 16 October 2026) and keep the exact configuration with each report. Ask whether a new result is a true improvement or a change in measurement, and state in the governance file which scan date and model version the evidence covers.

What public sector teams ask before hiring help with garak

What drives the effort and cost of a garak engagement for a government assistant?

The main drivers are the number of endpoints in scope, the network restrictions around them, the number of assistants and models being tested, and the evidence format the review board expects. A single internal assistant on one reachable REST endpoint is a small job. Several citizen-facing and internal assistants, each behind different gateways, on hosts with no internet access, and reported in the format a procurement office or governance board requires, add setup, approvals and reporting work. Each engagement is fixed-scope, so the written scope sets the price. Ask the vendor to show how each driver is priced and which items are one-time (environment setup, custom detectors) and which recur (scheduled rescans after model or prompt changes).

Can our agency run garak itself without a partner?

Yes, in principle. garak is a command-line tool installed from PyPI with pip, and the PyPI package requires Python 3.11 or newer. Your team needs people who can write a REST generator configuration for the assistant, select probes, read the JSONL report and the garak.log file, and decide which failures are real. Teams that already run security testing and have a host with access to the endpoint usually handle the first scans in-house. Partner help is most useful for the parts that take experience: mapping findings to your control catalog, building a repeatable scan configuration, hardening the test host and writing the evidence pack. Confirm your team's skills and capacity before deciding.

How long does a garak scan take?

Scan time depends mainly on the number of generations per prompt and the size of the probe set. By default garak makes 5 generations per prompt, so a broad probe set on a slow endpoint takes much longer than a narrow one with fewer generations. Rate limits on the assistant, the speed of the model serving it and the detectors that run after each attempt also affect the total. Because each run writes a JSONL report of every attempt, you can estimate duration by running a small pilot set and multiplying by the planned probe count. Ask the vendor for the measured duration of a pilot run in your environment rather than relying on a general figure.

What does the agency need to provide for a garak engagement?

Most engagements need four things from the agency. First, a test environment that mirrors production as closely as the review allows, ideally a staging deployment with its own model and data. Second, endpoint access for the test host, including the REST address, authentication method and any gateway rules. Third, a named owner who can approve scan traffic, change rate limits and accept risk decisions. Fourth, a contact who owns each finding and its fix, such as the team that maintains the system prompt or the retrieval index. Confirm with your security office how test traffic is authorized, since some agencies need change tickets for scans against live systems.

Is garak free to use under the Apache 2.0 license?

garak is licensed under Apache 2.0, and the maintainers describe it as a free tool. Your agency can use it, modify it and run it in restricted networks without a license fee for the tool itself. The costs in a garak project come from people, infrastructure and model access: the time to configure and interpret scans, the hosts that run them, and any hosted model endpoints you test against, which may be billed per request. Check with your procurement office whether an open-source license still requires a supplier review for the software, and whether any third-party models or endpoints in your scan path carry their own terms.

Do we need real citizen data to test a government assistant with garak?

No. garak sends probe prompts to the assistant and evaluates the responses, so testing does not require real citizen records. Probes for data leakage can be run against synthetic records that look like the data your assistant can reach, which keeps personal information out of test logs and reports. Set up the test environment with fake identities, and make sure garak.log and the JSONL report are stored in a location approved for the classification of the system under test. If your assistant handles criminal justice information or other regulated data, confirm with your compliance office how test data and reports are classified before the first run.

What evidence do procurement and AI governance reviews usually expect from a garak scan?

Reviewers usually want to see what was tested, how it was configured, what failed, and what was done about it. A useful evidence pack includes the scan configuration file, the probe selection and generation count, the version of garak used, the JSONL report and the failure rates per probe, and a record of remediation and retesting. Mapping results to the control frameworks your agency already follows, such as NIST SP 800-53 controls selected by your system's baseline, helps reviewers place each finding. Confirm the exact format with the procurement office and the governance board early. Note that DeployOpen prepares evidence for reviews but does not issue audit reports or certifications.

What happens to scan results when garak is upgraded?

Scores can shift between garak releases, so a result from an older version is not directly comparable with one from a newer version without a check. Record the garak version in every report, keep the scan configuration under version control, and rerun a baseline set on the new version before comparing results over time. The current release at the time of writing is v0.17.1, released on 16 October 2026, and the project's release notes on GitHub describe changes between versions. Plan upgrades on a schedule your governance board can see, so a reviewer does not confuse a tooling change with a change in the assistant.

How DeployOpen scopes and delivers garak work for public sector teams

DeployOpen plans and runs garak scans for public sector LLM applications inside the agency's or public body's own infrastructure, including restricted and air-gapped networks. The work is fixed-scope, with the probes, targets, evidence and handover agreed in writing before testing starts.

How we scope

  • Confirm which assistant, endpoint and model versions are in scope, including whether it is citizen-facing or internal.
  • Agree the probe families and detectors against the data the assistant can reach, such as case files or records.
  • Document the network path, hosting location and approved model sources that the scan must respect.
  • Set written deliverables, including the JSONL reports, findings summary and evidence package for governance reviews.

How we build

  • Install garak and its dependencies from a vetted package set, verified before it is carried across any isolated boundary.
  • Configure the REST generator or direct model connection with a repeatable YAML file kept under version control.
  • Run baseline scans with the agreed probes, then targeted runs on findings, keeping generations and seeds consistent.
  • Test the surrounding application controls, such as system prompts, access rules and output handling, not only the model.

How we hand over

  • Deliver the garak configuration, run scripts and logs so your team can rerun scans without DeployOpen.
  • Provide a written findings report that maps each failure to the affected component and a suggested remediation owner.
  • Explain how to read the JSONL reports and compare runs across garak releases before drawing conclusions.
  • Retest agreed fixes and record the results alongside the original runs for procurement and AI governance files.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after the initial engagement ends.
  • Retainers can cover scheduled rescans after model, prompt or endpoint changes, and garak version upgrades.
  • Ask during scoping which retention period, storage location and access controls apply to scan logs and reports.
  • Confirm with your security and records teams how scan evidence will be reviewed before the engagement starts.

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.