GitHub Packages · MIT · Node ≥ 18

phish-sentinel

Offline phishing URL heuristics with an explainable score: lookalike and homograph domains, brand impersonation, IP hosts, user@host tricks, risky TLDs, shorteners, free hosting and redirect chains.

  1. 1 Point the @mrlouiswright scope at GitHub Packages in .npmrc

    @mrlouiswright:registry=https://npm.pkg.github.com
  2. 2 Install

    npm i -D @mrlouiswright/phish-sentinel
Installing from GitHub Packages needs a token

Published to GitHub Packages, not npmjs.com. GitHub Packages needs a GitHub token with read:packages to install, even for public packages: add //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} to .npmrc or run npm login --registry=https://npm.pkg.github.com.

~/project — zsh
$ npx phish-sentinel 'https://www.paypal.com.secure-login.xyz/verify'phish-sentinel — 1 target(s) https://www.paypal.com.secure-login.xyz/verify  domain: secure-login.xyz  score: 80  verdict: likely-phishing  CRITICAL https://www.paypal.com.secure-login.xyz/verify  Score 80/100 (risky-tld, brand-impersonation, credential-lure) [phishing-likely]           ↳ secure-login.xyz  HIGH     https://www.paypal.com.secure-login.xyz/verify  "paypal" appears in the host name but the site is secure-login.xyz, not paypal.com [brand-impersonation]           ↳ paypal  MEDIUM   https://www.paypal.com.secure-login.xyz/verify  "secure" on secure-login.xyz [credential-lure]           ↳ secure  MEDIUM   https://www.paypal.com.secure-login.xyz/verify  .xyz is heavily abused for phishing [risky-tld]           ↳ xyz 1 critical, 1 high, 2 medium✖ Failing (fail-on: high).
Real output from running phish-sentinel locally on a test fixture.

Why it exists

phish-sentinel scores URLs from 0 to 100 and tells you exactly why. Give it URLs, or files (emails, .eml, HTML, logs, URL lists) and it extracts the URLs itself, refanging “hxxp://” and “[.]” and decoding quoted-printable mail. Nothing is fetched or resolved, so it is safe to run on live phishing samples and works in air-gapped triage. Pass your own domains with --brand to catch typosquats and homographs of *your* brand. CLI, library and GitHub Action. Node.js 18+, zero runtime dependencies.

Features

phishing-likely

Combined score says this URL is very likely phishing (default: critical)

phishing-suspicious

Combined score says this URL is suspicious (default: high)

brand-lookalike

Domain is a typo/lookalike of a protected brand domain (default: high)

homograph

IDN homograph: mixed scripts or confusable characters spell a known domain (default: high)

brand-impersonation

Brand name in the subdomain or path of an unrelated domain (default: high)

userinfo-trick

user@host form hides the real host (https://bank.com@evil.io) (default: high)

dangerous-scheme

javascript:, data: or vbscript: URL (default: high)

ip-host

Host is a raw or obfuscated IP address (default: medium)

Usage

# Example

 npx phish-sentinel 'https://www.paypal.com.secure-login.xyz/verify'

# Example

 npx phish-sentinel reported/*.eml --brand acme-corp.com --brand acme.io -f table

# Example

 cat proxy.log | npx phish-sentinel - --trust acme-corp.com --format json > urls.json

CI / GitHub Action

permissions:
  contents: read
  security-events: write   # only for the SARIF upload
steps:
  - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
    with: { persist-credentials: false }
  - uses: MrLouisWright/phish-sentinel@v1
    with:
      targets: 'urls.txt'
      fail-on: high
      sarif: phish-sentinel.sarif
  - uses: github/codeql-action/upload-sarif@v3
    if: always()
    with: { sarif_file: phish-sentinel.sarif }

Options & flags

FlagDescription
--brand <domain>Protect your own domain: flag typos, homographs and impersonation of it
--trust <domain>Never flag URLs on this registered domain (repeatable or comma-separated)
--no-builtin-brandsOnly use --brand domains, not the built-in list of commonly phished brands
-f tableOne line per URL: score, verdict, URL
Policy and output
-c, --config <file>JSON config (default .phish-sentinel.json if present)
-f, --format <fmt>text (default) | json | sarif | markdown
--json/--sarif/--markdown <file>Also write that format to a file
--fail-on <sev>critical | high | medium | low | info | none (default high)
--list-rulesPrint rules and default severities
--no-colorDisable colours

Full reference, config file format and API in the README.

Support this project

Support open-source security tools

I build free, open-source tools that help developers ship safer websites. Every coffee helps keep them maintained, documented and free for everyone.

Buy me a coffee (opens Stripe in a new tab)

Secure checkout by Stripe

Portrait of Louis Wright

About the author

Louis Wright

Cyber security researcher and software engineer based in the UK.

More tools by Louis Wright

58 tools

Sentinels security scanners & CI gates · 19