Skip to content

Build an adversarial-PHI red-team corpus and harness for the redactor#1842

Merged
maziyarpanahi merged 3 commits into
masterfrom
feature/om-512-adversarial-phi-red-team-harness
Jul 23, 2026
Merged

Build an adversarial-PHI red-team corpus and harness for the redactor#1842
maziyarpanahi merged 3 commits into
masterfrom
feature/om-512-adversarial-phi-red-team-harness

Conversation

@maziyarpanahi

@maziyarpanahi maziyarpanahi commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Description

Adds a synthetic adversarial-PHI corpus and an offline redaction harness that turns the threat-model abuse catalog into an executable leakage gate. The harness reports per-case, per-attack, and per-abuse-case bypass rates, counts processing failures as bypasses, optionally enforces a fail-closed CI threshold across every bucket, and keeps report artifacts free of source and output text.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Test addition/improvement

Changes Made

  • Add eight synthetic cases covering obfuscated identifiers, homoglyphs, zero-width splits, full-width and locale format edges, checksum decoys, combining marks, and role-played leakage requests.
  • Add a local-only corpus runner with strict schema validation, bounded inputs and outputs, protected-surface matching, PHI-safe atomic reports, per-attack and per-abuse-case aggregation, and optional threshold exits.
  • Package the canonical corpus in both source and wheel distributions so the default runner works after installation.
  • Reject duplicate keys and assertions, non-finite or invalid UTF-8 JSON, unsafe identifiers, unsupported fields, and comparison values that normalize to an empty surface.
  • Add focused harness tests and operator documentation, including strict corpus rules and CI usage.

Testing

  • Full test suite: 7,296 passed, 48 skipped
  • Focused harness suite: 30 passed
  • Real cached offline corpus run: 8 cases, 0 bypasses, zero-rate threshold passed
  • Source and wheel builds passed; installed-wheel corpus loading verified
  • Formatting, lint, type checking, strict documentation, and scoped pre-commit checks passed

Documentation

  • Added the adversarial corpus and harness guide
  • Added public API docstrings
  • Added the guide to documentation navigation

Dependencies

  • No new dependencies

Checklist

  • Read the contributing guidelines
  • Commits have clear, descriptive messages
  • Changes are focused on the red-team harness and its distribution surface

Related Issues

Closes #870

Screenshots/Examples

Not applicable; this change has no UI surface.

@maziyarpanahi maziyarpanahi added roadmap-v2 OpenMed V2 roadmap backlog feature New capability P1 High labels Jul 20, 2026
@maziyarpanahi
maziyarpanahi force-pushed the feature/om-512-adversarial-phi-red-team-harness branch from 917c22b to fda04f0 Compare July 23, 2026 11:47
@maziyarpanahi
maziyarpanahi marked this pull request as ready for review July 23, 2026 11:48
@maziyarpanahi
maziyarpanahi merged commit 6927964 into master Jul 23, 2026
28 checks passed
@maziyarpanahi
maziyarpanahi deleted the feature/om-512-adversarial-phi-red-team-harness branch July 23, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New capability P1 High roadmap-v2 OpenMed V2 roadmap backlog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build an adversarial-PHI red-team corpus and harness for the redactor

1 participant