Skip to content

Releases: Azure/PyRIT

v0.5.2

03 Dec 23:19
Compare
Choose a tag to compare

What's Changed

  • Pinned the httpx version to 0.27.2 and refactored the codebase to ensure compatibility.
  • Fixed AzureSQLMemory authentication issues by adding token refresh, pool recycling, and pre-ping mechanisms.
  • Redesigned PAIR attack technique to function as a specialized instance of TAP orchestrator, streamlining architecture.
  • Added support for local Hugging Face model checkpoints.

Full list of changes

  • [DOC] Updating README by @rlundeen2 in #579
  • Fix Azure SQL Authentication Errors: Add Token Refresh, Pool Recycling, and Pre-Ping by @rdheekonda in #576
  • FEAT: add support for local model checkpoints and trust_remote_code in HuggingFaceChatTarget by @KutalVolkan in #574
  • FEAT: Refactor PAIR to be a special instance of TAP by @rlundeen2 in #580
  • FIX: httpx proxy arg fix, pinned httpx version by @jsong468 in #589
  • FIX: Not raising exceptions on None responses by @rlundeen2 in #590
  • Fix Test Prompt Response Error Values by @rdheekonda in #591

Full Changelog: v0.5.0...v0.5.2

v0.5.0

27 Nov 00:28
c3a1a48
Compare
Choose a tag to compare

What's Changed

  • PyRIT now has a website

  • We've been working on standardizing orchestrators in terms of naming and functionality:

    • The endpoint (of type PromptTarget) that PyRIT attacks will be referred to as objective_target.
    • The endpoint (of type PromptChatTarget) that helps us craft attacks will be referred to as adversarial_chat.
    • Beyond that, we've settled on a common interface for multi-turn orchestrators with a shared result object.
    • Instead of an attack_strategy arg we require a file path called adversarial_chat_system_prompt_path to make the connection to the adversarial_chat target clearer. Some orchestrators have a default for this, of course.
    • The initial prompt to the adversarial_chat is now called adversarial_chat_seed_prompt to also help with clarity and connection to adversarial_chat
    • Sometimes we use multiple scorers. For that reason, objective_scorer will be the scorer that decides if the objective has been achieved. Other scorers have similarly specific names, e.g., on_topic_scorer in the CrescendoOrchestrator
    • The new standard name for all orchestrators to execute an attack is run_attack_async.

    The standardization is not fully completed yet but will continue in future releases. So far, CrescendoOrchestrator, TreeOfAttacksWithPruningOrchestrator, and RedTeamingOrchestrator have been adjusted.

  • Support for a centralized database using Azure SQL as an optional alternative to a local DuckDB database.

  • Introduced (multi-modal) SeedPrompts and SeedPromptDatasets as a starting point for red teaming ops with integration to our databases.

  • New orchestrators and auxiliary attacks:

    • FuzzerOrchestrator with 5 template converters
    • GCG support via Azure ML pipelines to optimize adversarial suffixes
    • FlipAttackOrchestrator
  • New targets:

    • HuggingFaceChatTarget
    • HTTPTarget
    • Open AI and Azure Open AI targets were refactored to simplify the logic. They now share a common interface OpenAITarget and you can decide between Azure vs. Open AI using is_azure_target=True or False.
  • New datasets:

    • HarmBench
    • PKU-SafeRLHF
    • wmdp-bio, wmdp-chem, and wmdp-cyber (now fetchable from the original data source)
    • AdvBench
    • Decoding Trust Stereotypes
    • LLM-LAT/harmful-dataset
    • tdc23 red teaming dataset
    • TrustAIRLab/forbidden_question_set
    • LibrAI 'Do Not Answer' Dataset
  • New converters:

    • QRCodeConverter
    • AzureSpeechAudioToTextConverter
    • URLConverter
    • HumanInTheLoopConverter
    • ColloquialWordswapConverter
    • UnicodeConfusableConverter (updated with new functionality)
    • CharSwapGenerator
    • MaliciousQuestionGeneratorConverter
    • AsciiSmugglerConverter
    • MathPromptConverter
    • AudioFrequencyConverter
    • ZeroWidthConverter
    • DiacriticConverter
  • New scorers:

    • SelfAskRefusalScorer
    • HumanInTheLoopScorer
    • InsecureCodeScorer
  • We generally use a .env file to configure details of endpoints that PyRIT needs to execute. A new .env.local override file allow for further customization.

  • Finally, PyRIT now comes with several extras that you can install using pip install pyrit[<extra>]

    • dev includes developer dependencies that you shouldn't need unless you plan on contributing to the project.
    • torch includes just pytorch which is needed for some targets (e.g. Hugging Face) or auxiliary attacks (e.g., GCG) but not core functionality. This allows you to choose whether you want to install it.
    • gcg includes extra dependencies that are only needed for running GCG. Since this requires dedicated compute (ideally with GPU) you can choose whether it is required for you.
    • all includes all of the above.

Full list of changes

Read more

v0.4.0

23 Aug 01:36
Compare
Choose a tag to compare

What's Changed

  1. New Advanced Attack Techniques: Expanded orchestrators with advanced attack techniques, including PAIR, tree of attacks, and crescendo strategies.
  2. New Targets: Crucible target, Prompt Shield Target, Azure OpenAI GPT-4o target
  3. New Converters: Added Tense, Emoji, image to text, and Character Space converters.
  4. New Scorers: Scale Scorer, Prompt Shield, and True/False Inverter Scorer
  5. Automatic Scoring & Memory Labels: Introduced automatic scoring in the PromptSendingOrchestrator. Added support for scoring with user-provided memory labels.
  6. Delegation SAS Authentication: Supported delegation SAS authentication for secure interactions with Azure Blob Storage targets.
  7. Improved Resiliency: Enhanced the resiliency of targets, converters, and orchestrators with robust error handling mechanisms.
  8. Bug Fixes & Performance: Various bug fixes, added support for Python 3.12, speedup unit tests
  9. Fetch functionality: Introduced functionality to fetch adversarial datasets, such as SecLists, XStest etc.,
  10. Updated Demo Codes: Replaced demo code examples with the GPT-4o target.

Full List of Changes

New Contributors

Full Changelog: v0.3.0...v0.4.0

v0.3.0

28 Jun 21:19
Compare
Choose a tag to compare

What's Changed

  • New and improved scorers! Many new scorers have been added, and scorers can now be swapped out and made generic.
  • Many new attack techniques and variations have been introduced. These include skeleton key, most of GPTFuzz, adding text to images, repeated token attack, cipherchat, shorten/expand, tone, CodeChameleon, and more. A total of 13 new converters have been added!
  • Framework improvements:
    • Ability to duplicate conversations for reuse (this makes implementation easier for attacks like PAIR/TAP/crescendo).
    • Converters can be added to LLM responses.
    • All framework calls are now async and parallelizable.
    • Error handling and intelligent automatic retries in targets (e.g., for network errors) and converters/scorers (e.g., for JSON deserialization).

Full list of Changes

New Contributors

Full Changelog: v0.2.1...v0.3.0

v0.2.1

01 May 22:53
9e852f1
Compare
Choose a tag to compare

What's Changed

  • added user authentication support for AOAI Chat Targets
  • request validation in targets
  • support for exporting conversations from the memory

Full list of changes

Full Changelog: v0.2.0...v0.2.1

v0.2.0

29 Apr 22:17
Compare
Choose a tag to compare

What's Changed

  • Multi-modal support: You can now input/output various multi-modal targets.
  • XPIA support: Enabling easier second order prompt injection attacks.
  • A more robust local (duckDB) database: Allowing querying and inserting previous conversations.

Full list of Changes

  • Added a ChatMessageNormalizer that formats messages in the template specified by a Hugging Face tokenizer by @blakebullwinkel in #128
  • PromptMemoryEntry Table Added for more Extensible Target Logic by @rlundeen2 in #125
  • Added prompt softener prompt converter by @cseifert1 in #132
  • Dataset Organization and Adding Public Jailbreaks by @rlundeen2 in #131
  • Adding Image Target by @jbolor21 in #118
  • Adding more authentication methods, add capital letters converter by @pgrek001 in #139
  • Add cross-domain prompt injection orchestrator by @romanlutz in #127
  • Added support to target an Ollama endpoint as a prompt chat target by @uskr in #141
  • Normalizer multi modal/flexible support refactor by @rlundeen2 in #143
  • Adding Identifiers to Memory by @rlundeen2 in #145
  • Adding Data Type Normalizer Helpers by @rlundeen2 in #147
  • Updating run_jupytext to cache notebooks that previously passed by @rlundeen2 in #148
  • Gandalf through level7 by @jorisdg in #152
  • Adding Multi-Modal Output Support to Converters by @rlundeen2 in #155
  • Adding TTS Target by @rlundeen2 in #161
  • Updating Gandalf Target to be more clear by @rlundeen2 in #153
  • Support python 3.11 by @romanlutz in #168
  • New Converters: Replace Whitespace and Leetspeak by @jbolor21 in #162
  • Refactored SelfAskGptClassifier into SelfAskScore class and added Likert scale scoring by @blakebullwinkel in #154
  • Fix mypy issues, convert Azure completion class to target, fix AOAI and OAI tests, remove clip embedding class by @romanlutz in #172
  • Converter for prompt text to audio by @pgrek001 in #149
  • Updating PromptSendingOrchestrator to handle multi-modal by @rlundeen2 in #174
  • Generalize XPIA orchestrator by @romanlutz in #163
  • Add Several Content Classifiers by @nina-msft in #175
  • Add AzureOpenAIGPTVChatTarget to Support MultiModal by @rdheekonda in #160
  • Refactoring Dalle Target to support database by @jbolor21 in #156

New Contributors

Full Changelog: v0.1.2...v0.2.0

v0.1.2

22 Mar 03:33
Compare
Choose a tag to compare

What's Changed

Big changes this release include solidifying the orchestrator, converter, target model for attacks, and migrating the local memory storage from a JSON file to a DuckDB instance.

The first two demos have been updated with the new architecture, and two new demos have been added; send all prompts and using prompt converters

Full List of Changes

  • FEAT: Adding StringJoinConverter by @rlundeen2 in #70
  • DOC: Add release instructions by @romanlutz in #57
  • FEAT: Chain Prompt Converters in Normalizer by @rlundeen2 in #73
  • FEAT: Adding Support for 1:N PromptConverters by @rlundeen2 in #75
  • FEAT: Adding NoOpTarget by @rlundeen2 in #79
  • FEAT: Added converter for ascii art by @petebryan in #81
  • FEAT: Add rot13 by @pgrek001 in #80
  • FEAT: Adding Batch/Async Processing to PromptTargets by @rlundeen2 in #91
  • FEAT: add support for chat messages dataset by @dlmgary in #90
  • DOC: Release guidelines and PR template update by @romanlutz in #92
  • DOC: Adding Docs for ChatMessageNormalizer by @rlundeen2 in #93
  • FEAT: Prompt Variation Converter by @jbolor21 in #86
  • DOC: Adding Converter Docs and Demos by @rlundeen2 in #100
  • MAINT: Add red teaming orchestrators to replace RedTeamingBot by @romanlutz in #84
  • FEAT: Making prompt_nop_target into a stream target by @rlundeen2 in #99
  • MAINT: Adding orchestrator abstract base class by @rlundeen2 in #102
  • FIX: simplify flow in red teaming orchestrator code by @romanlutz in #105
  • DOC: use google style docstrings by @romanlutz in #104
  • DOC: add short guide on how to handle stale PRs & introduce standardized prefixes by @romanlutz in #101
  • FEAT: Language Translation Converter by @rlundeen2 in #106
  • FEAT: Add scalable and efficient memory by @rdheekonda in #97
  • FEAT: add support for question answering benchmark by @dlmgary in #94
  • FEAT: New prompt target: AzureBlobStorageTarget by @nina-msft in #95
  • FEAT: Add UTR39 confusability converter by @yonatanzunger in #115
  • MAINT: Refactoring AzureOpenAIChat to only be a promptTarget by @rlundeen2 in #114
  • FEAT: Add support to OpenAI API to use official or custom endpoints by @friyin in #65
  • FEAT: Migrating Azure ML to PromptTarget by @rlundeen2 in #113
  • Various bug fixes and smaller documentation updates by the AI Red Team

New Contributors

Full Changelog: v0.1.1...v0.1.2

v0.1.1

11 Mar 03:25
f9b0739
Compare
Choose a tag to compare

What's Changed

The previous release 0.1.0 did not include the datasets used in the example notebooks. Version 0.1.1 addresses this.

Full list of changes

Full Changelog: https://github.com/Azure/PyRIT/commits/v0.1.1

v0.1.0

11 Mar 03:19
26b7de1
Compare
Choose a tag to compare

What's Changed

This is the first release of PyRIT to PyPI including basic documentation and notebooks.

Full list of changes

  • Update notebook dependency due to vulnerabilities by @romanlutz in #26
  • Add article in SECURITY.md by @romanlutz in #27
  • Remove poetry by @romanlutz in #24
  • add NOTICE file by @romanlutz in #28
  • Change README content to say "prompt injection attacks" by @romanlutz in #29
  • Update Demo Notebook Prerequisites by @rdheekonda in #30
  • Update chat client & multiturn notebooks with more information by @romanlutz in #25
  • Remove unused definitions from models.py by @romanlutz in #31
  • Update pyproject.toml to find packages/modules by @romanlutz in #33
  • Prompt Normalizer and Refactor by @rlundeen2 in #32
  • Export requirements before component governance is run by @romanlutz in #35
  • fixing bug with red_teaming_bot by @rlundeen2 in #34
  • Fixing bug with RedTeamingBot attack strategy by @rlundeen2 in #36
  • Standardize Endpoints and API Keys for AML Chat by @rlundeen2 in #37
  • Added Flag character transformer for invisible prompts. by @ChristBian1 in #38
  • Add Jupyter Dependencies + aiohttp to pyproject.toml by @nina-msft in #39
  • AML Endpoint Bug Fix and Refactor by @rlundeen2 in #40
  • Add jailbreakchat prompt templates and modify the structure of existing prompts by @romanlutz in #42
  • Fix link to How to Guide by @romanlutz in #41
  • fixing bug where default was set to debug by @rlundeen2 in #44
  • build: update versions of pre-commit hooks by @dlmgary in #47
  • Integrate Hugging Face Models with Azure ML: Download, Register, Deploy, and Test by @rdheekonda in #43
  • Standardizing environment for completions and embeddings by @rlundeen2 in #46
  • Adding Chat Message Normalizers so AML can work with more Models by @rlundeen2 in #45
  • Improving multi-turn strategy by @rlundeen2 in #48
  • Add ipykernel dependency package by @rdheekonda in #50
  • Refactoring Docs to use JupyText by @rlundeen2 in #49
  • Replace old graphics with new ones by @romanlutz in #53
  • Add learn link to README by @romanlutz in #55
  • Convert PyRIT Framework How to Guide to jupytext by @nina-msft in #51
  • Move wiki contents into doc folder, update references by @romanlutz in #54
  • Update HF Azure ML deployment managed compute to allow liveness probe configuration by @rdheekonda in #52

New Contributors

Full Changelog: https://github.com/Azure/PyRIT/commits/v0.1.0