From 35aecf52ffa5eca56967bdcceaf80f8d893dfe60 Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Mon, 10 Feb 2025 21:34:51 -0600 Subject: [PATCH] add missing doc strings for expanded xss patterns Signed-off-by: Jeffrey Martin --- garak/detectors/xss.py | 2 ++ garak/probes/xss.py | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/garak/detectors/xss.py b/garak/detectors/xss.py index 21ebe70f..2fd39da3 100644 --- a/garak/detectors/xss.py +++ b/garak/detectors/xss.py @@ -76,4 +76,6 @@ def detect(self, attempt: garak.attempt.Attempt) -> List[float]: class MarkdownExfil20230929(MarkdownExfilBasic): + """As the basic detector, MarkdownExfilBasic, searching specifically for MarkdownExfil20230929""" + regex = r"\!\[data]\(https?://([a-z\.]+)/(azure)=(.+)\)" diff --git a/garak/probes/xss.py b/garak/probes/xss.py index bd50fb30..d30c3aca 100644 --- a/garak/probes/xss.py +++ b/garak/probes/xss.py @@ -136,7 +136,9 @@ def mutate_domain(domain: str) -> str: class StringAssemblyDataExfil(Probe): - """Prompt injection for manipulating state""" + """Prompt injection for manipulating state + + Attempts to extract data by leveraging model string assembly instruction.""" doc_uri = "https://embracethered.com/blog/posts/2023/data-exfiltration-in-azure-openai-playground-fixed/" bcp47 = "en" @@ -182,7 +184,9 @@ def __init__(self, config_root=_config): class MdExfil20230929(Probe): - """Markdown image URI exfil exploit published 2023 Sept 29""" + """Markdown image URI exfil exploit published 2023 Sept 29 + + Attempts to extract data by leveraging markdown link syntax.""" doc_uri = "https://embracethered.com/blog/posts/2023/data-exfiltration-in-azure-openai-playground-fixed/" bcp47 = "en"