Skip to content

Fix/missing noopener noreferrer - #2466

Open
kunalverma2512 wants to merge 3 commits into
json-schema-org:mainfrom
kunalverma2512:fix/missing-noopener-noreferrer
Open

Fix/missing noopener noreferrer#2466
kunalverma2512 wants to merge 3 commits into
json-schema-org:mainfrom
kunalverma2512:fix/missing-noopener-noreferrer

Conversation

@kunalverma2512

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bugfix (Code Quality / Defense-in-depth)

Issue Number:

Screenshots/videos:

N/A (No visual UI changes, structural HTML fix only)

If relevant, did you update the documentation?

N/A

Summary

This PR adds the missing rel="noopener noreferrer" attribute to 14 target="_blank" external links across the repository.

While modern browsers automatically apply noopener protections by default, explicitly including these attributes remains an industry standard defense-in-depth practice. Relying entirely on browser defaults leaves users on legacy browsers vulnerable to reverse tabnabbing, and failing to explicitly set noreferrer means we still leak referrer data to external sites. Adding these ensures our automated code quality and security scans remain completely clean.

These 14 instances slipped through the tooling for two specific reasons:

  1. In pages/understanding-json-schema/keywords/index.page.tsx, a Next.js <Link> component was missing it. The ESLint config (plugin:react/recommended) only checks standard HTML <a> tags by default, so it silently bypassed this custom component.
  2. In the applicability-json-schema-fundamentals-part-1.md blog post and the README.md, raw HTML <a> tags were used instead of standard markdown syntax. This bypassed the repository's StyledMarkdownBlock component (which normally injects the rel attributes automatically for markdown links).

Does this PR introduce a breaking change?

No

Checklist

Please ensure the following tasks are completed before submitting this pull request.

… from type reference

Removes a block of text in type.md that was marked with an HTML TODO comment instructing its removal. The text was meant to be moved to the overview of the reference docs, which was already done (via Card components on the index page), but this original text was never deleted. This also resolves an issue where the 'Schema composition' link within this leftover block pointed to the wrong page.
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview c84d78e

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8d315ba) to head (c84d78e).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2466   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        31           
  Lines          695       695           
  Branches       215       215           
=========================================
  Hits           695       695           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


Understanding these basic data types gives you a strong foundation for building more complex JSON Schemas.

<!--Remove the text below from this document and add it to the overview of the reference docs-->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @kunalverma2512
These changes are not related to the original issue, so they should not be included in this PR.

CC: @vtushar06 please make sure to check for unrelated changes like this during the review as well.
Thanks 🚀

@github-project-automation github-project-automation Bot moved this from Ready to review to Changes requested in PR - Triage Group Aug 30, 2026
@kunalverma2512

Copy link
Copy Markdown
Contributor Author

Hi @Utkarsh-123github , thanks for catching that! I was doing some earlier work in this PR #2463 to remove orphaned text and those changes accidentally slipped into this branch by mistake. I have restored the text and pushed the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Changes requested

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: missing rel="noopener noreferrer" on external links

3 participants