$ the-wire · showcase
PyRIT finishes its StrEnum migration and teaches GCG which tokens never to sample
By RepoJournal · Filed · About AI Red Teaming · Composed from the cited sources · methodology
PyRIT's day was mostly internal, but two of its changes reach operators: a breaking enum migration that can alter comparisons and serialization in your own code, and a GCG fix that stops the attacker sampling padding and added tokens as adversarial prompts.
[BREAKING] MAINT: Migrate the remaining str enums to StrEnum and enable UP042 (#4508) microsoft/PyRIT
67 classes in pyrit/ now subclass StrEnum instead of str, Enum, and Ruff's UP042 is re-enabled so new string enums fail pre-commit. The PR states members, values, equality, JSON and the backend's OpenAPI schema are unchanged, but this is marked breaking, so any code that branches on exact type or does repr/type checks against those classes is worth re-running before you upgrade. AttackOutcome k...
FIX: Derive unsampleable GCG token ids from the embedding rows and let model_kwargs set the dtype microsoft/PyRIT
GCG now derives the token ids it must never sample from the embedding table: special tokens plus every id from vocab_size to the last embedding row, which covers padding rows (Qwen2.5 has 151,936 rows for 151,665 tokens) and unflagged added tokens like <think> and <tool_call>. Those ids are masked out of the gradient before sampling, and model_kwargs can now set the model dtype, so attacks that...
FEAT: Add ImageMirrorConverter (horizontal and vertical flip) microsoft/PyRIT
ImageMirrorConverter is a new BaseImageToImageConverter that flips images horizontally (FLIP_LEFT_RIGHT, the default) or vertically (FLIP_TOP_BOTTOM) via Image.transpose, and any other direction raises ValueError at construction. It is exported from pyrit.converter, giving multimodal attack runs a standard single-converter building block instead of a hand-rolled flip.
chore(deps): update dependency read-excel-file to v9.3.19 promptfoo/promptfoo
read-excel-file is pinned to 9.3.19 in both development and optional dependencies because escaped custom number formats were being imported as serial numbers rather than dates. If your red-team datasets arrive as XLSX, that is the difference between a dated row and a meaningless integer in the parsed case.
chore(deps): update dependency engine.io to v6.6.12 promptfoo/promptfoo
engine.io moves to 6.6.12, which the PR says stops invalid-upgrade socket errors from breaking the connection after a persisted evaluation. Server-side polling and WebSocket updates kept working after an invalid upgrade in the local check, so long-running evals on flaky networks are less likely to die silently.
Action items