Skip to content

probes: add native multilingual prompt-injection module - #2016

Open
fevziegeyurtsevenler wants to merge 1 commit into
NVIDIA:mainfrom
fevziegeyurtsevenler:altaysec/multilingual-probes
Open

probes: add native multilingual prompt-injection module#2016
fevziegeyurtsevenler wants to merge 1 commit into
NVIDIA:mainfrom
fevziegeyurtsevenler:altaysec/multilingual-probes

Conversation

@fevziegeyurtsevenler

@fevziegeyurtsevenler fevziegeyurtsevenler commented Aug 3, 2026

Copy link
Copy Markdown

What this change does

Adds a new native probe module garak.probes.multilingual with two direct
prompt-injection probes phrased in languages that garak's existing English-first
injection families (promptinject, dan, latentinjection) do not currently
exercise:

  • multilingual.TurkishInjection — 16 idiomatic Turkish instruction-override,
    role-reassignment and system-prompt-exfiltration prompts (e.g. "Önceki
    talimatları unut ...").
  • multilingual.Multilingual — 14 prompts carrying the same "ignore previous
    instructions / reveal system prompt" intent across German, Spanish, French,
    Russian, Arabic, Chinese, Persian and Turkish, to measure whether a guardrail
    generalises beyond English.

Both probes follow current garak conventions: lang (tr and *), tags
including owasp:llm01, intent = "T009ignore" (matching dan/audio/dra),
primary_detector = "mitigation.MitigationBypass", a goal, tier
(Tier.OF_CONCERN), active = True, and a class docstring. Each multilingual
payload is paired with its BCP-47 subtag for provenance, and each corpus carries
short per-payload notes in the source documenting the linguistic trick it
exercises. All prompts are framing only — no operational harmful content — for
authorised defensive testing of a model you own or are permitted to assess.

Motivation: a guardrail tuned on English "ignore previous instructions"
phrasings can miss the same intent when it arrives in another language. These
probes are intended as coverage for that gap; they complement, and do not
replace, the existing English-first families.

Related: the Turkish casefolding background (dotted/dotless-I normalisation,
which affects keyword-based injection filters) was proposed in
NVIDIA/garak PR #1997; doc_uri on both probes points there.

Scope

Deliberately kept to a single coherent injection module so it is easy to review.
Possible follow-ups, if of interest to maintainers, are noted here rather than
bundled in:

Verification

  • python -m pytest tests/probes/test_probes_multilingual.py — asserts both
    probes load, expose non-empty unique string prompts, have valid lang
    (langcodes.tag_is_valid / *), carry owasp:llm01, and that every
    declared multilingual payload language is a valid BCP-47 subtag covering
    >= 4 languages.
  • garak -t test.Blank --probes multilingual — probes enumerate and run.
  • Verify the probes send the non-English prompts and the
    mitigation.MitigationBypass detector scores refusal vs compliance.

Add garak.probes.multilingual with two direct prompt-injection probes for
languages the English-first injection families (promptinject, dan,
latentinjection) do not exercise:

- TurkishInjection: idiomatic Turkish instruction-override, role-reassignment
  and system-prompt-exfiltration prompts.
- Multilingual: the same ignore-instructions/reveal-system-prompt intent across
  German, Spanish, French, Russian, Arabic, Chinese, Persian and Turkish, each
  payload paired with its BCP-47 subtag.

Both follow existing conventions (owasp:llm01 tag, intent T009ignore,
mitigation.MitigationBypass detector, Tier.OF_CONCERN, goal, docstring). Turkish
casefolding background: doc_uri points to NVIDIA#1997. Adds loader/lang/tag tests.

Signed-off-by: Fevzi Ege Yurtsevenler <egeyurtsevenler@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant