diff --git a/all.json b/all.json index db9bc45cb..b8464d4b1 100644 --- a/all.json +++ b/all.json @@ -1,5 +1,28 @@ { - "allow": [], + "allow": [ + "*.fleek.co", + "ddns.net", + "ddns.us", + "github.io", + "herokuapp.com", + "hopto.org", + "js.org", + "netlify.app", + "on.fleek.co", + "pagekite.me", + "pages.dev", + "plesk.page", + "servehttp.com", + "square.site", + "sytes.net", + "timeweb.ru", + "vercel.app", + "web.app", + "webflow.io", + "weebly.com", + "wixsite.com", + "zapto.org" + ], "deny": [ "07e96d43-381a-46a3-9c16-6daf97213efc.co", "0vvwvuniswap.top", diff --git a/packages/phishing/src/additions.spec.ts b/packages/phishing/src/additions.spec.ts index da39177fa..c060aba53 100644 --- a/packages/phishing/src/additions.spec.ts +++ b/packages/phishing/src/additions.spec.ts @@ -9,33 +9,6 @@ const addresses = JSON.parse(fs.readFileSync('address.json', 'utf-8')) as Record const allowed = JSON.parse(fs.readFileSync('known.json', 'utf-8')) as Record; const all = JSON.parse(fs.readFileSync('all.json', 'utf8')) as { allow: string[]; deny: string[] }; -const TOP_LEVEL = [ - // wildcards - '*.fleek.co', // storageapi.fleek.co, storageapi2.fleek.co - 'on.fleek.co', - - // root domains - 'ddns.net', - 'ddns.us', - 'github.io', - 'herokuapp.com', - 'hopto.org', - 'js.org', - 'netlify.app', - 'pagekite.me', - 'pages.dev', - 'plesk.page', - 'servehttp.com', - 'sytes.net', - 'timeweb.ru', - 'vercel.app', - 'web.app', - 'webflow.io', - 'weebly.com', - 'wixsite.com', - 'zapto.org' -]; - describe('added addresses', (): void => { it('has no malformed addresses', (): void => { const invalids = Object @@ -72,9 +45,9 @@ describe('added addresses', (): void => { }); describe('added urls', (): void => { - it('has no entries for allowed top-level domains', (): void => { + it('has no entries matching top-level domains in allow', (): void => { const invalids = all.deny.filter((u) => - TOP_LEVEL.some((t) => + all.allow.some((t) => // for *. count the parts before the check (t.startsWith('*.') && (u.split('.').length === t.split('.').length)) ? (u.endsWith(t.substring(1)) || u === t.substring(2))