Warden · privacy & compliance
tracker-warden
Inventory every third-party tracker, pixel and SDK your built static site loads, with vendor, company and category, and gate CI on an approved-vendor list.
npm i -D @mrlouiswright/tracker-wardenPublished to GitHub Packages: add @mrlouiswright:registry=https://npm.pkg.github.com to .npmrc first (installing needs a token with read:packages).
What it checks
- Vendor database45 common vendors (Google Analytics/Ads/Tag Manager, Meta, TikTok, LinkedIn, X, Pinterest, Snap, Microsoft, Criteo, Taboola, Hotjar, Clarity, FullStory, Mixpanel, Segment, Amplitude, Heap, Plausible, Fathom, HubSpot, Intercom, YouTube…
- Detection
<script src>, inline snippets by signature,<iframe>,<link>stylesheets and resource hints,<img>pixels (1x1, hidden, inside<noscript>), media and embeds. Unknown third-party domains are reported too. - Categoriesadvertising, session replay and social widgets (medium), tracking pixels (medium), analytics/tag managers/marketing (low), unknown script domains (low), other third parties such as fonts, CDNs, video, maps, payments (info).
- Approved vendorslist your reviewed vendors in
approved; anything else is reported high, and approved trackers drop to info. - Inventory
--inventory vendors.jsonorvendors.csvfor your records of processing, DPIA or privacy policy (see policy-drift-warden).
Quick usage
CLI
npx tracker-warden dist
npx tracker-warden dist --inventory vendors.csv
npx tracker-warden dist --approved plausible,stripe,google-fonts --fail-on high
npx tracker-warden public --first-party cdn.example.net --format sarif > trackers.sarif
API
import { check, inventory, VENDORS, vendorForUrl } from "tracker-warden";
const report = check("dist", { approved: ["plausible"] });
console.log(report.info.inventory);
vendorForUrl("https://connect.facebook.net/en_US/fbevents.js").name; // "Meta Pixel"
Every option is documented in the tracker-warden docs.
CI / GitHub Action
permissions:
contents: read
security-events: write # only needed for the SARIF upload
jobs:
tracker-warden:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with: { persist-credentials: false }
- run: npm ci && npm run build # produce the static site first
- uses: MrLouisWright/tracker-warden@v1
with:
path: dist
fail-on: high
sarif: tracker-warden.sarif
- uses: github/codeql-action/upload-sarif@v3
if: always()
with: { sarif_file: tracker-warden.sarif }