You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shared YAML loader accepts duplicate mapping keys and silently keeps the last value. Through the public seed import APIs, a second seeds key discards the first seed list, and a second value key replaces the first prompt. The import succeeds without identifying the discarded input.
The approved direction is to reject duplicate keys with a useful key/location error. Preserve supported YAML merge-key overrides deliberately rather than confusing explicit duplicates with intended merge behavior.
Source at tested revision: pyrit/common/yaml_helper.py:27-41 and pyrit/models/seeds/yaml_seed_loader.py:68-92. Configuration loading shares the helper, but was not independently exercised in the original reproduction.
The same replacement occurs for a dataset document declaring two top-level seeds keys, as verified through SeedDataset.from_yaml_file.
Expected Results
Reject explicit duplicate keys before returning a partial import. Include the key and available line/location information. Add coverage for top-level/nested duplicates, valid imports, malformed syntax, and supported merge-key behavior.
Actual Results
The single-seed import prints replacement. The dataset reproduction imports only the second list. A normal two-seed control imports both rows, and malformed YAML syntax still raises ValueError.
Screenshots
N/A.
Versions
Linux; Python 3.12.3; PyRIT 1.2.0.dev0 at 01ce6ca66a315770b36c7dca1f320668c0d92d7c. Actual local import APIs; no network, database, or model calls. Full package-version output was not collected. The original evidence is a standalone API probe, not a pytest run.
Activity
shawnrruss commentedon Nov 4, 2026
I would like to take this