Skip to content

Fix MDX lint URL false positives in prose#79

Merged
gontzess merged 1 commit into
mainfrom
gontzess/fix-mdx-lint-text-url
May 18, 2026
Merged

Fix MDX lint URL false positives in prose#79
gontzess merged 1 commit into
mainfrom
gontzess/fix-mdx-lint-text-url

Conversation

@gontzess
Copy link
Copy Markdown
Contributor

Why

Connector docs can contain ordinary prose such as “To sync (read) data:”. The MDX validator was scanning all text nodes for dangerous URL schemes, so that prose failed as if it were an actual data URL. Connector repos should not need wording-only PRs to work around that false positive.

What this changes

Narrows dangerous URL checks to URL-bearing markdown nodes and JSX attributes. Plain text is no longer scanned as a URL, while links, images, definitions, href/src/action attributes, and encoded dangerous URL schemes remain blocked.

Adds a regression test for the Sentry-style Step content that triggered the failure.

Validation

  • npm test --prefix tools/mdx-lint
  • patched validator accepts the current baton-sentry docs/connector.mdx
  • patched validator still rejects an explicit data: markdown link
  • git diff --check

Rollout

After merge, publish the updated reusable workflow ref used by connector repos. They currently call ConductorOne/github-workflows at v4, so v4 must point at this fix before baton-sentry main stops using the old validator.

@gontzess gontzess merged commit 5c02f9e into main May 18, 2026
2 checks passed
@gontzess gontzess deleted the gontzess/fix-mdx-lint-text-url branch May 18, 2026 17:36
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