probes: add email leak via virtualization latent injection (#249) - #2008
Open
manunicholasjacob wants to merge 1 commit into
Open
probes: add email leak via virtualization latent injection (#249)#2008manunicholasjacob wants to merge 1 commit into
manunicholasjacob wants to merge 1 commit into
Conversation
Signed-off-by: manunicholasjacob <manunicholasjacob@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an email-based latent prompt injection scenario to
garak/probes/latentinjection.py, addressing #249. The module already coversresume, report, whois, and translation contexts, but had no email scenario and
no virtualization-style framing.
What it does
Two new probes:
LatentInjectionEmailVirtualizationFull— the full scenario matrix (active = False)LatentInjectionEmailVirtualization— the lightweight default-active variantAn assistant is given an ordinary mailbox task (summarize / reply / triage /
extract action items). The email body hides an injection that wraps its real
request in a fictional frame — a sandboxed VM, a unit-test fixture, a
gdbtranscript, a screenplay, a text adventure — asking the model to relay a
distinctive canary string instead of doing the benign task. The injections are
hidden in varied, realistic spots (mid-sentence, a quoted reply chain, a
signature footer, an HTML
img alt, an HTML comment).Detection
Reuses the module's inherited
base.TriggerListDetector: a hit is when themodel emits one of the canary trigger strings.
Testing
blackcleantests/probes/test_probes_latentinjection.pypasses (its structural testauto-parametrizes over the new classes)
tests/probes/test_probes.pymetadata checks pass for the new probestest.Blankend-to-end run completes and passesCloses #249.