Skip to main content
Checks external target=_blank links for noopener (security) and noreferrer (privacy)
Rule IDsecurity/new-tab
CategorySecurity
ScopePer-page
Severitywarning
Weight4/10

Solution

External links with target=“_blank” should include rel=“noopener noreferrer”. noopener prevents the opened page from accessing window.opener (tab-nabbing attacks). noreferrer prevents leaking the referrer URL to the destination site (privacy). Modern browsers default noopener for target=“_blank”, but explicit attributes ensure compatibility.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["security/new-tab"]

Disable all Security rules

squirrel.toml
[rules]
disable = ["security/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["security/new-tab"]
disable = ["*"]