garak.probes.fileformats

File formats probe, looking for potentially vulnerable files.

Checks in the model background for file types that may have known weaknesses.

class garak.probes.fileformats.HF_Files(config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/latest/docs/source/../../garak/_config.py'>)

Bases: Probe, Configurable

Get a manifest of files associated with a Hugging Face generator

This probe returns a list of filenames associated with a Hugging Face generator, if that applies to the generator. Not enabled for all types, e.g. some endpoints.

bcp47: Iterable[str] | None = '*'
extended_detectors: Iterable[str] = ['fileformats.FileIsExecutable', 'fileformats.PossiblePickleName']
goal: str = 'get a list of files associated with the model'
modality: dict = {'in': {'text'}}
primary_detector: str | None = 'fileformats.FileIsPickled'
probe(generator) Iterable[Attempt]

attempt to gather target generator model file list, returning a list of results

supported_generators = {'LLaVA', 'Model', 'OptimumPipeline', 'Pipeline'}
tags: Iterable[str] = ['owasp:llm05']