DashboardcliGitHub request exact-origin assertions

GitHub request exact-origin assertions

Category: gotcha
Confidence: 1.00
ID: 01a08aa4-4685-73bb-a679-95cbe03ffa60
Project ID: c760f4f9-42b0-4ce0-b36d-6b8c38d770b2
Cross-project: No
Recalled in other projects: 0
Source session: 0rGsfNZYXX3HLfib6
Created: 2026-09-10 09:26:56
Updated: 2026-09-10 09:26:56

Content

Trap: checking whether a request string contains api.github.com looks sufficient for proving GitHub was not contacted, but attacker-controlled hosts, paths, or query values can contain that substring. Fix: parse the request with new URL(request) and compare origin === "https://api.github.com"; exact-origin assertions prove routing without substring false positives.

Move to: