Selecting garak probes with --spec and tags

Selecting garak probes with --spec and tags decides what a scan tests, so the run covers the risks of your application instead of every probe available. This page explains the selection options, the trade-offs and how to set them up.

On this page

Selecting garak probes with --spec and tags to match your application

A team that already has garak installed still has to decide what it runs against a specific application, and that decision is where probe selection with --spec and tags narrows the scan to the risks that matter. Running every available probe against a customer support assistant or an internal retrieval tool produces a long report full of results that do not relate to how the application is built, exposed or used. garak is an Apache 2.0 licensed command-line tool installed from PyPI, and the PyPI package requires Python 3.11 or newer. It probes LLMs by combining static, dynamic and adaptive probes, so the choice of probes determines both the attack styles tested and how much inference the scan consumes.

Teams need selection for three reasons: scope, run time and evidence. Scope means matching probes to the application's exposure, such as prompt injection for a tool-using agent or data leakage for a system that handles customer records. Run time matters because every probe multiplies the number of prompts sent to the target, which affects cost on a hosted endpoint and how long a scheduled rescan takes. Evidence matters because a reviewer asking what was tested needs a scan whose probe list can be explained and repeated. Before the first run, confirm the installed version with garak --version and check the probe list for your release, since probe names and tags change between releases.

This page does not list every probe. It explains how to choose them. The sections that follow cover the probe families, the tag and spec syntax, the tier information shown by --list_probes, and how include and exclude lists fit into a repeatable configuration. Treat the probe list as a decision you record, not a default you inherit, and confirm the exact selectors against the garak user guide for the release you run.

Ways to pick probes: families, single probes, tags and tiers

garak offers several parallel ways to choose what a scan runs, and they can be combined. Each method answers a different question: which weakness family matters, which exact probe to rerun, which compliance or risk taxonomy a finding maps to, and how deep a scan should go. Confirm exact flag syntax in the garak user guide before you write scan scripts.

Probe families

A family groups probes that test one kind of weakness, such as prompt injection, data leakage or jailbreaks. Selecting by family fits a first scan of an application when you know which failure classes worry the business, but have not yet mapped them to individual probes. Check the family list printed by your installed version, because names and contents change between releases. Confirm that each family includes probes that match the way your application accepts input.

garak user guide

Single probes

Selecting one probe by name runs only that attack technique against the target. This suits reruns after a fix, a targeted investigation of one finding, or a regression check in a pipeline where runtime matters. Single probes are narrow, so a clean result says little about other techniques. Pair them with a broader family run before you report a target as tested, and record the exact probe name in your scan configuration.

OWASP and other tags

Tags attach probes to external taxonomies, such as OWASP categories for LLM applications, so a scan result can be read against a framework your security or governance team already uses. Tags fit reporting and mapping work, but a tag is only as accurate as its assignment in the probe metadata. Confirm which tags your installed version supports and whether each tag covers the risks you need to evidence, rather than assuming full coverage.

Probe tiers in list probes

The tier shown by --list_probes, added in garak v0.14.1, lets you see how probes are graded before you select them. Use it to decide how wide a scan should be for a given budget and risk level, and to justify the selection in a scan plan. Tiers describe how the probe is classified in the project, not your risk, so check the meaning of each tier in the user guide and map it to your own application risk before using it as a cutoff.

Which selection option fits which scan goal

This table compares the main ways to choose garak probes, from a single probe to a broad family or tag-based sweep, and shows what each selects. Read it by matching your scan goal to a row, then confirm exact option names against your installed garak version with --list_probes before you commit a run configuration.

Selection optionWhat it selectsBest fitMain risk of over- or under-selecting
Single probe nameOne named probe, such as one jailbreak or encoding techniqueReproducing a finding or retesting a fix for one weaknessUnder-selecting: a fix can pass while sibling probes still fail
Probe family (module)All probes in one family, such as a data leakage or prompt injection groupFocused testing of a risk class that matches your application's exposureOver-selecting: long runs on families that do not apply to a retrieval-only or no-tool app
Tag selection (for example OWASP tags)Probes labeled with a shared framework tag across familiesMapping results to a named framework for reporting and reviewUnder-selecting: tags may cover only part of a risk, so gaps stay hidden
Include and exclude listsA custom set built by adding or removing named probes or familiesTrimming a broad scan to remove probes irrelevant to your deploymentExcluding probes that would have caught a real exposure; keep exclusions documented
Tier shown by --list_probesProbes grouped by the tier label that garak displays in its listing outputChoosing a scope by depth, starting narrow and widening after reviewAssuming a tier means a fixed risk level; check what each tier contains in your version
Broad default sweepThe wide set of probes garak runs without narrowing selectionBaseline scan of an unfamiliar endpoint before you define scopeRun time and noise grow with scope, and many findings may not apply to your use case

How a probe selection becomes a scan

The diagram starts with the application risks the team has written down, then moves through the selection method (family, probe, tag or tier) and the include and exclude lists. The selected probes then run under the default probewise harness, which applies each probe's recommended detectors, and the scan ends with the JSONL report of every attempt. It is illustrative: check the probe list that --list_probes returns for your installed version before you trust a selection.

Illustrative flow from application risks to the JSONL report.

Set up a repeatable probe selection

This sequence turns an application's risks into a written, version-controlled list of garak probes, so every later scan runs the same intended set. The output is a config file and a short scan report that you can check against the selection.

  1. Install garak from PyPI

    Create a virtual environment on a Linux or macOS host running Python 3.11 or newer, then install garak with pip from PyPI. Pin the version you install, since the probe catalog and output format can change between releases. Done when running garak with the help flag prints its command-line options without errors. Check the installed version against the release notes on the NVIDIA/garak releases page before you rely on any probe names.

  2. List probes and check their tiers

    Run the list-probes command to print the available probes. Since garak v0.14.1, the output includes each probe's tier, so you can see which probes are broader or narrower before choosing them. Save the output to a file in your repository so the catalog you selected from is on record. Done when you can name the probe families that match your application and their tiers. If your version's output lacks tiers, confirm the version in the release notes before relying on tier labels.

  3. Map application risks to probes and tags

    Write down the risks your application actually carries, such as prompt injection through retrieved documents, data leakage from a system prompt, or unsafe tool use. For each risk, identify the probe families, single probes, and tags that test it, and record which ones you are leaving out and why. Involve the team that owns the application so exclusions have an owner. Done when every risk on the list maps to at least one probe or tag, and every exclusion has a stated reason.

  4. Write the selection into a version-controlled config

    Express the chosen probes in a YAML run config using the probe selection keys described in the garak user guide, and commit it to the same repository as your application's test assets. Keep the list of excluded probes in the file or in a comment next to it. Done when the config file is committed, a reviewer can read the intended probes and exclusions without running garak, and the commit identifier is recorded for later comparison.

  5. Run a small scan with the config

    Run garak against a test endpoint using the committed config, keeping the scan small enough to finish quickly while you confirm selection behavior. Use a target you control, and confirm the generator settings match the application's model and endpoint. Done when the run completes and garak reports the probes it executed in its console output and log file.

  6. Verify the JSONL report lists only intended probes

    Open the JSONL report written by the run and extract the set of probe names from each attempt record. Compare that set with the list in your committed config, and confirm that no excluded probe appears and no intended probe is missing. If there is a mismatch, fix the config, commit the change, and rerun before the scan is used for any decision. Done when the two lists match exactly and the verification result is saved with the report.

How probe selection changes results and evidence

A narrower probe selection makes a garak run shorter, but it also makes the run blind to whatever it leaves out. A scan limited to a few probes returns a clean-looking result that says nothing about the families it skipped. Before you narrow a selection, write down which risks the application actually carries, such as data leakage from a retrieval index or prompt injection through a tool, and check that each one maps to at least one selected probe. The report only speaks to what ran, so a pass on a short list is a pass on that list and nothing more. Record the omissions as deliberate decisions so an auditor or a reviewer can see that the gaps were chosen, not overlooked.

Each selected probe runs with the default of 5 generations per prompt, and a probe is marked FAIL with a failure rate when any attempt produces undesirable output. That means the total number of attempts, and therefore inference cost, scales with the number of probes you select, not just with the number of prompts inside them. Adding a broad tag can multiply attempts quickly, so estimate the attempt count from --list_probes before a long run. Confirm the generation setting in your own configuration, because changing it alters the failure signal for every probe in the selection at once.

Comparisons over time only hold when the selection stays fixed. If a rerun adds a probe, drops one, or picks up new probes after an upgrade, a change in the failure rate may reflect the selection rather than the model or prompt. Keep the --probes, --probe_tags and --spec values in version control alongside the garak version and the target configuration, and treat any change to them as a new baseline. The JSONL report records each attempt and its evaluation, so store it with the exact command or config that produced it. Then, when a result moves, you can tell whether the application changed or the test changed.

Security and operational considerations for selected scans

A probe selection is only as safe as the environment it runs in. The cards below cover the credentials, authorization, stored outputs and CI habits that surround a scan, so the list you choose stays both defensible and repeatable.

Credentials for the target endpoint

A scan config for a REST or hosted endpoint usually carries an API key or bearer token. Keep that value out of the YAML file that goes into version control, and reference it from an environment variable or the secrets store your team already uses. Check who can read the config directory on the scanning host, and rotate the credential after any scan run from a shared or temporary machine. A probe list does not limit what the credential can reach, so scope the key to the minimum the test needs.

Scanning only authorized systems

Broad probe selections send many adversarial prompts to the target, and some of them can trigger rate limits, cost overruns or alerts in the provider's abuse monitoring. Before you select probes, confirm in writing that the owner of the endpoint has approved testing against it, including the environment, the time window and any third-party model provider whose terms apply. Record that approval next to the scan config so the run can be justified later.

Handling JSONL reports

Each run writes a JSONL report of every attempt and its evaluation, so the file holds the attack prompts and the model outputs, which may include system prompt fragments, retrieved documents or personal data from your application. Store reports with the access controls you apply to other security test evidence, set a retention period your data policy allows, and avoid pasting raw lines into tickets or chat channels. Redact before sharing findings outside the test team.

Storing garak.log across runs

The garak.log debugging file continues across runs rather than starting fresh each time, so it accumulates request details, error messages and timing from every scan on the host. Decide where it lives, how long it is kept and whether it rotates, and make sure it does not capture secrets echoed in error responses. When you compare runs for a selection, note which log belonged to which run so troubleshooting does not mix results from different configurations.

Selection drift in CI

A probe list written once and reused in a pipeline can quietly change meaning when garak adds, renames or retiers probes in a new release. Pin the garak version in the pipeline, store the exact --spec or include and exclude values in version control, and record the probe list each run actually executed. Review the list after every upgrade, since a changed selection can make scores look better or worse without any change in the application.

Air-gapped hosts

Scans on isolated networks need the garak package, its Python dependencies and any detector or model assets staged in advance, since the tool cannot fetch them on demand. Confirm which probes and detectors depend on resources that must be downloaded, and test the selection on a connected host before moving it across. Plan how reports leave the enclosure, because the transfer path is also a data handling decision.

Minimum Python version
3.11

Questions teams ask before selecting garak probes

Is garak free to use for commercial testing?

Yes, the garak maintainers describe it as a free tool, and it is licensed under Apache 2.0. The license terms, copyright holders and any support options are covered in the garak buyer's guide, so confirm them with your legal team before you build a scanning program on it. Your costs come from the work around the tool: the people who choose probes, the inference calls made against your model or application during scans, the hosting for scan runs, and the time spent reviewing results. Garak itself does not charge for those.

How long does choosing garak probes take?

The time depends mainly on how well the application's risks are already written down. A team with a clear list of threats, data types and user roles can map them to probe families and tags in a working session or two. A team that has to first agree on what the application should refuse, which data must stay private and who owns each risk will spend longer on that agreement than on the tooling. Ask any partner to show the selection worksheet, the list of probes it produces and the decisions still open before work begins.

Can an internal team select garak probes without outside help?

Yes, a team with an engineer who knows the application and a security or risk owner who can sign off on priorities can do this internally. Start by running garak --list_probes on the installed version, which shows probe tiers from v0.14.1 onward, and then narrow the set using the --spec and tag options. Outside help is most useful when the team lacks AI red-teaming experience, when several applications share one scanning standard, or when the results must be defended in a compliance review.

What does a partner's probe selection work include?

A partner's work usually covers four parts:

  • An application profile covering the model, system prompt, tools, data sources and users
  • A written mapping from the application's risks to garak probe families, tags and individual probes, with the reason for each choice
  • Include and exclude lists saved as configuration files that your team can rerun
  • A short review of what the chosen probes will not test, so gaps are visible before the first scan

The scope, deliverables and timeline are agreed in writing before work starts, and the quote follows from that scope.

What makes probe selection effort go up?

Effort rises with the number of applications, since each one has its own endpoint, system prompt and risk profile. It also rises with custom probes, because a policy or attack pattern that garak does not ship must be written and reviewed (see the custom plugins content for that work). Evidence requirements add effort when an auditor or customer needs a documented link from each risk to each probe and a record of why probes were excluded. Multilingual use, tool-using agents and retrieval pipelines also add cases to cover. Each of these should be listed in the scope so the quote reflects them.

What does our team need to provide for probe selection?

The team needs to provide an application profile that describes what the system does, which model or endpoint it calls, what the system prompt says and which tools or data sources it can reach. Engineers must give test access to a non-production endpoint that matches production behavior, along with credentials scoped for testing. Named risk owners, such as a product lead, a privacy officer or a security lead, must confirm which risks matter and which are accepted. Without these inputs, probe choices reflect guesses, so confirm access and owners before any scan is scheduled.

Should we pick probes by tag or by manual list?

Use tags when you want broad coverage that follows a published taxonomy, such as the OWASP tags, and when you want the set to update as garak adds probes under those tags. Use a manual list of probe families or single probes when you need a fixed, reviewable set that stays the same across releases, or when only a few risks apply to a narrow application. Many teams combine both: a tag-based baseline for coverage plus an explicit include list for the application's highest risks, with exclusions documented. Pin the garak version either way, because a new release can change what a tag selects.

Will the selected probes catch every risk in our application?

No, and no probe selection can promise that. Probes test the risks they were written for, under the conditions the scan creates, so a clean result means only that the chosen probes did not produce undesirable output in that run. Selection should therefore state which risks are not covered and why, such as a risk handled by another control. Ask for that statement in writing, and treat it as an input to your wider security testing rather than as a complete assessment.

How DeployOpen scopes garak probe selection

DeployOpen plans garak probe selection as part of a written scope, starting from the application's real exposure rather than a default probe list. The work covers which probe families, tags and single probes run against your endpoint, and how the selection is documented so the scan can be rerun later.

How we scope

  • Map the application's risks, data and user exposure before choosing any --spec or tag values
  • Agree in writing which probe families, OWASP-style tags and single probes are in and out of the run
  • Confirm the garak version and the --list_probes output your team will use, since probe tiers vary by release
  • Record the include and exclude lists so the selection can be reviewed by security and compliance teams

How we build

  • Build the probe selection as a versioned file, so each scan uses the same probe set unless a change is approved
  • Check each selected probe against the target's architecture, such as a chat UI, RAG pipeline or tool-using agent
  • Test the selection on the target endpoint to confirm the probes run as intended before the full scan
  • Review the probe tiers chosen and document why lower-tier or experimental probes were included or left out

How we hand over

  • Deliver the probe selection files, run commands and a short guide explaining each include and exclude choice
  • Document the garak version, Python environment and endpoint settings needed to repeat the selection
  • Walk your engineers through how to change the selection safely and how to record that change for comparisons over time

How we support

  • Review the probe selection again when garak releases change probe names, tags or tiers
  • Available as a retainer for rescans, selection updates after application changes and ongoing testing
  • Confirm support terms, response expectations and upgrade handling in the written scope before work 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.