canary-scan
Scan document data-sources for canaries, trackers, web beacons, and per-recipient fingerprints before interacting with supplied datasets.
When you receive a large document dump from an external party — a leak, legal disclosure, or investigation — those files and documents can contain deliberate or indirect canaries: tracking pixels, embedded JavaScript, remote template links, steganographic watermarks, or per-recipient metadata fingerprints that phone home the moment a file is opened.
canary-scan inspects files without opening it in its native viewer, extracting and analysing raw structure, metadata, embedded objects, and near-duplicate fingerprints to surface anything that may reveal to an external party that the data-source is being examined.
→ Full documentation: psaintelligence.github.io/canary-scan
Quick Start (Docker)
The recommended way to run canary-scan is via Docker, as the image bundles all required system utilities and dependencies:
# Run the scan using the GitHub Container Registry image
docker run --rm \
-v /mnt/datasource:/data:ro \
-v $(pwd)/canary-scan-out:/output \
ghcr.io/psaintelligence/canary-scan:latest scan /data -o /output
# Review findings
jq '.[] | select(.severity=="critical")' canary-scan-out/canary-scan-report.json
Quick Start (pipx)
If you prefer to run canary-scan directly on your host machine:
# 1. Install canary-scan
pipx install canary-scan
# 2. Install required system dependencies (Ubuntu 24.04 example)
sudo apt install libimage-exiftool-perl qpdf poppler-utils mupdf-tools \
ripgrep unzip p7zip-full
# 3. Run the scan
canary-scan scan /mnt/datasource
Detection pipeline
Seven sequential stages: inventory → metadata → remote-refs → embedded → stego → uniqueness → report
Each stage writes a JSONL artefact to .canary-scan/. Run canary-scan --guide for a concise cheat sheet.
Supply-chain safety
canary-scan pins third-party Python dependencies to releases no newer than 14 days via uv's
exclude-newer setting in pyproject.toml. This bounds the window during which a compromised
upstream package could enter the resolved lockfile. The Didier Stevens bundled scripts are pinned
at build time via make vendor; their provenance (commit SHA + version + date) is recorded in
src/canary_scan/bundled/VERSIONS.txt.
License
Apache-2.0. Bundled third-party scripts (pdfid, pdf-parser, rtfdump) are BSD 2-Clause — see src/canary_scan/bundled/README.md.
Metadata
Release files for canary-scan 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| canary_scan-0.2.0.tar.gz | 468.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| canary_scan-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 572.9 kB
Release files / canary_scan-0.2.0.tar.gz
| Download URL | canary_scan-0.2.0.tar.gz |
|---|---|
| Size | 468.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4ebd7b181b6ed13d3b220ccf22493e3806a951dc11ecec0dccb333f0aa2b8a4
|
|
BLAKE2b-256 checksum How to use checksums |
be0dad1d73f6566b0f0bad025f873fc46037d7f19e2f564c5a9a052cbb25ee2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / canary_scan-0.2.0-py3-none-any.whl
| Download URL | canary_scan-0.2.0-py3-none-any.whl |
|---|---|
| Size | 104.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2714a87bdce53db5697ecafb441d9f31307b0c19a2af1b008b812176babb4e8
|
|
BLAKE2b-256 checksum How to use checksums |
ed3e4b21d7795235748d055f804469685ead282bfb6c40277f9ecedfadcd062b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|