Skip to content

Fix twitter:site links and add opt-in Xquik verification - #337

Closed
kriptoburak wants to merge 1 commit into
lissy93:masterfrom
kriptoburak:codex/xquik-x-profile
Closed

Fix twitter:site links and add opt-in Xquik verification#337
kriptoburak wants to merge 1 commit into
lissy93:masterfrom
kriptoburak:codex/xquik-x-profile

Conversation

@kriptoburak

Copy link
Copy Markdown

What changed

  • Normalize twitter:site handles before building X profile links.
  • Add an explicit Xquik verification action to the Social Tags result.
  • Validate the profile URL, returned username, and exposed response fields.
  • Keep the API key server-side and document the optional configuration.
  • Add focused tests and document the endpoint in the OpenAPI specification.

Reproduction

The repository OpenAPI example uses @duckduckgo for twitter:site. The current UI inserts that value unchanged and creates https://x.com/@duckduckgo, which returns an error. The canonical https://x.com/duckduckgo profile loads correctly.

The updated card links the normalized handle. A user can then choose to run one metered Xquik lookup. No lookup runs during an automatic website scan. The server accepts only an exact x.com or twitter.com profile URL, requires the returned username to match, and exposes only bounded public profile fields.

Validation

  • node --test test/*.test.js
  • ESLint
  • Prettier check
  • Astro check
  • Astro production build
  • OpenAPI YAML parse
  • Local server smoke test without XQUIK_API_KEY

@netlify

netlify Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for web-check ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bff4be6
🔍 Latest deploy log https://app.netlify.com/projects/web-check/deploys/6a8ca37c7d9bf100082ea7b4
😎 Deploy Preview https://deploy-preview-337--web-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@lissy93

lissy93 commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Hey @kriptoburak,

I'll take a proper look later on. But just from the description, do you think this could be done without the Xquik service instead?

I don't want to incorporate any non-free services, especially if not self-hostable. Also the xquik service seems potentially concerning. Scraping is never good, nor reliable. I'd be concerned about violating the Twitter terms of service too. And given the service is brand new, and doesn't appear very reputable, I don't really want to maintain a whole bunch of code around something which might need to then be ripped out soon.

@kriptoburak

Copy link
Copy Markdown
Author

Thanks for the direct feedback. Your free, self-hostable dependency requirement is incompatible with this integration. I’m closing it instead of asking you to maintain an external service you don’t want.

Comment thread api/_common/x-profile.js
};

export const lookupXProfile = async ({ targetUrl, apiKey, get }) => {
if (!apiKey) return { skipped: 'Xquik profile lookup requires XQUIK_API_KEY to be set' };

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

We got requireEnv(...) to cover this, re-use from api/_common/upstream.js instead of re-implementing.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

no, we got a really neat job/registry system which all other (client api) checks go through (see src/client/jobs/registry.ts). which handles the threads, signals, parsing, error handling, formatting, etc.

Using a raw fetch without any abort signal will mess up a lot of things.

'threats',
'tls-labs',
'whois',
'x-profile',

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

this won't work, since you're not using the job system.

Comment thread .github/README.md
| `GOOGLE_CLOUD_API_KEY` | A Google API key with the PageSpeed Insights API enabled ([get here](https://developers.google.com/speed/docs/insights/v5/get-started)). This can be used to return quality metrics for a site |
| `REACT_APP_SHODAN_API_KEY` | A Shodan API key ([get here](https://account.shodan.io/)). This will show associated host names for a given domain |
| `REACT_APP_WHO_API_KEY` | A WhoAPI key ([get here](https://whoapi.com/)). This will show more comprehensive WhoIs records than the default job |
| `XQUIK_API_KEY` | An Xquik API key ([get here](https://xquik.com)). This verifies a site's declared X profile after the user confirms the exact handle |

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

like my first comment, this xquick service is the main thing I'm concerned about. We'd probably need to find an alternative way or different (free / open source) service.

This one seems very sketchy. Chances are it'll be dead by end of the year.

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