run.spec resolution

garak/_selection.py resolves a run.spec selection against the plugin registry. The grammar (parsing and serialisation) lives in run.spec selection grammar; this module turns a Spec into concrete probe and buff names using the active/tier/tag state from garak._plugins.

resolve_spec is the single entry point used by the CLI and harnesses; the same plugin-path resolution core backs the parse_plugin_spec adapter used for detectors.

See Configuring garak for the user-facing grammar and examples, and Context-Aware Scanning (CAS) for the intent selection axis (intent:) that resolve_spec collects.

Code

garak._selection

Resolution of a run.spec selection against the plugin registry.

The grammar (parsing/serialisation) lives in garak._spec; this module turns a garak._spec.Spec into concrete probe and buff names using the active/tier/tag state from garak._plugins. resolve_spec() is the single entry point used by the CLI and harnesses; the same plugin-path core backs the parse_plugin_spec adapter used for detectors.

resolve_spec(spec: Spec, skip_unknown: bool = False) ResolutionSource

Resolve a garak._spec.Spec to concrete probe and buff names.

Selection happens against the live plugin registry (active state, tiers, tags). This is the single entry point used by the CLI and harnesses.