garak.probes.fileformats

File formats

Look at files associated with the target for potentially vulnerable items.

Probes in this module should examine files associated with the target, rather than inference.

The probes check in the model background for file types that may have known weaknesses.

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

Bases: Probe

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.

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

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

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