Skip to content

MAINT: Add labels to attack results#1624

Open
behnam-o wants to merge 14 commits intomicrosoft:mainfrom
behnam-o:users/behnam/attack-result-labels
Open

MAINT: Add labels to attack results#1624
behnam-o wants to merge 14 commits intomicrosoft:mainfrom
behnam-o:users/behnam/attack-result-labels

Conversation

@behnam-o
Copy link
Copy Markdown
Contributor

@behnam-o behnam-o commented Apr 16, 2026

This PR adds labels to attack results and allows us to remove them from individual message pieces.

Labels are really meaningful in the context of an attack and since all message pieces associated with an attack have the same labels, it makes more sense to store them on the attack result.

this will be followed up with two PRs:
1- Emit a deprecation warning for all public APIs that accept labels that are set on Message Pieces (for example, the message piece constructor itself, or a few upstream functions such as attack_mappers.request_piece_to_pyrit_message_piece , and some rare cases where we do piece.label=<....> after construction

2- [ a couple of releases after above deprecation added], fully remove all label usage on message_piece and only persist in attack result

@behnam-o behnam-o changed the title MAINT Add labels to attack results MAINT: Add labels to attack results Apr 16, 2026
@behnam-o behnam-o marked this pull request as ready for review April 16, 2026 17:06
Comment thread pyrit/backend/mappers/attack_mappers.py
Comment thread pyrit/memory/azure_sql_memory.py Outdated
Comment thread pyrit/memory/memory_interface.py Outdated
Co-authored-by: hannahwestra25 <[email protected]>
Comment thread pyrit/memory/memory_models.py
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.

4 participants