Hawk-Eye
Hawk-Eye is a Python CLI tool that scans S3, MySQL, PostgreSQL, MongoDB, CouchDB, Google Drive, Slack, Redis, Firebase, GCS, and local filesystems for PII and secrets exposure. It uses OCR and text analysis to inspect documents (docx, xlsx, pptx, pdf), images, archives, and video files, with configurable regex fingerprints, Slack alerting, and JSON output for CI/CD integration.
What it is
Hawk-Eye (installed as the hawk-scanner / hawk_scanner package) is a Python CLI for scanning data sources for PII and secrets. Beyond the capability list in the summary, the page documents concrete operational details an adopter needs before committing: install-time dependency quirks, a default-behavior gotcha, and a Python-library embedding path.
How to run it
Each source has its own subcommand (fs, s3, gcs, mysql, redis, firebase, slack, postgresql, couchdb, gdrive, text). Two YAML files drive it: connection.yml (source profiles + Slack notify block with redacted and suppress_duplicates options) and fingerprint.yml (regex fingerprints). Typical run:
hawk_scanner all --connection connection.yml --fingerprint fingerprint.yml --json output.json --debugFor CI/CD, connection config can be passed inline instead of by file, with --stdout --quiet:
hawk_scanner fs --connection-json '{"sources": {"fs": {"fs1": {"quick_scan": true, "path": "/path/KYC_PDF.pdf"}}}}' --stdout --quiet --fingerprint fingerprint.ymlIt can also be embedded in Python, optionally with inline fingerprints:
from hawk_scanner.internals import system
pii = system.scan_file("/path/Resume.pdf")
print(pii)Preconditions / gotchas
- Default runs everything. If you invoke it with no subcommand, it runs all scanners (firebase, fs, gcs, mysql, text, couchdb, gdrive, gdrive workspace, slack, postgresql, redis) by default — scope your command explicitly.
- PostgreSQL needs a manual dependency.
psycopg2-binaryis not shipped with the package (author cites Windows incompatibility):pip3 install psycopg2-binary. - RedHat/OCR dependency. The
cv2dependency can error on RedHat until you installyum install mesa-libGL. - Docker usage requires mounting both
connection.ymlandfingerprint.ymlinto/appand passing--platform linux/amd64.
Install
pip3 install hawk-scannerOr from source: clone, pip3 install -r requirements.txt, then python3 hawk_scanner/main.py.
Caveats
Commercial support is offered via the author's LinkedIn/Twitter/Slack rather than a formal channel. The page is largely README/marketing prose; the feature list matches the summary, and no versioning, benchmark, or accuracy data is given for the "advanced algorithms" / OCR detection it claims.
Technologies named here
- Hawk Eye
- psycopg2-binary
- cv2
- Amazon S3
- MySQL
- PostgreSQL
- MongoDB
- CouchDB
- Google Cloud Storage
Techniques named here
- PII and secret detection via deep scanning
- Customizable fingerprint-based scanning
- Real-time Slack alerting with mentions
Related in AppSec
Flowise MCP Security Bypass Enables RCE
Inside an Oracle Database SQL Injection Attack | Huntress
OASIS
