Skip to content
PubTrust — a ClearTrust product · cleartrust.ccAd quality and malvertising protection for publishers

Docs

Policies and Protection Packs

What a rule is, how rules add up to a verdict, what overrides them, and how they are delivered to a page without slowing it down.

What is the difference between a pack and a policy?

A Protection Pack is a rule set PubTrust maintains: one natively authored file per language plus a language-independent file, versioned in our repository. A policy is what runs on your Site. Enabling a pack attaches a policy derived from it, with its own mode, threshold, language selection, allowlist and fallback creative; you can also write custom policies with rules of your own.

Which kinds of rule are there?

Four. Every rule carries a kind, a weight, a flag saying whether it is inlined into the tag, a lowercase value and a short written justification.

KindValueMatched against
keywordA word or phraseCreative text — visible text, alt and title text, link text, readable friendly-iframe content and bid markup — in a single pass by an Aho-Corasick automaton, so the number of keywords costs bundle size rather than scan time.
domainA bare registrable domain: example.comAdvertiser domains from the bid, iframe hosts and hosts attributed to the slot, each folded to its registrable domain first.
url_patternA plain substringURLs — landing-page paths and tracking parameters such as btag=.
regexA JavaScript regular expressionUsed sparingly, and only in language-independent files, where a fixed term cannot express the signal.

How does a policy reach a verdict?

Matched weights are summed, and the policy fires when the total reaches its threshold — 1.0 unless you change it. Each distinct rule counts once however often its term appears, so an advertiser cannot reach the threshold by repeating a word. Weights are set per language: a term with no innocent use can fire alone at 1.0 or more, while an ordinary word kept only as corroboration sits at 0.2 or below and can never matter on its own.

How do allowlists work?

Allowlist entries are evaluated before a policy's rules and win outright. If the advertiser domain or the landing host is on a policy's allowlist, or an allowlisted keyword appears in the creative text, that policy does not fire for the creative — nothing is summed.

What is the verdict cache?

A table of precomputed verdicts carried in the Site's tag configuration, keyed by creative ID and by advertiser domain, each naming the policy, pack and severity it condemns the creative under. A creative that is already in the table is matched on that lookup, with no text scan and no network request. Keyword matching is the fallback for creatives that are not.

How do rules reach the page?

In two parts. Rules flagged critical in the corpus are compiled into the Site's tag itself, capped by weight so the inline set stays small, so blocking works as soon as the tag runs. The complete compiled rule set is a separate, content-addressed bundle fetched asynchronously from cdn.pubtrust.cc/p/<hash>.json and served as immutable with a one-year cache lifetime; the same file serves every Site on that policy version. When it arrives it is merged with your Site's own modes and thresholds — the shared bundle never carries tenant settings — and ads already seen on the page are scanned again.

How large is each pack?

Counted from the shipped corpus. Each pack has one file per language — cs, da, de, en, es, fi, fr, it, nl, no, pl, pt, sv, tr — plus an xx file for domains, URL patterns and patterns that apply whatever language a creative is in.

Rule counts are read from corpora/ when this page is built.
PackRulesLanguages
Gambling (gambling)1,53714 + xx
Adult (adult)1,00114 + xx
Crypto & Forex Scam (crypto_scam)97314 + xx
Malware & Scam (malware_scam)99314 + xx
Alcohol (alcohol)66714 + xx
Tobacco & Vape (tobacco)57814 + xx
Pharma (pharma)68714 + xx
CBD & Cannabis (cannabis)53214 + xx
Weapons (weapons)60714 + xx
Political (political)52514 + xx
Weight Loss (weight_loss)72314 + xx
Clickbait & Chumbox (clickbait)65414 + xx
Fake Endorsement (fake_endorsement)61114 + xx
AI-Slop Creative (ai_slop)63314 + xx
Shock & Gore (shock)64314 + xx
Fake UI (fake_ui)62814 + xx
Shared infrastructure signals (_shared)42xx
Total12,03414 + xx