Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#2,815 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
security

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
4.5k
Fork
896
Merge medio
3g 8h
PR unite (30g)
191

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/PyRIT

Tutte le issue di microsoft/PyRIT

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.