garak._config
This module holds config values.
These are broken into the following major categories:
system: options that don’t affect the security assessment
run: options that describe how a garak run will be conducted
plugins: config for plugins (generators, probes, detectors, buffs)
transient: internal values local to a single
garak
execution
Config values are loaded in the following priority (lowest-first):
Plugin defaults in the code
Core config: from
garak/resources/garak.core.yaml
; not to be overriddenSite config: from
$HOME/.config/garak/garak.site.yaml
Runtime config: from an optional config file specified manually, via e.g. CLI parameter
Command-line options
Code
garak global config
- class garak._config.TransientConfig
Bases:
GarakSubConfig
Object to hold transient global config items not set externally
- args = None
- cache_dir = PosixPath('/home/docs/.cache/garak')
- config_dir = PosixPath('/home/docs/.config/garak')
- data_dir = PosixPath('/home/docs/.local/share/garak')
- hitlogfile = None
- package_dir = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak')
- report_filename = None
- reportfile = None
- run_id = None
- starttime = None
- starttime_iso = None
- garak._config.get_http_lib_agents()
- garak._config.nested_dict()
- garak._config.parse_plugin_spec(spec: str, category: str, probe_tag_filter: str = '') tuple[List[str], List[str]]
- garak._config.set_all_http_lib_agents(agent_string)