class

Flaw::SwallowedRescue

Inherits Flaw::Rule < Reference < Object

FLAW104 — AI-slop / broad swallow-rescue. rescue; end, rescue ex; nil, rescue Exception — the "make it green" anti-pattern that hides real errors (including security-relevant ones like TLS verification failure).

Constants

PATTERNS = [/\brescue\s*\n\s*end\b/, /\brescue\s*;\s*end\b/, /\brescue\s+(?:Exception|Object)\b/, /\brescue\s+\w+\s*$\s*nil\s*$\s*end\b/m]

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