Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

BUG MultiPromptSendingAttack fails with UNIQUE constraint when user_messages are reused, and drops harm categories

クローズ
#2,815 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
security

調査の方向性

Start by reading MultiPromptSendingAttack and compare its message handling with PromptSendingAttack, then inspect AttackExecutor broadcasting and MultiPromptSendingAttackParameters.from_seed_group_async. Done means reused user_messages work across repeated executions and multiple objectives, while results retain the seed group's targeted harm categories.

索引モデルが issue の本文から書いたものです。

説明

Running MultiPromptSendingAttack twice with the same user_messages fails:

msgs = [Message.from_prompt(prompt="turn one", role="user"), Message.from_prompt(prompt="turn two", role="user")]
await attack.execute_async(objective="A", user_messages=msgs)  # fine
await attack.execute_async(objective="B", user_messages=msgs)  # UNIQUE constraint failed: PromptMemoryEntries.id

The same thing happens when AttackExecutor broadcasts user_messages to several objectives: only the first one completes. The attack sends the caller's Message objects as they are, so their piece IDs get reused. PromptSendingAttack avoids this by calling .duplicate() first.

Separately, MultiPromptSendingAttackParameters.from_seed_group_async never sets targeted_harm_categories, so these results have no harm categories and don't show up when you filter by them.

Fix: send current_message.duplicate() and pass the seed group's harm categories through.

主要言語
Python
スター
4.5k
フォーク
896
平均マージ
3日 1時間
マージ済み PR(30日)
208

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/PyRIT のほかの issue

microsoft/PyRIT の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。