Skip to content
vetkitChecksChangelogDocumentation

vetkit.ruby.auth.http-basic-literal-password

http_basic_authenticate_with uses a hard-coded password literal. Anyone with source access knows it and it cannot be rotated without a deploy.

Last updated:

Suite: Security

ruby

http_basic_authenticate_with uses a hard-coded password literal. Anyone with source access knows it and it cannot be rotated without a deploy.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Read the credentials from Rails credentials or ENV and compare them with ActiveSupport::SecurityUtils.secure_compare.

References

Source: packages/engine/rules/sast/ruby.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.