Repository navigation
Conversation
|
Reviewed the diff for
|
…r sites' servers #932 Signed-off-by: Nik Cubrilovic <[email protected]>
…llowlist, edge fixes #932 Signed-off-by: Nik Cubrilovic <[email protected]>
286510d to
8c35958
Compare
|
Review of
Test coverage: |
|
Correction to my review above: the test file is |
Closes #932
New rule
images/hotlinked(page scope, no network, URL parsing on markup the page already has): reports, as info, a content image that loads from another site's server, grouped per host. Every finding is info and the rule severity is info: it never lowers the score.What counts:
<img>(data-srcanddata-lazy-srcbefore a placeholdersrc, thensrcandsrcset),<picture><source>, inlinestylebackground; nothing inside<noscript>. Relative URLs resolve against<base href>when set. Pages on localhost or a loopback address are skipped.Not a hotlink
baseUrldomain too);badge|embed|widget|featured|launch|seal|banner-ad;allowed_hosts.Corpus (reviewer's eval, 50,000-page target: 45,547 stored pages, 16,935 projects)
api.producthunt.com; hand-judged precision 10-20%.allowed_hostsis the escape hatch and is documented.Registry and counts: rule,
images/index.ts, docs page with options, nav, images card, images "(16 rules)" in both indexes,constants.ts309 to 310, golden pin (perRuleTally310,findings+500, health score unmoved at 51),varyingRulesfor both corpora.Tests:
hotlinked-932.test.ts(26: the issue's fixtures, per-host grouping, invariant message, picture/srcset/lazy/background, first-party and lookalikes, the CDN list and the new hosts, bare tenants, badges by host path and alt, platform pixel paths, loopback,<base href>,allowed_hostsspellings, share images, robustness, 3,000 images under 1.5 s). Registry-wide rule tests and the golden pass by explicit path; tsgo packages/rules clean;tangly check --strictpasses. Agent skill: no change needed.Merge note: this and #1024 both bump the same count literals and golden pin, so the second to land needs a trivial rebase.