Skip to content

fix: provider hardening (adversarial review ADV-2/3/7/8/10) - #44

Merged
vedantggwp merged 1 commit into
mainfrom
fix/adv-providers
Jul 12, 2026
Merged

fix: provider hardening (adversarial review ADV-2/3/7/8/10)#44
vedantggwp merged 1 commit into
mainfrom
fix/adv-providers

Conversation

@vedantggwp

Copy link
Copy Markdown
Owner

From the fresh-eyes adversarial review:

  • Security: .md variant construction crossed hosts on origin-root URLs (docs.foo.com/docs.foo.com.md, squatter-registrable) with the result accepted as fidelity: full. Now pathname-only, root-skipped, query-safe.
  • Site-wide llms.txt no longer accepted as specific-page content (was stored as verbatim capture of pages never fetched)
  • Malformed numeric entities clamp to U+FFFD instead of killing whole extracts/result sets
  • Search failures are discriminated (blocked/error vs genuinely empty) so scheduled updates can't silently conclude 'nothing new' forever under DDG throttling; research.js exits nonzero on blocked
  • Redirect hops: http/https allowlist (incl. DDG-unwrapped URLs), shared deadline, reader.cancel on size cap

385/385 tests (12 new: URL-shape, redirect, entity, anomaly-page classes). Implemented by codex (gpt-5.5) from spec; reviewed + semantically verified here.

…clamp, search failure discrimination, redirect edges

Adversarial-review fixes ADV-2/3/7/8/10: .md variants built on pathname
only (origin-root URLs could probe squatter-registrable *.com.md hosts
and be accepted as fidelity:full); llms.txt no longer accepted as page
content; out-of-range entities clamp to U+FFFD instead of throwing;
searchWeb returns discriminated errors so headless updates can tell
'DDG blocked us' from 'nothing new'; redirect hops scheme-allowlisted
with a shared deadline; reader cancelled on size abort. 385 tests
(12 new). Implemented by codex from spec; verified here.
Copilot AI review requested due to automatic review settings July 12, 2026 15:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vedantggwp
vedantggwp merged commit af45875 into main Jul 12, 2026
1 check passed
@vedantggwp
vedantggwp deleted the fix/adv-providers branch July 12, 2026 15:56
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.

2 participants