Skip to main content

Mass PII / Secret Finder — v2

A recon tool that automates the classic bug-bounty JS-mining workflow:

target URL (+ explicit authorization confirmation, + scope)
   │
   ▼
discover every reachable, in-scope JS file — real multi-hop HTML crawl,
script tags, dynamic import()/chunk manifests, sourcemaps, conventional
paths, optional passive subdomain discovery via public CT logs
   │
   ▼
mine each file for API keys, tokens, credentials, internal endpoints,
and PII-shaped strings — ~90 named patterns + a freeform high-entropy
heuristic that catches secrets no named pattern covers
   │
   ▼
validate findings — structural/offline checks (Luhn, key-shape, JWT
decode), scope-checked + rate-limited reachability probing — and triage
by a weighted severity model
   │
   ▼
report: live console (GUI), plus JSON / HTML / SARIF / Markdown / CSV
export, with diff-against-previous-scan support

⚠️ Authorized use only

Run this only against systems you own or are explicitly authorized to test (a bug bounty program in scope, a client engagement, your own app). Scope enforcement is no longer just a README sentence:

  • Explicit authorization is required — the "I own this target or am explicitly authorized to test it" checkbox in the GUI must be checked before a scan will run.
  • Every request the crawler/validator makes is checked against a ScopeGuard: the primary target's domain plus any extra in-scope rules you add (exact host, sub.example.com, or *.example.com wildcard). Anything outside that scope is recorded as excluded, never fetched.
  • robots.txt is honored during the HTML-crawl phase by default.
  • All target-facing requests are rate-limited (default 8 req/s, tunable in the GUI) so scans stay polite.

It does:

  • Read-only HTTP requests to the target (fetching pages/JS it already serves)
  • Read-only reachability checks on endpoints discovered on that same, in-scope target
  • Passive, public-record subdomain discovery (CT logs via crt.sh) — no active subdomain brute force or port scanning

It deliberately does not:

  • Attempt to authenticate to third-party providers (AWS, Stripe, Slack, GitHub, etc.) using discovered keys. Testing a leaked key against its provider is a separate action outside the target's own infrastructure and needs its own authorization. The tool flags these for manual, in-scope verification instead and tells you the standard safe way to confirm impact.
  • Brute-force, fuzz, or guess authentication credentials.
  • Exploit any discovered vulnerability.
  • Touch anything outside the declared scan scope.

Setup

Install it as a package — this puts a mass-pii-finder command on your PATH:

pip install .
# isolated (recommended):        pipx install .
# straight from GitHub:          pipx install git+https://github.com/kanishk-dadhich/MassPIIFinder

Or just install the dependencies and run it from the cloned repo:

pip install -r requirements.txt

Support / Donate

If this tool helped you during testing, you can support the project here: https://razorpay.me/@kanishkdadhich

Usage

mass-pii-finder      # if installed as a package
# or, from the cloned repo:
python app.py

Open http://127.0.0.1:7331. Enter a target URL, confirm authorization, optionally add extra in-scope domains and tune scan options, click Run scan. You get a live pipeline log, a severity-sorted findings table, a click-through detail drawer per finding (with decoded JWTs, probe results, full clickable source URLs, and validation notes), scan history (SQLite-backed), a Compare tab for scan-to-scan diffing, and one-click JSON / HTML / SARIF / Markdown / CSV export.

What it detects

~90 named patterns across these categories (up from ~20 in v1), plus a freeform high-entropy heuristic for un-named/custom secret schemes:

Category Examples
Cloud AWS (+ session tokens), GCP (API key, OAuth, service-account JSON), Firebase, Azure (Storage/AD), DigitalOcean, Heroku, Alibaba Cloud, Cloudinary
Payment Stripe (live/restricted/webhook), PayPal Braintree, Square, Shopify, Coinbase
Messaging Slack, Discord, Twilio, SendGrid, Mailgun, Mailchimp, Telegram, Intercom
VCS/CI GitHub, GitLab (+CI), NPM, Bitbucket, CircleCI, Docker registry auth, Terraform Cloud, HashiCorp Vault
Observability Sentry, Datadog, New Relic, Mixpanel, Segment, LaunchDarkly, PagerDuty
Auth provider Auth0, Okta, Algolia
Auth JWTs (decoded), Kubernetes SA tokens, Basic-auth-in-URL, bearer tokens
Generic Private key blocks, DB connection strings, generic key/password assignments, freeform high-entropy heuristic
Endpoints API paths, GraphQL, admin/internal/debug paths, S3/GCS/Azure Blob buckets, Swagger/OpenAPI, WebSocket, internal/RFC1918 hosts, sourcemap refs
PII Emails, phones, IPv4/IPv6, SSN-shaped, credit-card-shaped (Luhn-checked), IBAN-shaped, DOB fields

Every finding gets a multi-signal confidence score (base pattern confidence + entropy + offline structural validation — Luhn checksum, AWS key-ID shape, JWT segment shape — + noise-hint suppression), a severity rating (CRITICAL/HIGH/MEDIUM/LOW), and (for endpoints) a scope-checked, rate-limited live reachability probe.

Project layout

mass_pii_finder/           the installable package
  app.py         Flask GUI backend (+ SQLite scan history, diff endpoint)
  core/
    scope.py     authorization-scope enforcement (ScopeGuard)
    crawler.py   JS discovery: real multi-hop crawl, dynamic imports, chunk
                 manifests, sourcemaps, passive subdomain discovery, robots.txt,
                 rate limiting
    patterns.py  ~90-pattern regex library + offline structural checks + noise-hint list
    extractor.py pattern matching, entropy scoring, freeform heuristic scanner, dedupe
    validator.py structural validation, JWT decode, scope-checked safe endpoint
                 probing, weighted severity, scan-to-scan diffing
    report.py    JSON / HTML (searchable) / SARIF / Markdown / CSV report builders
  templates/     GUI HTML
  static/        GUI CSS/JS
app.py           shim so `python app.py` still works from the repo
pyproject.toml   packaging (installs the `mass-pii-finder` command)

Extending it

  • Add patterns: edit core/patterns.py — each entry is (regex, category, base_confidence).
  • Add an offline structural check: add a function to STRUCTURAL_CHECKS in core/patterns.py.
  • Add new endpoint shapes: ENDPOINT_PATTERNS in the same file.
  • Add a new report format: add a builder function to REPORT_BUILDERS in core/report.py.
  • Export SARIF from the GUI to drop findings straight into GitHub code scanning or most CI security dashboards; use the Compare tab to diff a scan against a previous one and focus on genuinely new findings.

Metadata

Release files for mass-pii-finder 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mass-pii-finder 2.2.0
File Size Uploaded
mass_pii_finder-2.2.0.tar.gz 47.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mass-pii-finder 2.2.0
File Interpreter ABI Platform
mass_pii_finder-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 96.6 kB

Release files / mass_pii_finder-2.2.0.tar.gz

Download URL mass_pii_finder-2.2.0.tar.gz
Size 47.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2c3d2dc699b5e798d804dfba4465c0c207b957b8dcf298b8445fe63ac07bbd16
BLAKE2b-256 checksum
How to use checksums
59ae0bd0885618458de01f9bceb4f859099387de5eb01ee15fb08e68a69fa39d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / mass_pii_finder-2.2.0-py3-none-any.whl

Download URL mass_pii_finder-2.2.0-py3-none-any.whl
Size 48.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e0df682ae9efbe5e36b418c8f57a2d003e53f81aa0f544e9bafb51e46feef0a
BLAKE2b-256 checksum
How to use checksums
243dd980158251f9982b25fa457ba6d2d22f3706dcae8809343a2c79512ca0a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

2.2.1

2 release files

This release

2.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page