Skip to content

fix(tech-detect): firebase-hosting reads the page's own host, not *.web.app URLs in the HTML #1448 - #1450

Closed
nc9 wants to merge 2 commits into
mainfrom
fix/tech-firebase-hosting-fp-1448
Closed

nc9 wants to merge 2 commits into
mainfrom
fix/tech-firebase-hosting-fp-1448

Conversation

@nc9

@nc9 nc9 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1448

Cause (confirmed on the issue): the generated firebase-hosting signature had a url-path detector for \.web\.app|\.firebaseapp\.com; url-path matches the page URL and then the whole page HTML, and the storefront's HTML loads a third-party app's script from a *.web.app host. The x-dc: gcp-* header was never matched.

Change

  • New detector type url-host: matches the page's own host name only, never its HTML.
  • firebase-hosting moves to the curated hosting.ts (the generator dedupes against curated ids, so a regenerate cannot bring the old pattern back) with url-host (^|.)(web.app|firebaseapp.com).?$ (a trailing-dot host counts) and the unchanged Vary: x-fh-requested-host header signal; its entry is removed from generated.ts. scripts/generate-tech-fingerprints.ts accepts url-host.
  • The same pattern shape in surge-sh, railway-app, aws-amplify-hosting and one ac-page.com signature is filed as tech-detect: hosting signatures written as host suffixes match third-party URLs in the page HTML #1449.

Tests

firebase-hosting-1448.test.ts (synthetic fixtures only): Shopify headers with gcp x-dc and server-timing (negative); a page whose third-party app script is on *.web.app / *.firebaseapp.com (negative); hosts that only contain the suffix (negative); *.web.app and *.firebaseapp.com hosts and the Vary entry (positive); an unparseable URL does not throw. All tech-detect suites pass; a trailing-dot host (my-site.web.app.) is a positive test.

Not run: the corpus check for loss of true Firebase Hosting detections (label squirrelscan-53). The only sites that lose it are those detected through a .web.app URL in the HTML rather than their own host or header.

Icon: the slug firebase-hosting is unchanged, so no new tech icon. Docs: cloud/technologies.mdx says hosting platforms on a host suffix are read from the page's own host, and that a site that only mentions firebaseapp.com or loads a third-party script from *.web.app is intentionally not reported. Skill change: none.

nik

nc9 added 2 commits November 1, 2026 06:51
…eb.app URLs in the HTML; url-host detector #1448

Signed-off-by: Nik Cubrilovic <[email protected]>
…docs note the intended recall change #1448

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9

nc9 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Landed in v0.0.152 as b4e83ec0 50b79736 via #1461. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.152. Closing this original.

nik

@nc9 nc9 closed this Oct 31, 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.

tech-detect: Firebase Hosting reported on a Shopify storefront (false positive)

1 participant