Skip to content

Conversation

@varunj-msft
Copy link
Contributor

FEAT: Add LeakageScenario for data leakage vulnerability testing

Description

Adds LeakageScenario for testing models against data leakage vulnerabilities including PII extraction, credential exposure, copyrighted content reproduction, and system prompt leakage.

Key changes:

New LeakageScenario class with 5 attack strategies (ALL, FIRST_LETTER, CRESCENDO, IMAGE, ROLE_PLAY)
New leakage.yaml scorer covering all leakage objectives (replaces generic privacy.yaml)
Exports via pyrit.scenario for clean imports

Files:
leakage_scenario.py - Main implementation
leakage.yaml - Custom scorer
leakage.prompt - Attack prompts
init.py, init.py, init.py - Exports
test_leakage_scenario.py - Tests

Tests and Documentation

34 unit tests in test_leakage_scenario.py
Tests cover: initialization, all 5 strategies, scorer validation, image creation, converter usage
JupyText: no notebook changes in this PR

@varunj-msft varunj-msft force-pushed the varunj-msft/6899-leakage-scenario branch 2 times, most recently from 32dda0b to 9f2e213 Compare January 16, 2026 04:52
varunj-msft and others added 4 commits January 21, 2026 16:19
Co-authored-by: hannahwestra25 <hannahwestra@microsoft.com>
Co-authored-by: hannahwestra25 <hannahwestra@microsoft.com>
Co-authored-by: hannahwestra25 <hannahwestra@microsoft.com>
@varunj-msft
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

@varunj-msft varunj-msft merged commit 6aaae74 into Azure:main Jan 23, 2026
20 checks passed
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