Skip to content

v0.4.0: PDF Reference Extraction + AI Prompt Injection Detection

Latest

Choose a tag to compare

@GeoffreyWang1117 GeoffreyWang1117 released this 15 Apr 17:36

What's New

PDF Reference Extraction (bibguard pdf)

  • Extract bibliography directly from compiled PDF files — no .bib required
  • PyMuPDF-based reference section detection (supports [1], 1., and blank-line formats)
  • Two-strategy API resolution: Crossref bibliographic query → Semantic Scholar fallback
  • Parallel resolution with thread pool
  • Outputs standard .bib files ready for full verification pipeline
bibguard pdf paper.pdf --bib-out refs.bib          # extract only
bibguard pdf paper.pdf --bib-out refs.bib --verify  # extract + verify

AI Prompt Injection Scanner (bibguard scan)

Detects adversarial text hidden in PDFs that targets LLM-based review systems. 5-layer detection:

Layer What it catches
Visible text Instruction hijacking, role injection, score manipulation, weakness suppression, jailbreak patterns
Hidden text White-on-white text, micro font (<1pt) rendering
Off-page text Content positioned outside visible page area
Metadata Prompts embedded in PDF title/subject/keywords
Invisible Unicode Zero-width character clusters carrying hidden payloads
bibguard scan paper.pdf              # standalone scan
bibguard scan paper.pdf --json       # machine-readable output

Auto-reject: In bibguard pdf mode, injection scan runs first — poisoned PDFs are blocked before reference extraction even begins.

Also included

  • Feedback logging system (bibguard feedback)
  • AI coding agent integration templates (Claude Code, Codex)

Install / Upgrade

pip install --upgrade bibguard[pdf]   # with PDF support
pip install --upgrade bibguard        # core only

Full Changelog: v0.3.1...v0.4.0