Skip to content

feat(tech-detect): Lovable, Base44, Replit, v0, Supabase, Clerk, Firebase SDK fingerprints #1242 - #1243

Merged
nc9 merged 5 commits into
mainfrom
feat/tech-detect-baas
Oct 29, 2026
Merged

nc9 merged 5 commits into
mainfrom
feat/tech-detect-baas

Conversation

@nc9

@nc9 nc9 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1242.

Adds technology fingerprints for Lovable, Base44, Replit, v0, Supabase, Clerk and Firebase (client SDK). Firebase Hosting is unchanged. All live in packages/tech-detect/src/fingerprints/other.ts; signature count 385 to 392.

Signals (each checked against a real page fetched with curl, except where noted):

  • Lovable: <meta name="author" content="Lovable"> and twitter:site @Lovable (template defaults, seen on 3 live apps), /__l5e/events.<hash>.js and #lovable-badge (hosted apps), gpt-engineer-file-uploads bucket URL (og:image), cdn.gpteng.co/gptengineer.js / lovable.js (both URLs resolve; not seen in a live page).
  • Base44: inline base44_access_token shim, /api/app-logs/<24 hex>/log-user-in-app beacon (live app), *.base44.app host (documented).
  • Replit: *.replit.app / *.repl.co / *.replit.dev page host, replit-dev-banner.js, /__replco/static/ (seen on a replit.app error page). No live deployed app was reachable, so the host and banner are from docs and URL checks only.
  • v0: <meta name="generator" content="v0.app"> (seen on a live v0 deploy; v0.dev also accepted). Skipped the v0-*.vercel.app host: the prefix is only a default and not a reliable signal.
  • Supabase: <ref>.supabase.co/(storage|rest|auth|...)/v1 in an attribute or in a next/image encoded URL, inline createClient('https://<ref>.supabase.co', and the CDN @supabase/supabase-js script tag. Refs are 20 chars per Supabase docs. No live site with these in its HTML was found, so these come from documented URL shapes plus fixtures.
  • Clerk: clerk-js script tag (/npm/@clerk/clerk-js@N/..., any frontend API host, version read), *.clerk.accounts.dev script, data-clerk-js-script, data-clerk-publishable-key="pk_..." (seen on 2 live pages).
  • Firebase: www.gstatic.com/firebasejs/<ver>/ script (version read, seen live), /__/firebase/init.js Hosting reserved script, inline authDomain: "<id>.firebaseapp.com".

Review round 1 changes: Supabase is dropped when Base44 matches (Base44 apps load images from a shared storage project); the Base44 beacon also matches the ${appId} template that custom-domain apps ship; every inline-config, style and resource signal now needs real markup context (script/style body, tag attribute, not <a href>), HTML comments and data-src are ignored, placeholders (your...) are not refs, and bounded literal gates keep hostile markup fast (worst contrived page about 0.85 s).

Round 2: inline-script and style matching now runs to the end of the element (stops at the next script or style tag, so each body is scanned once) instead of a fixed window; the Lovable social image meta must start its value with the bucket URL (og:image or twitter:image, either attribute order).

Known limits (no HTML parser in the engine): a raw <script> tag written unescaped inside a <pre> or <p> is real markup to a regex and can match; a script string that itself contains <!-- ... --> loses the text between them to comment stripping (comment-wrapped legacy scripts work).

False-positive guard: the engine scans raw HTML for script-url when no script list is passed, which would match a code sample in a blog post. Script URL signals here go through scriptSrc(): anchored at the URL start, or inside a real <script ... src= tag. Host signals are anchored to the start of the URL. A test runs a blog post that mentions all seven (with escaped code samples) and expects no match. Also ran the detector over real pages of the vendors' own sites plus a few unrelated large sites: no vendor-site false positives.

Tests: bun test on the four tech-detect test files by path (75 pass), scripts/test-suites.ts --check, tsgo clean, make validate in docs.

Agent skill: no change needed.

Follow-up outside this PR: logos for the new icon slugs (lovable, base44, replit, v0, supabase, clerk, firebase) are not in the private apps/web/public/tech-icons yet.

@nc9
nc9 marked this pull request as ready for review October 28, 2026 23:50
@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown

Review of #1243 (vibe-coding and BaaS fingerprints). No blocking problems found. The detector design is careful and the tests cover near-misses and adversarial markup well. I read the diff only and did not run the test suite.

  • (low) packages/tech-detect/src/detect.ts:45: requires is checked with a case-sensitive includes, but every pattern it gates is /i. Markup such as BASE44_ACCESS_TOKEN or .SUPABASE.CO would match the regex but be skipped by the gate. That is harmless for real-world minified JS and probably intended, but the comment on the type says it, so a one-line test would pin the behaviour.
  • (low) packages/tech-detect/src/fingerprints/other.ts, supabase and base44: the suppression rule unlessAny: ["base44"] is order-independent (it runs after all detections), which is good. A Base44 app that also uses its own Supabase project is silently reported as Base44 only. Worth a sentence in the docs or a comment that this is a deliberate trade-off.
  • (low) other.ts, replit and base44: the url-path detector is also run against the HTML by the engine's fallback. That is fine here because the patterns are anchored with ^https?://, but nothing tests that a page body containing a literal https://x.replit.app/ is not matched. The <a href> test covers base44 only.
  • (nit) other.ts: icon: "lovable", "base44", "replit", "v0", "supabase", "clerk" and "firebase" — please confirm these icon ids resolve where icons are consumed, or that a missing icon degrades gracefully.
  • (nit) packages/tech-detect/tests/vibe-coding-fingerprints.test.ts: the timing assertions (< 2000 ms and < 1000 ms) can flake on loaded CI runners. AGENTS.md prefers asserting an effect over elapsed time. Consider scaling the input 4x and checking that it still returns, or loosening the bound.
  • (nit) Several lines in other.ts and the test file look longer than the oxfmt width. packages/* is not format-checked in CI, so this is optional.

Process: the CHANGELOG entry and docs update are present. Please confirm docs/cloud/technologies.mdx matches the real count (392) via a test or script, since fingerprints.test.ts only asserts > 300.

🤖 Generated with Claude Code

…fixture id, add look-alike host fixtures #1242

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

claude Bot commented Oct 29, 2026

Copy link
Copy Markdown

Review of #1243 (Lovable, Base44, Replit, v0, Supabase, Clerk, Firebase fingerprints). I read the diff and detect.ts; I did not run the tests.

No critical or high findings. The patterns are bounded, the comment stripping is linear, and the script/style body scan stops at the next script or style tag, so it stays linear on floods of unclosed tags. The blog-post false-positive test is a good guard.

  • (medium) detect.ts extractVersion: ignoreComments is not applied to version extraction. It scans input.html and input.scripts, so a commented-out clerk-js@N or firebasejs/N tag can set the version even when detection came from a live tag. It also means a commented-out <meta name="author" content="Lovable"> may still match, because meta detectors read the map built by extractMetaFromHtml from raw HTML. Please check that extractMetaFromHtml skips comments, or document the gap, and add a test for a commented-out meta tag.
  • (low) unlessAny: ["base44"] hides Supabase for any Base44 app, including one whose author also uses their own Supabase project (createClient inline or the CDN script). Consider suppressing only when the sole Supabase evidence is the shared storage URL.
  • (low) The script-url fallback is anchored with ^ only when input.scripts is provided. When it is not, the engine tests the whole HTML, which is why scriptSrc also adds an html detector. That works, but with scripts present each script is checked twice (the list and the HTML). A short comment saying this is intended would help.
  • (low) Replit, Supabase and Firebase come from docs and fixtures only, as the PR description says. Their precision on real pages is unverified. The replit.app host match uses url-path, which also falls back to scanning the HTML, so a page that merely embeds a *.replit.dev URL as https://x.replit.dev/ (outside a code sample) could match. Please confirm this is covered by a test.
  • (nit) The icon ids (lovable, base44, replit, v0, supabase, clerk, firebase) need matching assets wherever the icon is rendered. I did not verify that they exist.
  • (nit) The suppression pass in detectTechnologies filters all 392 fingerprints on each call. Precomputing the list of fingerprints that have unlessAny is cheap.

Per AGENTS.md, a docs/CHANGELOG-only check was not needed beyond what's present. Please run bun run docs:check and the tech-detect tests before merge.

🤖 Generated with Claude Code

@nc9
nc9 merged commit 2b764ca into main Oct 29, 2026
15 checks passed
@nc9
nc9 deleted the feat/tech-detect-baas branch October 29, 2026 00:37
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.

Technology detection: Lovable, Base44, Replit, v0, Supabase, Clerk and Firebase SDK fingerprints

2 participants