okf-guard Python library scans documents for hidden prompt injection before AI ingestion
A new open-source Python library called okf-guard aims to protect AI agent pipelines from indirect prompt injection attacks embedded in source documents. The tool targets a specific vulnerability where hidden text in common file formats — such as PDFs, Word documents, spreadsheets, and presentations — gets extracted alongside legitimate content and fed to AI systems without distinction. okf-guard supports six file formats and runs two independent checks on each scan: one for hidden content and one for injection-style phrasing, flagging either finding separately. The library is particularly relevant to Google's recently published Open Knowledge Format (OKF), which has AI agents read markdown files directly with no intermediate processing layer. All detection is rule-based and fully deterministic, with no LLM dependency or network calls, making its behavior reproducible and auditable.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in