Storing garak reports and logs

garak writes a JSONL report, hit logs and a continuing garak.log for every run. This page explains where those files land, how to move them, and how to retain files that contain harmful prompts and outputs.

On this page

Where garak reports and logs go, and why garak reports storage needs a plan

garak writes two kinds of output on every run. The first is a JSONL report that records every attempt and its evaluation, so each prompt, model response and verdict can be traced back to a specific run. The second is a garak.log debugging file that continues across runs, carrying history forward from one scan to the next. Teams running garak on a shared scan host or in a CI pipeline need to find, move and keep this output, so storage should be planned before the first scan that matters. A report that nobody can locate, or that disappeared when a runner was recycled, is no longer evidence of what the model did.

By default, garak writes these files to the scan host where the run executes, so that host becomes the first storage location. The reports are not sanitized. Probes are built to elicit weaknesses, so the JSONL file can contain harmful prompts and the model outputs that answered them. The garak.log file is written during the same run and should be treated as sensitive too. Anyone who can read the scan host or copy its files can read that material, which makes host access controls part of the storage design. Confirm the exact default output path for your installed version in the garak user guide before writing any backup or copy job that depends on it.

Three settings control where the files land: report_dir, --report_prefix and XDG_DATA_HOME. Test how each one behaves in your installed version before you rely on it, because a path that differs between hosts can separate one scan's report from its log. Decide in advance who may read the reports, how long each run is kept, what happens to copies in CI artifacts or shared drives, and how deletion is recorded. Those answers come from your security, legal and compliance owners, not from the scanner. Write the retention decision down alongside the scan configuration so a later reviewer can see why each file still exists.

What each output file contains and who needs it

A garak run leaves several files, and each one serves a different reader. Some are for pipelines, some for security reviewers and some for the engineers who debug the scanner. Before you set storage or access rules, decide who reads each file and whether a copy can leave the scan host.

JSONL report of attempts

This is the main record of a run. It holds every attempt and its evaluation: the prompt sent, the output received and the result the detector assigned. Pipeline parsers and security reviewers both depend on it, since pass or fail decisions and later comparisons are built from it. Because it contains the full prompt and output text, it can hold harmful content and anything the target echoed back. Confirm the exact file name and field layout in your installed version before you write a parser against it.

garak README

Hit logs of failed attempts

Hit logs narrow the evidence to the attempts that produced undesirable output, so a reviewer can go straight to what caused a FAIL. Security reviewers and the engineers fixing the target use them most. Because they concentrate the most harmful prompts and outputs, they are the file most likely to need restricted access. Confirm whether your version writes hit logs as a separate file, where it places them under the report directory and how it names them before you set access rules.

garak.log debugging file

garak.log is the file engineers open when a run misbehaves, such as a failed connection, a bad configuration value or an unexpected stop. garak keeps appending to it, so history accumulates across runs and you can trace an issue over several days. Expect it to include paths, endpoint addresses and error text. Review it for credentials, internal hostnames and target details before you send it outside the team that operates the scan host.

Report digest and summary views

The garak user guide describes an HTML digest for reading a run in a browser, which suits reviewers who do not work with JSONL. Confirm whether your installed version produces it, under what name and in which directory before building a review step around it. A digest summarizes results but can still quote prompts and outputs, so give it the same handling as the JSONL report and do not publish it to a wider audience by default.

garak user guide

Retention rules by file type

Reports, hit logs and garak.log can each contain harmful prompts and outputs, so retention is a decision to make for all of them. Security and compliance leads usually decide how long scan evidence is kept, while privacy and legal teams decide what a copy outside the scan host may contain. Write the rule down for each file type, and check your organization's policy before the first scheduled scan writes its first file.

Configuration options for report location and naming

This table compares the three ways to move garak output: the report_dir config key, the --report_prefix flag and XDG_DATA_HOME. Read each row for what it controls and where it fits, then confirm the exact config key paths against the garak user guide before you standardize them in a pipeline. Most teams combine a fixed base directory with a per-run prefix.

OptionWhat it controlsWhen it fitsTrade-off
report_dir (config key)Directory where garak writes the JSONL report, hit log and garak.log for a runShared volume or mounted artifact path that a dashboard or reviewer reads fromSet in a config file, so every run that uses the file writes to the same place unless overridden
--report_prefix (command-line flag)Filename prefix applied to the report files of one runPer-run naming, such as a commit hash or ticket ID, so scans stay distinguishable in a shared folderOnly changes names, not location; runs with the same prefix can overwrite or mix files
XDG_DATA_HOME (environment variable)Base data directory that garak uses for its default output and log locationsIsolated CI workspace or dedicated scan host where you want all garak data under one controlled pathAffects every XDG-aware tool in the same environment, so set it per job or per user to avoid surprises
Default location (no override)Standard per-user data path on the host running the scanQuick local experiments on a workstationEasy to lose or miss in ephemeral CI runners and hard to find for reviewers
Combined base path plus prefixFixed directory for all scans with a unique name per runScheduled rescans and regression comparisons that need a predictable historyRequires a naming convention agreed across teams and a retention rule for the folder

Choosing a storage location by environment

On a laptop, garak output usually lands in a per-user data directory. That is convenient for experiments, but the files are easy to lose or copy into a synced folder without anyone noticing. Set the output location explicitly before the run starts so you know exactly where each report and log is written.

  • Set report_dir explicitly: Point the report directory at a project folder you choose, so each scan's JSONL report is found without searching.
  • Label runs with --report_prefix: Use a prefix that names the target and date, so reports from different models or configurations do not mix.
  • Check XDG_DATA_HOME: Confirm where garak writes its data when report_dir is not set, because this variable changes the default location.
  • Archive garak.log with the report: The debugging log continues across runs, so keep a copy next to the report when you need to explain a result.

Confirm the exact default paths for your installed version in the garak user guide before you rely on any default location.

Setting up report and log storage step by step

This sequence sets up a dedicated, access-controlled location for garak reports and logs before any production scan runs. It assigns retention ownership, configures report paths, and checks that each run's JSONL report and garak.log land where the team expects.

  1. Assign retention owner and classify outputs

    Decide who owns retention for garak output and how harmful outputs are classified. The security or compliance lead usually sets this, with the platform team named as custodian. Classify each report as containing harmful prompts and model outputs, because the JSONL report records every attempt and its evaluation. Write the retention period, access list and deletion method into your data handling standard. Done when a named owner has approved the classification in writing and the scan host's storage approach matches it.

  2. Create a restricted output directory

    Create a dedicated directory on the scan host that only the scan account and named reviewers can read. Set the owner to the service account, the group to the review group, and the permissions to exclude world access. Keep it out of shared home directories and out of any synced folder or backup target your policy has not approved for harmful content. Done when the directory listing shows the intended owner, group and mode, and a user outside the group cannot list or read files inside it.

  3. Set report_dir and report_prefix

    Set report_dir to the new directory and choose a --report_prefix that identifies the target, application and run date pattern your team uses. Place these settings in the configuration file that scheduled and manual scans share, so every run writes to the same location. Confirm the exact key names and option behavior for your installed version in the garak user guide. Done when the first run's console output names the report path you configured.

  4. Redirect data storage with XDG_DATA_HOME

    If garak should keep its data outside the default location, set XDG_DATA_HOME in the scan account's environment or job definition to the restricted parent directory. Use this when the default location sits in a home directory with different backup or sharing rules. Check which subdirectory garak creates under that path before relying on it. Done when the scan account's environment shows the variable and a test run writes its files beneath that path, not under the user's default location.

  5. Run a short test scan

    Run a small scan against a target you are permitted to probe, using a probe selection and generation count that keep the output small enough to inspect by hand. Use the same configuration file that production scans will use, so the paths and settings are identical. Done when the run finishes without errors and the console output shows where the report and log were written.

  6. Confirm JSONL and garak.log locations

    List the restricted directory and confirm that a JSONL report and garak.log both exist at the paths you configured. The JSONL file holds every attempt and its evaluation, and garak.log is a debugging file that continues across runs, so both contain sensitive detail. Open the JSONL in a viewer that does not render content by default, and confirm its entries match the probes you selected. Done when both files appear where expected and the JSONL file contains entries.

  7. Verify how repeated runs write files

    Run the same configuration a second time and compare the directory listing, file names and timestamps with the first run. Determine whether the second run appends to existing files or writes separate files under a new name, and record that behavior for your garak version. Confirm that garak.log continues from the first run. Done when your runbook states whether runs append or separate, and a reviewer can locate each run's JSONL report without opening garak.log.

Retaining reports that contain harmful prompts and outputs

A garak report is more sensitive than its name suggests. Each JSONL report records the adversarial prompts garak sent and the responses the model under test returned, and garak.log may capture request details as well. For a probe that succeeded, the file can contain a working example of a jailbreak, a fragment of leaked data or toxic text generated by your own model. Treat every report and hit log as a restricted record from the moment it is written, not as a harmless test artifact. Before the first production scan, agree who owns these files, where they live and how long they are kept.

Retention is a decision for your organization, not for the scanner. Retention periods come from your information governance policy and any regulation that applies to the application under test, so confirm the periods with legal and compliance before you write a schedule. Decide separately how long working copies survive (the reports an engineer compares between runs) and how long evidence copies survive (the snapshot you would hand to an auditor or customer). Keep access to the working directory narrow, restrict the evidence store to named roles, and log who reads it. Ask whether your storage platform supports write-once or legal hold features if counsel requires them.

Redact before sharing outside the team, and keep the unredacted original under the restricted policy. A report sent to a vendor, a customer security reviewer or an external auditor should be a derived copy with prompts, outputs or identifying values removed or summarized, and the redaction step should be documented and repeatable. Separate evidence copies by writing them to a dedicated location with its own access list, and record the garak version, the command and the configuration beside each one so the copy can be interpreted later. Before you rely on any of this, run one test scan on a non-production endpoint and check that your redaction and access controls behave as you expect.

Security and operational risks of stored scan output

A garak report can contain the exact harmful prompts and model outputs the scan produced, and garak.log can capture configuration and debugging detail. The cards below cover the controls that keep that material contained and the checks to run in your own environment.

Restrict permissions on the report directory

Reports and hit logs hold full prompt and response text, so the directory they land in is a sensitive asset. Set the directory to be readable only by the account that runs garak and the people who review results, and confirm the mode with ls -ld on the host. Check that any custom report_dir sits on a volume with the same restrictions as the default location, since a path chosen for convenience often inherits broader access.

Keep secrets out of logs and reports

Endpoint API keys, bearer tokens and cookies can end up in garak.log if a generator or verbose setting echoes request details. Load credentials from environment variables or a secrets store rather than inline config, then search the log and JSONL files for known token prefixes after a test run. Treat any match as a leak and rotate the credential.

Avoid exposing reports through CI artifacts

If a pipeline job saves the report directory as an artifact, anyone with read access to the project or its build history can download the harmful outputs. Decide which jobs may publish artifacts, limit artifact visibility to the review group, and set a short expiry. Confirm in your CI settings who can view job artifacts and whether forks or external contributors can reach them.

Control backup copies of harmful output

Backups of the scan host, object storage snapshots and synced developer laptops each create another copy of the report. Find every location that receives the report directory, including sync clients and shared drives, and decide which ones should exclude it. Ask your backup owner whether copies can be encrypted, how long they persist, and who can restore them.

Manage growth of garak.log across runs

garak.log is continued across runs, so it grows over time and keeps records from earlier scans on the same host. Decide how long to keep it, and rotate or archive it on a schedule that matches your retention policy. Confirm the log's location in your environment before setting rotation, because a file in an unexpected directory will not be rotated by a policy written for the default path.

Scope access for scheduled jobs

A scheduled rescan runs under a service account that reads the target credentials and writes reports every time it fires. Give that account write access only to its own report path, and separate it from the account used by reviewers. Confirm which identity the scheduler uses, what it can read beyond the report directory, and whether its credentials rotate without breaking the job.

How scan output moves from the scanner to retained storage

The flow starts with a garak run writing its JSONL report, hit log and garak.log to the location the run is configured to use. Teams then copy or move those files into a restricted store with its own access rules and retention schedule. The key hand-off is that the scanner's default location is not the retention point: confirm where each file lands, who can read it, and when it is deleted before the first scan writes harmful prompts and outputs to disk.

Scanner output moves from the scan host to a restricted store with retention.

Limits to confirm before you rely on the default paths

The defaults for report and log locations are a starting point, not a contract. Several behaviors depend on the garak version you run, the way your scans are launched and how long reports are kept. Confirm each item below in your own environment before you build retention, backup or evidence processes on top of them.

Exact config keys and defaults

Confirm the key names and default values for report_dir, report_prefix and the data directory in the garak version you actually install. Read the configuration reference for that release, then print the effective settings from a dry run. Do not copy paths from older blog posts or from another host, because a key that works in one version can be renamed or ignored in the next.

garak user guide

Behavior of garak.log across upgrades

garak.log is continued across runs, so one file can hold history from several versions and several targets. Test what happens to the existing file when you upgrade, whether rotation exists, and whether log lines name the target and run ID. Decide who owns the file and how long it is kept before it accumulates sensitive prompt fragments.

Report name collisions in parallel runs

Two scans started with the same prefix, or launched in the same second from a scheduler, may write to the same report path. Run two short scans in parallel against your target and inspect the output directory before you trust the naming. If collisions are possible, give each run a unique prefix from your pipeline, such as a job ID.

Disk growth on long schedules

Each run writes a JSONL report of every attempt, and repeated scheduled runs multiply that volume. Measure the size of one full report for your chosen probe set, then multiply by your schedule and retention window. Set a quota or alert on the report volume so a long-running CronJob or runner does not fill its disk.

Report format changes between releases

Field names, evaluation fields and nesting in the JSONL report can change between garak releases, which breaks scripts that read pass or fail values. Keep a sample report from each version you use, and test your parser against the newest release before upgrading. Review the release notes for the version you plan to adopt.

garak releases

Retention rules for harmful output

Reports contain the prompts and model outputs that triggered findings, which can include sensitive or policy-violating content. Ask your security and legal teams which retention period, access group and encryption standard apply to these files before the first scheduled run. Confirm that backups and object storage copies follow the same rules.

Questions teams ask about storing garak reports and logs

Can our team set up garak report storage ourselves?

Yes, most platform or security engineering teams can do this in-house, because garak writes its output to local files: a JSONL report of every attempt and its evaluation for each run, plus a garak.log debugging file that continues across runs. The work is mostly deciding where those files go, moving them to storage you control, and limiting who can read them. Confirm the report directory, the --report_prefix option and the XDG_DATA_HOME location in the garak user guide for the version you run, since paths are a common source of lost reports after a change. If you would rather have an outside team design and build the layout, DeployOpen can plan and implement it in your infrastructure under a written scope.

How much effort does garak report storage take and what drives it?

Effort depends on how many hosts write reports, where the files must end up, and how many approvals the design needs. The main drivers are:

  • The number of scan hosts and CI jobs that produce reports and logs.
  • The destination, such as an existing object store, a managed file share or a central log platform.
  • The access model, meaning who may read reports and who may export them.
  • Retention and deletion rules that must run automatically rather than by hand.
  • Whether the storage must work in an air-gapped network.

One-time work covers the directory layout, path configuration, permissions and the retention job. Recurring work covers access reviews, storage growth and checks after garak upgrades, which can change file names. Ask any provider for a quote built from a written list of destinations and controls.

What does our team need to provide for garak report storage?

Plan to supply storage capacity, a named owner for the retention policy, identity groups for readers and a decision on who may see prompts and model outputs. Specifically, you will usually need:

  • A storage location and quota on each scan host or shared destination.
  • A retention schedule approved by security, compliance and legal stakeholders.
  • A service account for the scan host with write access only to its report path.
  • A read group mapped to your single sign-on provider, so access follows joiner and leaver processes.
  • A backup target that meets the same handling rules as the reports.
  • Rules for whether garak.log is shipped to a central log platform.

Agreeing these before the build starts prevents the most common delays, which are unresolved owners and unclear access.

How long does it take to set up garak report and log storage?

Duration is set more by approvals, integration and testing than by moving the files themselves. The drivers are the number of storage locations, whether a retention policy already exists, change windows in your environment, the onboarding steps for any central log platform, and how many test scans you run to confirm that files land where expected. Teams with an approved retention policy and an existing object store usually move faster than teams that must first agree classification rules. No timeline is given here because it depends on your environment. Ask for a timeline tied to the written scope, with each approval gate listed as its own step.

How should we handle harmful prompts and outputs in backups?

Treat garak reports as sensitive data, because each one can contain harmful prompts and the model outputs they produced. Backups should inherit the same restrictions as the originals. Encrypt copies at rest, limit restore rights to the people who already read the reports, and set a deletion schedule that also reaches backup copies, so that expired material does not survive in an old snapshot. Avoid pasting report excerpts into tickets, chat channels or wiki pages, and keep any sharing for model improvement or external review behind a separate, reviewed process. Also check whether garak.log echoes prompt content in your configuration. Confirm backup retention windows with your backup tool's documentation and with your compliance owner.

Does moving garak report files break comparisons over time?

Moving files does not change their content, but comparisons break when the paths, file names or tooling that your scripts expect change. Keep each JSONL report unedited, store the report prefix or naming pattern with each run, and record the garak version used, because scores can shift after an upgrade. Compare runs made on the same garak version, or confirm the effect of an upgrade before trusting a trend line. Maintain an index that maps old and new locations so historical runs remain findable. Review the garak user guide when you change versions, since output details can change between releases.

Can DeployOpen set up garak report storage for our environment?

Yes. DeployOpen plans, implements, hardens, backs up, documents and supports self-hosted platforms inside your own cloud accounts, data centers or air-gapped networks. For garak report and log storage, that can include destinations, permissions, retention jobs, backup handling and a runbook for your operators. Most engagements are fixed scope, with deliverables and timelines agreed in writing before work starts. DeployOpen does not publish a price list, so a quote follows from the written scope. Ongoing support and upgrades are available as a retainer. DeployOpen prepares controls and evidence for compliance assessments, but independent auditors issue any audit reports.

How DeployOpen scopes garak output storage

DeployOpen plans and implements self-hosted garak scan operations inside your own infrastructure, and the storage design for reports and logs is agreed in writing before any work starts. The written scope names where the report_dir and --report_prefix values point, where XDG_DATA_HOME is set for the scan account, and which host or volume holds the JSONL reports, hit logs and garak.log file. Because garak.log is continued across runs, the scope also decides how that file is rotated or archived so it does not grow unchecked on a shared host. The output is a short storage specification your platform team can review and keep under change control.

Permissions and retention are scoped together, because a garak report can contain the harmful prompts and model outputs the scan produced. DeployOpen works with your security, compliance and data owners to decide who may read each report, which service accounts may write to the directory, whether reports are encrypted at rest and how long each class of report is kept before deletion. Retention is aligned to your records policy rather than to a default that garak does not set for you. The engagement also covers verification scans: a controlled test run that confirms the files land in the agreed location, carry the expected names, respect the permissions and are removed on schedule.

Confirm with your own teams which retention period, approval chain and storage platform apply before you ask for a quote, since these drive most of the effort. DeployOpen does not issue audit reports or certifications for this work; the evidence it prepares, such as the storage specification, access settings and verification results, is what your compliance team or an independent auditor reviews. Ask any partner to show how the written scope will be tested and how changes to paths or retention will be recorded after handover.

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.