Flaw::CommentedAuth
Inherits Flaw::Rule < Reference < Object
FLAW105 โ AI-slop. Commented-out authorization/authentication check. Very common Claude/Copilot pattern: "make the test pass" โ comment out the guard โ ship.
Constants
PATTERN = /^\s*#\s*(?:before_action\s+:?authenticate|authenticate!|require_admin|require_login|authorize!|check_permission|current_user\s*\|\|\s*return|halt\s*401|halt\s*403|raise\s+Unauthorized)/
commented lines that mention known auth guards
Instance methods
default_severity
Sourcedescription
Sourceid
Sourcetag
Category for grouping in flaw rules output and the README catalog.
Override in rule subclasses. Default: "security".
title
Source