diff --git a/packages/jsts/src/rules/S5332/rule.lib.ts b/packages/jsts/src/rules/S5332/rule.lib.ts index 5dfe2dbf7b4..92bdad4467e 100644 --- a/packages/jsts/src/rules/S5332/rule.lib.ts +++ b/packages/jsts/src/rules/S5332/rule.lib.ts @@ -48,7 +48,7 @@ const EXCEPTION_FULL_HOSTS = [ 'graphml.graphdrawing.org', 'json-schema.org', ]; -const EXCEPTION_TOP_HOSTS = [/(.*\.)?example\.com$/, /(.*\.)?example\.org$/, /(.*\.)?test\.com$/]; +const EXCEPTION_TOP_HOSTS = [/\.example$/, /(.*\.)?example\.com$/, /(.*\.)?example\.org$/, /\.test$/, /(.*\.)?test\.com$/]; export const rule: Rule.RuleModule = { meta: { diff --git a/packages/jsts/src/rules/S5332/unit.test.ts b/packages/jsts/src/rules/S5332/unit.test.ts index d7f95353b65..dc41cb6d5ca 100644 --- a/packages/jsts/src/rules/S5332/unit.test.ts +++ b/packages/jsts/src/rules/S5332/unit.test.ts @@ -120,10 +120,14 @@ ruleTester.run('Using clear-text protocols is security-sensitive', rule, { }, { code: ` + url = "http://example.example"; + url = "http://subdomain.example.example"; url = "http://example.com"; url = "http://someSubdomain.example.com"; url = "http://example.org"; url = "http://someSubdomain.example.org"; + url = "http://example.test"; + url = "http://subdomain.example.test"; url = "http://test.com"; url = "http://someSubdomain.test.com"; `,