Engagement Report: Checking an Image Sanitization Harness

The original matrix reported four critical bypasses. A later audit found that its checker assigned those results unconditionally and could miss text still present in pixels. A report correction, with controls that expose the measurement gap.

This sample report concerns my own Image Payload Injection framework. The original run produced a seven-technique, four-pipeline matrix. I reported that pixel perturbations survived all four pipelines and that every metadata and typography technique was removed. The checker did not establish those conclusions.

Correction, October 24, 2026: The four claimed critical bypasses and the claim that all six other techniques were stripped are withdrawn. The verification below explains why. No downstream model was tested in either the original matrix or this audit.

Scope

The target of this follow-on is RedBlueTester._check_survival, its sanitization runners, and the evidence needed to interpret the matrix. The pipelines are ImageMagick strip, ImageMagick with explicit chunk exclusions, Pillow re-encoding, and Pillow re-encoding without EXIF.

The question comes before model behavior: does the test actually measure whether its input survives the image-processing step?

Finding: the perturbation verdict does not inspect the perturbation

For adversarial_perturbation, the checker sets survived = True regardless of the bytes it receives. I passed it a clean, unmodified PNG. It returned the same survival verdict.

The repaired checker keeps this negative control as an unknown result. This is a complete check from the repository root, with Pillow installed:

from io import BytesIO
from PIL import Image
from ipi.sanitizer import RedBlueTester

buffer = BytesIO()
Image.new("RGB", (32, 32), (100, 120, 140)).save(buffer, format="PNG")
clean_png = buffer.getvalue()
tester = RedBlueTester.__new__(RedBlueTester)
verdict = tester._check_survival(
    clean_png, "AUDIT_MARKER_TEXT_ONLY", "adversarial_perturbation"
)
assert verdict["survived"] is None
print(verdict)

Before the repair, the same clean image returned True. The current assertion passes because the repaired checker no longer invents a survival result. The earlier result proved a defect in the verdict, not a successful attack. The generator applies a frequency-domain pixel transformation without optimizing against or querying a target model. Even proving that its output pixels survive re-encoding would not establish a model-level adversarial effect.

The matrix's critical_bypasses collection also labels any positive survival verdict as critical. Retention of a marker and impact on a downstream system need separate evidence before severity can be assigned.

Finding: byte-search absence does not establish typography removal

The other verdict path searches PNG chunks and raw file bytes for the first 20 UTF-8 bytes of the marker. Rasterized text lives in pixels. It need not exist as a literal string anywhere in the encoded PNG.

For a control, I drew AUDIT_MARKER_TEXT_ONLY in black on a white 400×100 image. The untouched image returned survived: False under the typography check. A PNG text-metadata control containing that same marker returned True, showing that the search can detect its literal bytes while missing the rendered text.

I then ran the rendered-text image through all four configured pipelines. Each returned the same RGB pixels as the input. Each typography verdict remained False. Those results directly contradict interpreting that verdict as evidence that the text was removed. This control uses ordinary visible text. It does not benchmark the original low-contrast, tiny-font, or channel-isolated fixtures.

Finding: pipeline failure can return the original input

The ImageMagick helper returns its input bytes when the command fails to produce an output. The Pillow helper also returns the input on exceptions. The caller receives image bytes without a structured indication that sanitization failed. A matrix result therefore needs an independently verified successful transform before it can support a claim about the sanitizer.

What the evidence supports

Metadata stripping, pixel preservation, text readability, and downstream model behavior require different measurements. A literal marker search can support a narrowly defined metadata check. Pixel comparison can establish whether a known rendered image changed. Neither alone measures whether a model follows an instruction or changes its prediction.

The repair adds explicit pipeline-success reporting, technique-specific controls, and a separate unknown state when the detector cannot judge survival. Perturbation retention needs a comparison against the actual transformed input. Typography needs an appropriate readability or image-level test. A claim about adversarial model behavior needs a target model and measured output.

Repair and Verification

Nine regression tests pass. They cover the clean-image negative control, rendered-text uncertainty, a full-marker metadata positive control, rejection of empty markers, failed ImageMagick commands, missing output, invalid Pillow input, matrix error propagation, and unchanged generator output. The matrix checks also exercise decoded RGB comparison and ensure marker retention does not acquire a severity label.

The actual four-pipeline run with a benign marker produces 28 cells: 12 literal-marker-not-found results and 16 unknown pixel-technique results, with no pipeline errors. This is not a claim that the first 12 inputs are safe. It reports the specific byte check performed. No model was tested.

ImageMagick failures and missing output now raise, and Pillow decoding errors propagate. The ImageMagick runner uses an argument list rather than a shell. Pixel techniques expose a separate decoded-RGB equality observation while keeping the survival verdict unknown. Generation that returns the original bytes is reported as unconfirmed rather than treated as a constructed fixture.

The API retains critical_bypasses as a deprecated empty list for existing consumers and adds retained_markers, per-cell status, and measurement scope. The text report uses MARKER FOUND, MARKER NOT FOUND, UNKNOWN, and ERROR. Historical severity claims remain withdrawn. No live model, data exfiltration, or external target was involved.


GhostInThePrompt.com // A clean image earned four critical bypasses. The checker needed checking.