Skip to content

Security: add rel=noopener noreferrer to social links#761

Open
praaatap wants to merge 1 commit intoprecice:masterfrom
praaatap:fix/social-links-noopener
Open

Security: add rel=noopener noreferrer to social links#761
praaatap wants to merge 1 commit intoprecice:masterfrom
praaatap:fix/social-links-noopener

Conversation

@praaatap
Copy link
Contributor

Closes #760

What

Adds rel="noopener noreferrer" to 5 external social media links in the top navigation.

Why

Using target="_blank" without rel="noopener noreferrer" is a known security vulnerability (Reverse Tabnabbing). It allows the newly opened tab to potentially manipulate the window.opener object of the original page. Additionally, noopener yields a minor performance benefit because the new page runs in a dedicated renderer process.

How

  • Added rel="noopener noreferrer" to Discourse, GitHub, LinkedIn, and YouTube layout links in _includes/topnav.html.
  • Appended noopener noreferrer to the existing rel="me" on the Mastodon link.

@praaatap praaatap force-pushed the fix/social-links-noopener branch from 959b621 to acdcfbe Compare February 23, 2026 08:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds missing security link relationship attributes to external social links in the top navigation to mitigate reverse tabnabbing when using target="_blank".

Changes:

  • Added rel="noopener noreferrer" to Discourse, GitHub, LinkedIn, and YouTube top-nav links.
  • Extended the Mastodon link rel to include noopener noreferrer alongside me for verification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</li>
<li>
<a class="no-icon nav-external" href="https://www.youtube.com/c/preCICECoupling/" target="_blank" data-show-count="false" aria-label="Subscribe on Youtube"><i class="fab fa-youtube"></i></a>
<a class="no-icon nav-external" href="https://www.youtube.com/c/preCICECoupling/" target="_blank" rel="noopener noreferrer" data-show-count="false" aria-label="Subscribe on Youtube"><i class="fab fa-youtube"></i></a>
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

In the aria-label, the brand name should be capitalized as "YouTube" (currently "Youtube").

Copilot uses AI. Check for mistakes.
@MakisH MakisH added GSoC Contributed in the context of the Google Summer of Code technical Technical issues on the website labels Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Contributed in the context of the Google Summer of Code technical Technical issues on the website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: External social links missing rel="noopener noreferrer" Body:

3 participants