Skip to content

[FEAT]: Implement PyRIT converter_bridge for PayloadConverter protocol (#69) - #190

Open
syouiti (sy0u1ti) wants to merge 1 commit into
microsoft:mainfrom
sy0u1ti:feat/pyrit-converter-bridge
Open

syouiti (sy0u1ti) wants to merge 1 commit into
microsoft:mainfrom
sy0u1ti:feat/pyrit-converter-bridge

Conversation

@sy0u1ti

Copy link
Copy Markdown

[FEAT]: Implement PyRIT converter_bridge for PayloadConverter protocol (#69)

Summary

Fixes #69. As documented in rampart/core/converter.py:

"The PyRIT bridge in pyrit_bridge/converter_bridge.py will adapt PromptConverter to this protocol."

This PR implements PyRITConverterBridge and adapt_converter in rampart/pyrit_bridge/converter_bridge.py, enabling RAMPART to leverage PyRIT's library of prompt converters (Base64, ROT13, Atbash, Caesar, Leetspeak, Unicode, etc.) seamlessly under RAMPART's PayloadConverter protocol.

Changes

  • Added rampart/pyrit_bridge/converter_bridge.py implementing PyRITConverterBridge and the adapt_converter helper.
  • Exposed PyRITConverterBridge and adapt_converter in rampart/pyrit_bridge/__init__.py.
  • Enforced payload.format.is_text check, preserving original payload id, setting format to PayloadFormat.TEXT, and appending converter attribution to metadata.
  • Added comprehensive unit tests in tests/unit/pyrit_bridge/test_converter_bridge.py validating protocol compliance, text transformations with Base64/ROT13, empty payload handling, and non-text payload validation errors.

@sy0u1ti
syouiti (sy0u1ti) requested a review from a team September 14, 2026 11:43
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@sy0u1ti

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Implement the documented converter_bridge (PyRIT PromptConverter to RAMPART PayloadConverter)

1 participant