Skip to content

Commit

Permalink
Fix default plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
hupe1980 committed Apr 17, 2024
1 parent 85322dc commit 1005ca9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 32 deletions.
11 changes: 2 additions & 9 deletions aisploit/scanner/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@
from typing import List, Optional, Sequence

from .plugin import Plugin
from .plugins import ImageMarkdownInjectionPlugin, PromptInjectionPlugin
from .plugins import PromptInjectionPlugin
from .report import Issue, ScanReport
from ..core import BaseJob, BaseTarget, CallbackManager, Callbacks


@dataclass
class ScannerJob(BaseJob):
target: BaseTarget
plugins: Sequence[Plugin] = field(
default_factory=lambda: [
PromptInjectionPlugin(name="prompt_injection"),
ImageMarkdownInjectionPlugin(
name="image_markdown_injection", domain="cxd47vgx2z2qyzr637trlgzogfm6ayyn.oastify.com"
),
]
)
plugins: Sequence[Plugin] = field(default_factory=lambda: [PromptInjectionPlugin(name="prompt_injection")])
callbacks: Callbacks = field(default_factory=list)

def execute(self, *, run_id: Optional[str] = None, tags: Optional[Sequence[str]] = None) -> ScanReport:
Expand Down
Loading

0 comments on commit 1005ca9

Please sign in to comment.