Skip to content

docs: cloud crawl scope, include/exclude patterns and authorised crawls (#348) - #351

Merged
nc9 merged 2 commits into
mainfrom
docs/crawl-scope-and-authorised
Sep 13, 2026
Merged

nc9 merged 2 commits into
mainfrom
docs/crawl-scope-and-authorised

Conversation

@nc9

@nc9 nc9 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Closes #348.

Documents the cloud crawl settings, which had no docs page at all, and corrects the include/exclude pattern syntax that the existing config reference got wrong.

New page: dashboard/crawl-settings

Covers the four cards on Website → Settings → Crawl:

  • Crawl scope, discover / sitemap, from squirrelscan/repo#2109, with the empty-sitemap fallback and the run notice it posts.
  • Include and exclude patterns (squirrelscan/repo#2108): where they apply, the limits, and that a list breaking one is refused at save time rather than truncated at crawl time.
  • Respect robots.txt, including that Crawl-delay is capped at 2 seconds and what that costs a large crawl.
  • Authorised crawls (squirrelscan/repo#2113): what turns one on, and plainly that it does not apply robots.txt at all, so an exclude pattern is the replacement for a Disallow.

Correction to configuration/crawler

The include / exclude reference described a glob dialect the crawler does not implement. matchesPattern treats * as the only special character, standing for any run of characters including /, and escapes everything else, so ? and [abc] match themselves. A pattern is tested against the URL's path unless it starts with http:// or https://.

Three things followed from that:

  • The documented *?preview=* examples could never match, because a path has no query string. They are absolute now.
  • /blog/* was documented as not matching /blog/post/comment. It does: a /* suffix is a prefix test.
  • /api/*/users was documented as not matching /api/v1/v2/users. It does, for the same reason.

Also adds two cross-reference notes: from include to the dashboard lists, and from headers to authorised crawls.

Verification

Every claim on the new page was checked against the implementation, and a second adversarial pass over it found nine factual errors that are fixed in this branch. The ones worth calling out, because they are the non-obvious product behaviour:

  • The GitHub check forwards scope and patterns but no custom headers, so it is never an authorised crawl and does not read the robots preference.
  • Quick coverage (the Fast depth preset) disables link discovery on its own, so Follow links behaves like sitemap-only there.
  • Sitemap scope still queues pages carrying findings open from the last audit, and the start URL is queued but still filtered like any other URL.
  • Backoff is 429, or 503 with a Retry-After. A bare 503 is an outage.

make validate passes in docs/.

Notes

  • The Crawl scope section describes squirrelscan/repo#2109, which is not merged yet. Hold this until that ships.
  • Filed squirrelscan/repo#2134 for letting the MCP add_website tool set a site's crawl scope at registration.
  • Not fixed here, flagged instead: configuration/crawler documents allow_query_params default as "drop all query params", but an empty list drops only known tracking prefixes and keeps the rest.
  • The private gitlink bump follows separately.

https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA

…crawls

Closes #348.

New page at dashboard/crawl-settings covering the Website > Settings > Crawl
page: the crawl scope choice (follow links / sitemap only), the include and
exclude patterns, the robots.txt toggle, and the authorised crawl profile.

The patterns and the profile shipped in squirrelscan/repo#2108 and #2113 with
no docs at all. The scope choice is squirrelscan/repo#2109. Says plainly that
an authorised crawl does not apply robots.txt at all, and that an exclude
pattern is the replacement for a Disallow.

Also corrects the pattern syntax in configuration/crawler: the docs described a
glob dialect the crawler does not implement. matchesPattern treats `*` as the
only special character, standing for any run of characters including `/`; `?`
and `[abc]` are escaped and match themselves. A pattern is tested against the
URL's path unless it starts with a scheme, so the documented `*?preview=*`
examples could never match and are now absolute.

Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA
Signed-off-by: Nik Cubrilovic <[email protected]>
The page claimed a sitemap-scoped crawl still queues pages carrying findings
open from the last audit. squirrelscan/repo#2132 stopped doing that: those seeds
are enqueued ahead of the sitemap and win the frontier dedup, so an off-sitemap
page spent the capped budget before the URLs the customer asked for.

Cached-page reuse is off under the same scope and for the same reason. Reusing a
page means re-reading its links, and the crawler enqueues them with no discovery
check, so one reused page puts the whole site back in the frontier. That one is
tracked as #354.

Both are now under a "What sitemap scope gives up" heading, since a reader
weighing the setting needs the cost and not only the benefit. The sample event
log carries the reuse sentence the run actually posts, and the empty-sitemap
fallback moved back above the trade-offs so the section reads in the order the
crawl happens.

Also notes that an authorised crawl never reuses pages either, because an
authenticated response must not be stored where another audit could read it.

Claude-Session: https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA
Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9

nc9 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Updated in c94d7c0 for a behaviour change that landed after this PR was opened.

squirrelscan/repo#2132's acceptance pass found that disableLinkDiscovery gates only one of the three ways a URL enters the crawl frontier. Two others were letting off-sitemap pages in, and both are now turned off under sitemap scope:

  • Carried-finding seeds. They are enqueued ahead of the sitemap and win the frontier dedup, so an off-sitemap page spent the capped budget before the URLs the customer asked for. This PR previously said those pages are still queued, which is now false.
  • Cached-page reuse. Reusing a page re-reads its links, and the crawler enqueues them with no discovery check, so one reused page puts the whole site back in the frontier. Tracked as Cached page reuse ignores disableLinkDiscovery #354.

Both now sit under a "What sitemap scope gives up" heading, because someone weighing the setting needs the cost and not only the benefit. The sample event log carries the reuse sentence the run actually posts, and the empty-sitemap fallback moved back above the trade-offs so the section reads in the order the crawl happens.

Also added: an authorised crawl never reuses pages either, because an authenticated response must not be stored where another audit could read it.

One claim I removed rather than corrected. An earlier draft tied reuse to the dashboard's Incremental crawl toggle. Checking the source, that toggle is stored in the Durable Object and never read on any run path, so reuse is decided entirely by the container's environment and the run's shape. Filed as squirrelscan/repo#2136. The page now describes what the crawl does and does not mention the toggle.

make validate still passes. All checks green.

https://claude.ai/code/session_0174D96WamG9ZhJxRudpeniA

@nc9
nc9 merged commit 3247ff2 into main Sep 13, 2026
14 checks passed
@nc9
nc9 deleted the docs/crawl-scope-and-authorised branch September 13, 2026 12:27
@nc9 nc9 mentioned this pull request Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: cloud crawl scope patterns and the authorised crawl profile

1 participant