Repository navigation
fix(pptx): unique paragraph coordinates + DET-009 speaker notes; pin DET-008 evals - #5
Merged
Merged
Conversation
…evals
Two fixes chosen from a review of the DET-008 write-up, plus a new detector.
PPTX paragraph coordinates (bug):
PptxParser used the slide number as TextParagraph.index, so every text box
and the notes on a slide shared one coordinate. A single hidden run therefore
matched every run on that slide and `sanitize --mode redact` replaced the whole
slide with [REDACTED]. Indices are now unique per paragraph; the slide number
stays in raw["slide"]. Regression tests assert unique indices and that only the
notes run is redacted.
DET-009 speaker_notes (gap):
Notes were already parsed and are read by any extractor/LLM, but nothing scored
them, so a deck whose only injection was a plain-text note scanned clean and was
allowed. DET-009 reports a note that instructs a reader: HIGH for an explicit
override / "do not tell" payload, MEDIUM for a system-addressed or
verdict-directing one; the notes run is defused on quarantine. Generic reminders
are not reported. Trust labeling counts it as concealment (structure).
DET-008 evaluation artifacts (reproducibility):
- AMBIGUOUS_CORPUS pinned in tests/detectors/test_comment_directive.py (4 legit
notes that are reported on purpose; counted as accepted false positives).
- scripts/probe_comment_directive.py, the committed live false-positive probe;
build output (dist/...) is excluded by default, --include-build restores the
older, larger 168-file figure. The README/coverage numbers now come from these
artifacts (106 files / 738 comment lines, 0 findings) instead of the
unverifiable "167 files / 4,643 comment lines".
- DET-008 detector docstring said 0/45 benign comments; the corpus holds 46.
README/README.ja detector table and counts, SECURITY directive-bypass scope,
CHANGELOG Unreleased, Makefile `probe` target, and the test-count badge (339).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to a review of the DET-008 write-up. Three things: a real sanitizer bug, a real detection gap, and making the DET-008 evaluation numbers reproducible.
1. PPTX paragraph coordinates (bug)
PptxParserused the slide number asTextParagraph.index, so every text box and the notes on a slide shared one coordinate. A single hidden run therefore matched every run on that slide, andaiitg sanitize --mode redactreplaced the whole slide with[REDACTED]— i.e. quarantine destroyed the visible content it was supposed to preserve.raw["slide"]."Visible slide content".2. DET-009
speaker_notes(detection gap)Speaker notes were already parsed (
element="notes") and are read by any extractor/LLM, but nothing scored them. A deck whose only injection was a plain-text note scanned with 0 findings and was judgedsafe/allow.safe.ALL_DETECTORS, README/README.ja tables, SECURITY scope, and thelist-detectorse2e assertion.3. DET-008 evaluation artifacts made reproducible
Two rows of the measured table had no committed artifact; now they do:
AMBIGUOUS_CORPUSpinned intests/detectors/test_comment_directive.py(the 4 legit notes that are reported on purpose). The docs now call them accepted false positives, not detections.scripts/probe_comment_directive.py— the live false-positive probe, committed. Build output is excluded by default (--include-buildto include it). It counts exactly the full-line comments the detector reads and runs the shippedrun_scan().dist/build output and from a looser comment-line definition (with--include-buildthe probe reports 168 files).Verification
Also re-ran the local adversarial corpus against this branch: the notes-only deck that used to scan clean is now
dangerous(DET-009), the PPTX sample keeps its slide text aftersanitize --mode redact, and the clean controls are stillsafe/allow.