BUG: regex, package-hallucination and aggregator scorer identities collide across configs
Maintainers usually reply within 2 days
@richlundeen is already working on this.
Since Oct 10, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with RegexScorer._build_identifier and the _ConfigurableRegexScorerMixin scorers (XSS, SQLi, SSRF, MarkdownInjection), then compare with CredentialLeakScorer, which already hashes its patterns. Also check PackageHallucinationScorer and the FloatScaleScorerByCategory and FloatScaleScorerAllCategories aggregators, whose __name__ values collide. Reproduce the four collision cases in the issue before changing anything. Done means distinct identifiers for differently configured scorers, default-config hashes unchanged, and a maintainer decision on the metrics registry.
Written by the indexing model from the issue text.
Description
Some scorer identifiers leave out the config that decides the result, so differently configured scorers share a hash and eval_hash. That means get_scorer_metrics() and the evaluator's skip-if-exists can return another config's metrics, and stored scores can't be told apart.
RegexScorer._build_identifieronly recordspattern_count, so any two RegexScorers with the same number of patterns collide. Same for the_ConfigurableRegexScorerMixinscorers (XSS, SQLi, SSRF, MarkdownInjection) with custom patterns. CredentialLeakScorer already hashes its patterns, so it's just the base that's missing it.PackageHallucinationScoreronly recordsknown_package_count.FloatScaleScorerByCategory.MAXandFloatScaleScorerAllCategories.MAXboth have__name__MAX_by_category_(same for MIN/AVERAGE), and scorers recordaggregator.__name__. One returns one score per category (and makes FloatScaleThresholdScorer raise), the other returns one score.
RegexScorer A vs B (1 pattern each, different patterns): same hash True, same eval_hash True; A -> false, B -> true
Markdown default vs custom patterns: same eval_hash True
PackageHallucination {requests} vs {evilpkg}: eval_hash equal True
aggregator names: MAX_by_category_ MAX_by_category_ -> same eval_hash True
A fix would add a pattern/package digest (only when it differs from the defaults, so stored default hashes stay put) and give the all-categories aggregators their own names. Since this moves some hashes, filing first to check how you want the metrics registry handled.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 944
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 278
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/PyRIT
-
BUG ColloquialWordswapConverter skips words next to punctuation and inserts spaces into hyphenated wordsPossibly taken @ShivamSharma43 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
BUG UnicodeReplacementConverter writes characters outside the BMP as invalid five-digit \u escapesPossibly taken @ShivamSharma43 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
BUG: label queries only return the final conversation of an attackPossibly taken @richlundeen claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
microsoft/PyRIT#3095 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
BUG PuzzledConverter cannot select words carrying non-ASCII letters, so the mask falls on articles insteadPossibly taken @adimalkar claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
microsoft/PyRIT#3022 · 4 comments ·
Maintainers usually reply within 2 days
-
BUG Configuration keeps runtime-status errors after polling recoversPossibly taken @joeyvictorino claimed this today. OpenBug: triage GUI help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
microsoft/PyRIT#2868 · 4 comments · 1 assignee ·
Maintainers usually reply within 2 days
Similar issues
-
docs pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pydantic/pydantic-ai#10113 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
GreedyBear-Project/GreedyBear#1727 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ARM-software/CMSIS-DSP#354 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
kiat/codeAssist#391 ·
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
darnitdevorg/darnit#587 ·
Maintainers usually reply within 1 day