class

Flaw::SecretInLog

Inherits Flaw::Rule < Reference < Object

FLAW018 — Secret-named variable interpolated into a log or print call.

Constants

SAFE_SUFFIX = /\.(?:nil\?|size|length|empty\?|hash|digest|hexdigest|bytesize|to_s\.size)|\[\d+,\s*\d+\]|\[0\.\.\d+\]/

Presence/prefix/hash references are not leaks.

SECRET = /\#\{([^}]*\b(?:password|passwd|pwd|token|api[_-]?key|secret|authorization|session|cookie|bearer)\b[^}]*)\}/i
SINKS = /\b(Log\.(?:trace|debug|info|notice|warn|error|fatal)|puts|print|p|pp|STDOUT\.puts|STDERR\.puts)\b/

Instance methods

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