class

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

check(source : String, path : String) : Array(Finding)
Source
default_severity
Source
description
Source
tag

Category for grouping in flaw rules output and the README catalog. Override in rule subclasses. Default: "security".

Source
title
Source