Repository navigation
fix(crawler,engine,cli): --offline holds every request to the audited site - #1171
Conversation
|
Reviewed the diff, with most attention on
Test coverage looks thorough: the matcher unit tests, the crawler and engine tests using a second server and |
… site #819 A shared ownSiteHostMatcher (the host, its www or apex twin, project domains and their subdomains) now backs allowHost on the crawl's egress policy (page redirect hops, the seed redirect probe, discovery probes, the AI agent access probe), the sitemap walk (a sitemap named on another host is skipped and recorded, not requested), the asset checks and the link probe, and the soft-404 and cloaking probes; the CLI reachability probe stops at a redirect off the site. Assets on the www or apex twin or a project domain are read as the site's own in an offline audit. Docs, help text and CHANGELOG say what ships; tests prove each case by Host header against a second server, with a control where it is requested. Signed-off-by: Nik Cubrilovic <[email protected]>
…eads as skipped; manifests use the shared own-site matcher; project domains with a port, wildcard or Unicode name match #819 Signed-off-by: Nik Cubrilovic <[email protected]>
30aab45 to
c3a1237
Compare
|
Review of #1171 ( The design is sound. One
Test coverage is good. The one gap I saw is IPv6 literal sites ( |
Closes #819.
squirrel audit --offlinenow sends nothing to a host outside the audited site. The site's own hosts are the audited host, itswwwor apex twin,[project] domainsand the subdomains of all of them, one definition (ownSiteHostMatcher,packages/utils/src/own-site.ts) feedingEgressPolicy.allowHosteverywhere.egressFor,ownSiteOnly); seed redirect probe; CLI reachability probepackages/crawler/tests/offline-own-site-819.test.ts,apps/cli/tests/utils/reachability.test.ts,apps/cli/tests/commands/audit-offline-third-party-wiring.test.tsdiscoverSitemaps+SITEMAP_OFF_SITE_SKIPPED_ERROR;crawl/sitemap-existsandcrawl/sitemap-validpackages/rules/tests/sitemap-off-site-skipped-819.test.tsreliability/broken-resourcesreports it as not requestedownSiteEgress.allowHostin the asset phasepackages/audit-engine/tests/offline-own-site-819.test.tsprobeEgress(..., ownSiteOnly)absorbResourceOccurrences(..., isOwnHost)Hostheader with a second server, with a control where it is requested--offlinehelp text matchdocs/cli/audit.mdx, rule pages, help and completionsmake validateThe AI agent access probe and the discovery probes use the crawl's egress policy, so they stay on the site too.
Reviewed with a Sonnet security pass; its findings were fixed here (an own-host sitemap that redirects off-site now reads as skipped, manifests use the shared matcher, project domains with a port, wildcard or Unicode name match). Known and left alone, with reasons:
security/http-to-httpsfollows redirect hops throughrules/src/links/redirects.tswith noallowHost; its request tool is never injected today (no request is sent), so nothing leaks, but it should be gated if it is ever wired.--offlinedoes not restrict that run.runRulesOnStoragepath (squirrel analyze, no--offline) does not takeownSiteOnly.Behaviour note: in an offline audit only, a reference on the www or apex twin or a project domain moves from the third-party pool to the site's own pool. Default audits are unchanged.
Docs: updated (audit command page, sitemap-exists, sitemap-valid, broken-resources). Skill: no change needed.