VIPI
Scan images for visual indirect prompt injections.
VIPI transforms each image through a multi-view OCR pipeline, then checks the final recognized text with Jev, OpenAI Decisions or the local Prompt Guard model. The public interface is a small command-line tool that can scan files, directories and committed image changes.
Installation
VIPI requires Python 3.12 and uv.
Install the CLI from PyPI with
uv tool install. Choose the install path for the detector you plan to use.
Both paths include the OCR dependencies; OCR runs locally and is required for
every scan.
Cloud API detector
For Jev or OpenAI, install VIPI with its OCR extra:
uv tool install --python 3.12 'vipi-scanner[ocr]'
vipi setup
Set the credential for the detector you will use before scanning. Jev accepts
TYPESAFE_API_KEY (or the alias JEV_API_KEY); OpenAI uses OPENAI_API_KEY.
For example, set one in your shell before running vipi scan:
# macOS / Linux
export TYPESAFE_API_KEY="your-typesafe-api-key"
# Windows PowerShell
$env:TYPESAFE_API_KEY = "your-typesafe-api-key"
For OpenAI, set OPENAI_API_KEY in place of TYPESAFE_API_KEY. The default
detector is Jev; select OpenAI with --detector openai.
vipi scan image.png
Local Prompt Guard detector
To run the detector locally, install the OCR and local-detector extras, then prepare Prompt Guard and its model weights:
uv tool install --python 3.12 'vipi-scanner[ocr,detector-local]'
vipi setup --detector prompt-guard
vipi scan image.png --detector prompt-guard
Prompt Guard weights require authorized access to the Hugging Face model. Set
HF_TOKEN if your account needs a token to download them. OCR model setup
downloads the pinned PP-OCRv6 files for both install paths; scanning does not
download models.
If vipi is not found after installation, run uv tool update-shell and
restart your terminal so uv's tool directory is added to PATH.
Usage
# Scan one or more images
vipi scan label.png screenshot.jpg
# Scan a directory recursively and save a JSON report
vipi scan ./images --output report.json
# Choose a speed/quality mode or a specific supported model
vipi scan ./images --ocr-mode fast
vipi scan ./images --ocr-mode balanced
vipi scan ./images --ocr-model ppocr-v6-medium
# Scan committed images added or modified on a branch
vipi scan . --diff origin/main --output report.json
# Choose a detector and adjust the finding threshold
vipi scan image.png --detector openai --threshold 90
The interface has two commands, vipi setup and vipi scan. OCR modes map
fast to PP-OCRv6 Tiny, balanced to Small and quality to Medium. quality
is the default to preserve the previous Medium behavior. --ocr-model selects a
supported model ID directly and overrides the mode. vipi setup prepares all
three models by default. The default detector is Jev with a threshold of 80 on a
0–100 score scale. A score at the threshold counts as a finding; it is not a
calibrated probability of an attack.
See the CLI guide for provider configuration, GitHub Actions examples, branch-diff behavior, cache paths and report details.
Results and automation
Exit codes support CI use:
| Code | Meaning |
|---|---|
0 |
Scan completed without detections, or no images were selected |
1 |
At least one image was detected |
2 |
An error or incomplete scan occurred; errors take precedence |
VIPI provides the CLI for GitHub Actions workflows; this repository does not currently include a packaged GitHub Action. See the PR scan example.
Documentation
- CLI usage and platform validation
- Package architecture
- Development setup and checks
- Research workbench and datasets
- Decision records
A built wheel contains the vipi package. Research tools, datasets, model
weights and run artifacts remain outside the runtime package.
License
VIPI's original code, documentation and project assets are licensed under the Apache License, Version 2.0. Third-party models, dependencies, datasets and other third-party material retain their own license terms; see their respective notices and source projects.
Metadata
Release files for vipi-scanner 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| vipi_scanner-0.1.1.tar.gz | 127.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vipi_scanner-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 188.3 kB
Release files / vipi_scanner-0.1.1.tar.gz
| Download URL | vipi_scanner-0.1.1.tar.gz |
|---|---|
| Size | 127.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5dc6cc6dc1146741baed56f24fb42d0cd9a332395e1014b60668b41df42cbee
|
|
BLAKE2b-256 checksum How to use checksums |
ceec3ea085a92337e6769250b4fc31724f0aaba5c0d6faaa8c0ee531c7ba6967
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vipi_scanner-0.1.1-py3-none-any.whl
| Download URL | vipi_scanner-0.1.1-py3-none-any.whl |
|---|---|
| Size | 60.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
088bc05d2549c36ca95a45f8002709ee35536d2987a2bdf93c5582043a1a183b
|
|
BLAKE2b-256 checksum How to use checksums |
d647a34e581555cf3aaa4322cd10bee8e691f993557e6a6c59de39b7350322dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for vipi-scanner 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.