Uploaded image for project: 'SonarHTML'
  1. SonarHTML
  2. SONARHTML-127

Rule S5148: update rule type to Security Hotspot and accept using "noopener" without "noreferrer"

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3
    • Component/s: Rules
    • Labels:
      None

      Description

      The rule type changed to Security Hotspot.

      Implementation should be adjusted to not raise when rel="noopener" is set but noreferrer is missing:

      <a href="http://dangerouswebsite.com" target="_blank">     <!-- Noncompliant; Make sure not using rel="noopener" is safe here. -->
      <a href="https://dangerouswebsite.com" target="_blank">     <!-- Noncompliant; Make sure not using rel="noopener" is safe here. -->
      
      <a href="http://dangerouswebsite.com" target="_blank" rel="noopener noreferrer"> <!-- Compliant -->
      <a href="http://dangerouswebsite.com" target="_blank" rel="noopener">   <!-- Compliant -->
      
      <a href="{{variable}}" target="_blank"> <!-- Noncompliant; Make sure not using rel="noopener" is safe here.  -->
      <a href="{{variable}}" target="_blank" rel="noreferrer"> <!-- Noncompliant; Make sure not using rel="noopener" is safe here.  -->
      <a href="{{variable}}" target="_blank" rel="noopener"> <!-- Compliant  -->
      
      <a href="internal.html" target="_blank" > <!-- Compliant -->
      <a href="http://[dynamic]" target="_blank" > <!-- Compliant -->
      
      <a target="_parent"></a> <!-- Compliant -->
      <a target="_blank"></a> <!-- Compliant -->
      <a target="_blank" href=""></a> <!-- Compliant -->
      <a ></a> <!-- Compliant -->
      

      Issue message changes to:
      Make sure not using rel="noopener" is safe here.

      Severity changed from from Critical to Minor

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              margarita.nedzelska Margarita Nedzelska
              Reporter:
              alexandre.gigleux Alexandre Gigleux
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: