pyrit.orchestrator.XPIAManualProcessingOrchestrator#
- class XPIAManualProcessingOrchestrator(*, attack_content: str, attack_setup_target: PromptTarget, scorer: Scorer, prompt_converters: list[PromptConverter] | None = None, verbose: bool = False, attack_setup_target_conversation_id: str | None = None)[source]#
Bases:
XPIAOrchestrator
- __init__(*, attack_content: str, attack_setup_target: PromptTarget, scorer: Scorer, prompt_converters: list[PromptConverter] | None = None, verbose: bool = False, attack_setup_target_conversation_id: str | None = None) None [source]#
Creates an orchestrator to set up a cross-domain prompt injection attack (XPIA) on a processing target.
The attack_setup_target creates the attack prompt using the attack_content, applies converters (if any), and puts it into the attack location. Then, the orchestrator stops to wait for the operator to trigger the processing target’s execution. The operator should paste the output of the processing target into the console. Finally, the scorer scores the processing response to determine the success of the attack.
- Parameters:
attack_content – The content to attack the processing target with, e.g., a jailbreak.
attack_setup_target – The target that generates the attack prompt and gets it into the attack location.
scorer – The scorer to use to score the processing response.
prompt_converters – The converters to apply to the attack content before sending it to the prompt target.
verbose – Whether to print debug information.
attack_setup_target_conversation_id – The conversation ID to use for the prompt target. If not provided, a new one will be generated.
Methods
__init__
(*, attack_content, ...[, ...])Creates an orchestrator to set up a cross-domain prompt injection attack (XPIA) on a processing target.
dispose_db_engine
()Dispose database engine to release database connections and resources.
execute_async
()Executes the entire XPIA operation.
get_identifier
()get_memory
()Retrieves the memory associated with this orchestrator.
get_score_memory
()Retrieves the scores of the PromptRequestPieces associated with this orchestrator.