Sentinel · security scanner
phish-sentinel
Offline phishing URL heuristics with an explainable score.
npm i -D @mrlouiswright/phish-sentinelPublished to GitHub Packages: add @mrlouiswright:registry=https://npm.pkg.github.com to .npmrc first (installing needs a token with read:packages).
What it checks
- LookalikesDamerau-Levenshtein distance to ~60 commonly phished brands (PayPal, Microsoft, Apple, banks, couriers, crypto exchanges…) and your
--branddomains, after folding confusables (rn→m,0→o,1→l, Cyrillic/Greek letters)… - Homographs
xn--domains whose Unicode form renders like a brand, or that mix Latin with Cyrillic/Greek. - Impersonationa brand name in the subdomains (
paypal.com.secure-login.xyz), in the domain (micros0ft-support.com), or in the path together with another signal.
Quick usage
CLI
npx phish-sentinel 'https://www.paypal.com.secure-login.xyz/verify'
npx phish-sentinel reported/*.eml --brand acme-corp.com --brand acme.io -f table
cat proxy.log | npx phish-sentinel - --trust acme-corp.com --format json > urls.json
API
import { analyzeUrl, brandTable } from 'phish-sentinel';
const r = analyzeUrl('https://acme-c0rp.com/sso', { brands: brandTable(['acme-corp.com']) });
// { score: 60, verdict: 'suspicious', signals: [{ rule: 'brand-lookalike', ... }] }
Every option is documented in the phish-sentinel docs.
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 }