AshCredo.Check.Warning.SensitiveAttributeExposed (ash_credo v0.5.2)

Copy Markdown View Source

Basics

This check is disabled by default.

Learn how to enable it via .credo.exs.

This check has a base priority of high and works with any version of Elixir.

Explanation

Attributes containing sensitive data should be marked with sensitive?: true. This prevents them from being leaked in logs, error messages, and inspections.

attribute :password_hash, :string, sensitive?: true

Check-Specific Parameters

Use the following parameters to configure this check:

:sensitive_names

Attribute names considered sensitive.

This parameter defaults to [:password, :hashed_password, :password_hash, :token, :secret, :api_key, :private_key, :ssn].

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.