class

Flaw::HardcodedSecret

Inherits Flaw::Rule < Reference < Object

Constants

NAMED_ASSIGN = /\b(api[_-]?key|secret|token|password|passwd|pwd|auth)\s*=\s*"([^"]{16,})"/i
PATTERNS = {"AWS access key" => /\bAKIA[0-9A-Z]{16}\b/, "GitHub token" => /\bghp_[A-Za-z0-9]{36,}\b/, "GitHub fine-grained token" => /\bgithub_pat_[A-Za-z0-9_]{22,}\b/, "Slack token" => /\bxox[abpsr]-[A-Za-z0-9-]{10,}\b/, "Google API key" => /\bAIza[0-9A-Za-z\-_]{35}\b/, "Private key" => /-----BEGIN (RSA |EC |OPENSSH |DSA |PGP )?PRIVATE KEY-----/, "Stripe live key" => /\bsk_live_[0-9a-zA-Z]{24,}\b/}

Instance methods

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