Security: add rel=noopener noreferrer to social links#761
Open
praaatap wants to merge 1 commit intoprecice:masterfrom
Open
Security: add rel=noopener noreferrer to social links#761praaatap wants to merge 1 commit intoprecice:masterfrom
praaatap wants to merge 1 commit intoprecice:masterfrom
Conversation
959b621 to
acdcfbe
Compare
acdcfbe to
404019d
Compare
There was a problem hiding this comment.
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
relto includenoopener noreferreralongsidemefor 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> |
There was a problem hiding this comment.
In the aria-label, the brand name should be capitalized as "YouTube" (currently "Youtube").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #760
What
Adds
rel="noopener noreferrer"to 5 external social media links in the top navigation.Why
Using
target="_blank"withoutrel="noopener noreferrer"is a known security vulnerability (Reverse Tabnabbing). It allows the newly opened tab to potentially manipulate thewindow.openerobject of the original page. Additionally,noopeneryields a minor performance benefit because the new page runs in a dedicated renderer process.How
rel="noopener noreferrer"to Discourse, GitHub, LinkedIn, and YouTube layout links in _includes/topnav.html.noopener noreferrerto the existingrel="me"on the Mastodon link.