Skip to content

Commit

Permalink
add missing doc strings for expanded xss patterns
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Martin <[email protected]>
  • Loading branch information
jmartin-tech committed Feb 11, 2025
1 parent 5f87aef commit 35aecf5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions garak/detectors/xss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)=(.+)\)"
8 changes: 6 additions & 2 deletions garak/probes/xss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 35aecf5

Please sign in to comment.