Why scanning vision-language models with garak needs its own test plan
A text-only scan does not show whether a multimodal model follows instructions that arrive inside an image. Image input is a separate attack surface, and a team that has run garak against the text side of a vision-language model has only tested part of what users can send. garak's visual_jailbreak module covers the missing part. It writes instructions into an image, so the model reads the request visually rather than as text that its alignment training was built to catch. The module is based on the FigStep paper and provides two probes, FigStep and FigStepFull. Any model or application that accepts user-supplied images, including chat assistants with upload buttons, document review tools and agents that read screenshots, needs this test in its plan.
The test plan should start with the question of what the image path can reach. Confirm whether the target model is served through a route garak supports for image input, such as the NIM generator classes NVMultimodal and Vision in generators/nim.py, or the LLaVA class in the Hugging Face generator module. If your deployment uses a different serving stack or a wrapper that drops image parts, a text-only scan will still run and report results, so verify with a known image prompt that the image actually reaches the model before reading any score. Also confirm whether your application adds its own text system prompt, moderation layer or image preprocessing, because each of these changes what the model sees and what a pass means. Record the exact model version, endpoint and configuration so the result can be repeated later.
Which garak generators accept image input
garak's NIM generator module includes NVMultimodal and Vision classes, which are the entry points for sending image input to models served through NVIDIA NIM endpoints. The classes are defined in the generator source, so the first step is to read the version of the source you have installed, because class names and options can change between releases. The FigStep probes depend on the generator passing the image along with the prompt, so a scan only tests the visual channel if the endpoint actually accepts it.
- Endpoint: Supply the NIM endpoint URL that serves the multimodal model, reachable from the host running garak.
- Model name: Set the model identifier exactly as the endpoint expects it, since a mismatch typically produces errors or a silent fallback to a different model.
- Credentials: Provide the API key through an environment variable or a secrets store, not a value written into a shared config file.
- Image handling: Confirm that the specific model accepts image input through the chat format the class uses, and that the endpoint does not strip or resize images in a way that changes the test.
- Output check: Inspect a few raw responses from a single FigStep attempt to confirm the model described the image, which shows the instruction reached the model.
Before relying on results, confirm with the model provider or your NIM deployment documentation which image formats, sizes and message structures the model supports.
garak's Hugging Face generator module includes a LLaVA class, which loads LLaVA-style vision-language models so that image input can be passed alongside text. Because the model runs through the Hugging Face stack, the scan depends on the local hardware, the model weights and the library versions installed on the host. Results are only comparable across runs when those components stay fixed.
- Model source: Point the generator at the Hugging Face model identifier or a local copy of the weights that your organization has approved.
- Hardware: Confirm the host has enough accelerator memory for the chosen model, since vision-language models are often larger than their text-only counterparts.
- Library versions: Pin the transformers and related packages so the image preprocessing does not change between runs.
- Credentials: If the model is gated, supply a Hub access token through an environment variable and confirm the license terms allow your intended testing.
- Image handling: Check the model card for supported image resolutions and prompt templates, since a template mismatch can make the model ignore the image.
Before relying on results, confirm the model card's image input format and test a known benign image to verify the pipeline reads it.
Not every multimodal model you deploy will map onto the NVMultimodal, Vision or LLaVA classes. A model served behind your own gateway, a hosted API outside NIM, or a newer architecture may need a custom generator or a REST connection, and that path changes what you must verify. The question to answer first is whether the model receives the image as a true visual input or whether your application converts it to text, such as through OCR, before the model sees it. Those two cases test different things.
- Input path: Determine whether the application passes raw image pixels to the model or extracts text from the image first.
- REST endpoints: If you use a REST connection, confirm how the image is encoded in the request body, such as base64 inside JSON, and that the response is parsed correctly.
- Custom generators: Plan for a custom generator when the model does not match a supplied class, and review the plugin guidance in the garak user guide before writing one.
- Comparison runs: Run the same FigStep probe through a text-only path and an image path to show what the visual channel adds.
- Version tracking: Record the garak release used, since the vision-related classes may change between versions.
Before relying on results, confirm with the model owner exactly how images reach the model in production, because a scan that bypasses that path does not test the deployed system.
Configuration options and when each fits
This table compares the three choices that shape a vision-language scan: which visual probe to run, which generator reaches the model, and how many generations to request per prompt. Read each row against the trade-offs in run time, hosted call cost and comparability with earlier runs. The main takeaway is that the probe and generator decisions should be fixed once, recorded in a config file, and kept stable so that later results can be compared.
| Option | What it does | Trade-off | When it fits |
|---|---|---|---|
| FigStep probe | Runs the FigStep visual jailbreak, which writes instructions into an image for the model to read | Smaller prompt set, so a faster and cheaper first pass; covers one attack pattern | First scan of a multimodal model or a baseline before a model change |
| FigStepFull probe | Runs the broader FigStep variant from the same visual_jailbreak module | Larger prompt set, so longer run time and more hosted calls; results are less directly comparable to a FigStep-only run | Release gates or periodic deep scans where coverage matters more than speed |
| NIM Vision or NVMultimodal generator | Sends image and text inputs to a NIM-hosted multimodal model through garak's NIM generator classes | Depends on a hosted endpoint: per-call charges, rate limits and provider-side model changes all affect results; confirm the exact model name and version in your account | Models you already serve through NVIDIA NIM and want tested in place |
| Hugging Face LLaVA generator | Loads a LLaVA-family model from the Hugging Face generator module | Runs on your own hardware, so cost is mainly compute time and GPU availability; the model build and dependencies must be pinned for repeatable runs | Open-weight vision models you host locally or in an air-gapped environment |
| REST generator with image payloads | Posts image data to your own multimodal endpoint using a YAML description of the request and response format | Most flexible for custom gateways and guardrails, but the payload format, encoding and response parsing must be written and checked by your team | Applications where the vision model sits behind your own API, a guard or a retrieval layer |
| Default 5 generations per prompt | Makes five attempts per prompt and marks a probe FAIL if any attempt produces undesirable output | Highest sensitivity to intermittent failures, with the most hosted calls and longest run time | Pre-release or compliance-evidence scans where a single unsafe output matters |
| Fewer generations per prompt | Reduces attempts per prompt, lowering call volume and time | Misses failures that appear only on some attempts, so a pass is a weaker signal; scores are not directly comparable with five-generation runs | Quick iteration during development, with a full-count run before any decision |
| Fixed config file across runs | Records the probe, generator and generation count so every run uses the same settings | Requires discipline to update; any change should be noted so that score shifts are not mistaken for model changes | Any scan you plan to repeat, compare over time or show to an assessor |
Setting up a garak multimodal scan step by step
This sequence takes a team from a clean host to a completed FigStep run against a vision-language model. Each step ends with a check, so a connection problem or an image that never reaches the model is caught before any probe results are read. The run produces a JSONL report and a garak.log file that record what was sent and what came back.
Install garak from PyPI
Create a Python environment on a Linux or macOS host running Python 3.11 or newer, then install garak from PyPI with pip. The engineer running the scan does this work, and it repeats whenever the scanning host is rebuilt. Confirm the install by running
python -m garak --helpand check the version it reports against the release you intend to pin, such as v0.17.1, which was released on 16 October 2026. Record the version in your scan notes, because scores can shift between releases.Confirm the endpoint accepts images
Before writing any configuration, check with the model provider or your platform documentation that the deployed model accepts image input through the API path garak will use. Many chat endpoints accept only text, and garak cannot test image handling that the endpoint does not expose. Send one small test image with a short question through that same API path and confirm the model describes the picture. If the reply ignores the image, resolve the endpoint before continuing.
Choose the matching generator class
Select the garak generator that matches how your model is served. The NIM generator module includes NVMultimodal and Vision classes, and the Hugging Face module includes a LLaVA class, so check which class fits your serving path. If your model sits behind a custom REST service, the REST generator is the alternative, but confirm the service can carry image data in its request body. Record the generator name in your scan notes, since the rest of the run depends on this choice.
Write the scan configuration file
Create a YAML configuration file that names the generator, the model identifier, the endpoint address and the credential reference, and that selects the visual_jailbreak probes for the run. Reference API keys through environment variables so the file itself holds no secrets. Take exact configuration key names from the garak user guide for your chosen generator and confirm them with
python -m garak --help. Validate the file by starting a minimal run and confirming garak loads it without configuration errors.Run a text-only baseline
Run a short text-only probe against the same generator and model before any image test. This shows whether the endpoint answers normally through garak and gives you a reference for how the model handles plain-text requests it should refuse. Keep the response and its report entry. If the baseline fails because of authentication, formatting or connection errors, fix those first, because a FigStep failure would otherwise be hard to attribute to the model.
Run the FigStep probe
Run the FigStep and FigStepFull probes from the visual_jailbreak module against the endpoint using the configuration from the earlier steps. FigStep writes instructions into an image to bypass text-based alignment. Watch the console to confirm that requests are sent and responses come back. Check that the run produced attempts rather than errors before waiting for it to finish. By default garak makes 5 generations per prompt, so expect several attempts for each prompt.
Check the JSONL report and log
Open the JSONL report and confirm it lists each attempt with its evaluation. Then open garak.log and check that image requests succeeded and that no endpoint errors were dropped without notice. Spot-check several FigStep attempts to confirm the image reached the model, for example by seeing the model refer to visual content in its reply. Save the report and log together with the configuration and garak version so the run can be repeated and compared later.
How an image probe travels from garak to the model and back
The run starts on the scanner host, where a garak probe builds an image with the instruction written into it and passes it to a generator. The generator sends that image to a NIM or Hugging Face endpoint, which may sit outside your trust boundary, and the model's text reply returns to a detector that judges whether the output is undesirable. Each attempt is then recorded in the JSONL report and the garak.log file, so check which side of the boundary hosts the endpoint and where those files are kept.
Image probe flow from garak to a vision-language model endpoint and back.
Security and operational considerations for multimodal scans
A multimodal scan sends images, prompts and model outputs across a boundary you have to control, and it writes evidence that can itself be sensitive. The cards below cover the places where a vision-language scan most often leaks data, exposes credentials or runs up cost. Check each one before the first scan against a production-adjacent endpoint.
API keys in config files
Endpoint credentials for NIM, Hugging Face or a REST gateway usually live in a garak configuration file or environment variable. Keep keys out of the YAML files that teams commit to version control, and load them from a secrets store or the runtime environment at scan time. Use a key scoped to the test endpoint and rotate it after scans run from shared hosts. Confirm which variable or config key your garak version reads for each generator before you write the file.
garak user guideAdversarial images and harmful outputs
FigStep probes generate images that carry harmful instructions as rendered text, and the model's replies may contain the content the probe was designed to elicit. Store generated images and responses in a restricted location with a defined retention period, and label them as sensitive test artifacts. Decide who may view them before the scan starts, and keep them out of general ticketing systems and chat channels where they would be copied without context.
Data residency for hosted endpoints
When images are sent to a hosted NIM or Hugging Face endpoint, the image content, which may include screenshots of internal documents or customer data used as test inputs, leaves your network. Confirm with the provider where inference runs, how long request data is retained and whether it is used for training. If your data rules forbid this, plan a self-hosted vision model reachable only from your network instead.
Access control on the JSONL report
Each run writes a JSONL report that records every attempt and its evaluation, which for multimodal probes can include the prompt text, the generated output and references to images. Restrict read and write access to the security team that owns the scan, set file permissions on shared hosts, and avoid copying reports into wide-access dashboards. Treat the report as a record of your model's weaknesses, not as a neutral log.
Rate limits and repeated run cost
Image requests are usually more expensive and slower than text requests, and garak makes 5 generations per prompt by default. A FigStep run across several prompt sets multiplies that cost on every rescan after a model or prompt change. Ask the provider for image pricing and rate limits in writing, set a request budget per run, and schedule reruns only when the model, the configuration or the probe set changes.
Keeping secrets out of garak.log
The garak.log debugging file continues across runs and can record request details, so an endpoint URL with a token in its query string or an error message echoing headers can end up in the log. Review the log after a test run, configure the logging level for shared hosts, and remove or redact entries before the file is archived. Add a check to your pipeline that scans logs for key patterns before they are copied elsewhere.
Questions teams ask before scanning vision-language models
What drives the cost of scanning a vision-language model with garak?
Cost comes from three places: the model endpoint, the number of runs, and the staff time to set up and read results. If you host the model yourself, the main cost is accelerator capacity for every generation garak sends, including the image inputs used by FigStep. If you call a hosted endpoint, the cost is the per-request charge from that provider. garak itself is free to use. Multiply probe count by generations per prompt by repeat runs to estimate request volume, then price that against your endpoint terms. Ask any service provider for a quote that separates one-time setup, per-run compute, and recurring rescans.
How long does a garak scan of a vision-language model take?
Duration depends mainly on the probe set, the number of generations per prompt, and the response time of your endpoint. garak makes 5 generations per prompt by default, so a broad run multiplies quickly. The visual_jailbreak module offers FigStep and FigStepFull probes, and each one sends image prompts that are typically slower to process than text. A narrow run limited to the visual probes against one model version finishes far sooner than a full sweep. Measure one small run first, then scale the probe list and generation count to your time window. Rate limits on hosted endpoints often set the real pace.
What must our team provide before a vision-language model scan?
You need four things ready before the run starts:
- Endpoint access: a URL or API credentials for the NIM, Hugging Face or other generator that accepts image input, with rate limits known.
- Model version: the exact model name, revision and any serving configuration, so results can be repeated later.
- Sample images: representative images for your use case, such as scanned documents, screenshots or product photos, so you can judge whether a finding matters in practice.
- Policy definitions: a written list of what the model must not do, such as revealing internal data or following instructions embedded in an image, so detector results map to your rules.
Confirm each item with the team that owns the endpoint and the model.
Can an in-house engineer run garak against a vision-language model?
Yes, if the engineer can install a Python tool, configure a generator, and read a report. garak is a command-line tool installed from PyPI, and the package requires Python 3.11 or newer. The harder part is the generator configuration for an image-capable endpoint, which depends on how your model is served. Your engineer also needs to interpret FAIL results in context, since a visual jailbreak finding may not reflect your actual exposure. Teams without prior LLM security experience often ask for an outside review of the first run and the policy mapping. DeployOpen can plan and run that work as a fixed-scope engagement, with scope agreed in writing before work starts.
Is garak licensed for commercial use under Apache 2.0?
garak is licensed under the Apache 2.0 license, and it is developed in the NVIDIA GitHub organization. Apache 2.0 is a permissive open-source license, so your organization can use the tool internally, including for scans of commercial systems, without paying a license fee to the maintainers. Read the license text and any notices in the repository before redistributing modified copies or bundling garak into a product. Your legal team should confirm how the license applies to your own use. The garak README on GitHub is the place to start that review.
Are garak results enough evidence for a compliance review?
No. A garak report shows what happened in a set of attempts against one model configuration on one date. It does not, on its own, prove that a control works, and it does not issue an audit opinion or certification. Auditors and certification bodies decide what evidence is sufficient for their assessment. A useful package usually includes the exact probe list and configuration, the JSONL report, the model version tested, the policy the results were measured against, and a record of how findings were fixed and retested. DeployOpen prepares systems, controls and evidence for compliance assessments, but independent auditors issue the outcome. Ask your assessor early what format they expect.
What does a garak run on an image model actually produce?
Each run writes a JSONL report that records every attempt, the prompt and image sent, the response, and the evaluation. It also writes a garak.log file that continues across runs, which helps when you debug a failed generator. By default garak makes 5 generations per prompt and marks a probe as FAIL with a failure rate when any attempt produces undesirable output. Review the individual attempts, not only the summary, because a single failing image can reveal a pattern worth fixing. Keep the report with the configuration and model version so a later rerun can be compared directly.
What to do when FigStep finds a failure
Confirm the failure reproduces before anyone changes a control. garak runs each probe with several generations per prompt by default, and it marks a probe as FAIL when any attempt produces undesirable output. A single FigStep hit may be a sampling artifact, so open the JSONL report for the run, find the attempts behind the failure rate, and rerun the same visual_jailbreak probes against the same model and endpoint settings. Record the image set, the generator class (for example the NVMultimodal, Vision or LLaVA class), the temperature and any system prompt. Those details decide whether the finding is stable enough to act on and what the engineering team needs to reproduce it.
Once the failure reproduces, decide where the fix belongs. A FigStep image carries its instruction as pixels, so text-only controls on the prompt will not see it. Options include changing the model or its alignment, adding or tuning an image-input filter that screens uploads before they reach the model, adding output moderation that checks what the model returns, or tightening the application's permitted-use rules and the features that accept images. Confirm with the model vendor what safety training and input controls the deployed model already includes, and confirm which layer your platform team can change without redeploying the model. Often more than one layer is needed, and each choice should be written down with its owner.
Schedule a rescan after each change, and treat it as a separate test. Run FigStep again against the identical configuration, then rerun it against the full application path that users reach, since a fix in one layer can be bypassed or can shift behavior elsewhere. Compare the new report with the baseline using the same probe set and generation count, and keep both reports as evidence of what changed. Set a rescan cadence tied to model updates, filter changes and new releases of garak, because scores can move between versions, and confirm with your team whether a fix needs a human red team review before it is accepted.
How DeployOpen scopes and delivers multimodal garak testing
The sequence turns a vision-language model or multimodal application into a fixed written scope, a reproducible garak run inside your infrastructure, and a findings report with a retest. Each step closes with a named output so both parties can confirm progress.
Agree the written scope and target inventory
DeployOpen and the client list every endpoint that accepts image input, the text and image modalities each one takes, the garak generators that will reach them (such as the NIM Vision or NVMultimodal classes, the LLaVA class, or a custom REST generator), and whether a system prompt, guardrail or content filter sits in front of the model. The scope names the probe set, including whether the FigStep and FigStepFull probes from the visual_jailbreak module are in or out, and the deliverables. Confirm the scope in writing before any test traffic is sent. The output is a signed scope document that lists each endpoint, its modalities and the deliverables.
Confirm access and data handling rules
The client confirms which accounts, API keys and network paths the test host may use, and whether test images may leave the environment. For hosted model endpoints, the client confirms that sending adversarial image prompts is permitted under the provider's terms and their own acceptance policy. Where the model runs locally, the client confirms the test host can reach the inference service. The output is a short access record covering credentials held, network routes and the data classes that test images may contain.
Prepare the environment inside your infrastructure
DeployOpen installs garak on a host the client controls, using the PyPI package and the Python version the package requires. The team pins the garak version so results can be compared later, configures the generator for each endpoint through YAML configuration, and sets up storage for the JSONL report and the garak.log file. Where a host is air-gapped, the install is staged with the client's own package mirror. The output is a tested configuration that completes a smoke run against one harmless prompt on each endpoint.
Validate image input reaches the model
Before the full probe set runs, DeployOpen checks that the generator passes image content to the model as intended. A known image with a visible marker is sent, and the response is inspected to confirm the model read the image and not only the text prompt. This check catches misconfigured content types, dropped image fields and generators that silently ignore input. The output is a validation log with the marker result for each endpoint, and any gaps are fixed before scanning.
Execute the scan and record every attempt
DeployOpen runs the agreed probes against each endpoint, using the default generation count unless the scope changes it, and keeps each run's configuration with its report. Runs are repeated where the scope requires comparison across model versions or guardrail settings. The output is a set of JSONL reports, the matching garak.log files and a record of the garak version, probe list and endpoint configuration used for each run.
Review failures and separate false positives
A DeployOpen engineer reads the failing attempts, checks the image that was sent against the model's response and the detector's verdict, and marks findings that the detector flagged wrongly. Probes that fail on one endpoint but not another are compared to find whether the cause is the model, a preprocessing layer or the wrapper code. The output is a reviewed findings list with each confirmed issue tied to the probe, the endpoint, the attempt identifier and a short description of the observed behavior.
Deliver findings, fixes and retest
DeployOpen writes a findings report that lists confirmed issues, the evidence for each, suggested mitigations such as image content filtering, output classification, system prompt changes or policy restrictions on accepted image types, and the items the client must confirm with its model vendor. After the client applies fixes, DeployOpen reruns the affected probes on the same configuration and reports before and after results. The output is the findings report and a retest report that state which findings remain open.
How DeployOpen works on this
DeployOpen plans and runs garak vision-language model testing as a fixed-scope engagement, starting from the models and endpoints your organization actually uses. We test the image input path with garak's FigStep and FigStepFull probes, document the results in a form your security and compliance teams can review, and hand over a repeatable scan setup.
How we scope
- We confirm which vision-language models, hosted endpoints and image input paths are in the written scope.
- We agree which garak generators apply, such as the NIM or Hugging Face classes, and which ones need custom configuration.
- We record the probe families, image types and detectors to run, and what remains out of scope, in writing before work starts.
How we build
- We install garak and configure a repeatable scan run with a versioned config file for each target model.
- We run FigStep and FigStepFull against the vision path, alongside the text probes you choose, and keep each run's JSONL report.
- We review failed attempts with you, separating model behavior from issues in the surrounding application or guard layer.
How we hand over
- You receive the scan configuration, run instructions and the JSONL reports with the evaluation for each attempt.
- You receive a written findings summary that maps each result to the scope agreed at the start of the engagement.
- You receive a runbook so your own team can rerun the scan after a model, prompt or image pipeline change.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, including rescans after model updates.
- We can track garak version changes so that comparisons across runs stay valid, and confirm the release you are on before each run.
- Ask any provider to confirm which vision models and image formats their endpoint accepts before you finalize scope.

