Hub rules-elixir

rules-elixir

v5 public Verified

Elixir

Elixir is a functional language for building scalable applications on the Erlang VM (BEAM). These rules govern high-concurrency, fault-tolerant systems development using OTP and Phoenix.

@sigmashakeinc 4 pulls 8 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-elixir →
Severity
7 error 0 warn 1 info
demo.cast
Elixir is a functional language for building scalable applications on the Erlang VM (BEAM). These rules govern high-concurrency, fault-tolerant systems development using OTP and Phoenix.

Rules index

8 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

elixir

no-code-eval-elixir error block

Code.eval_string() and Code.eval_file() execute arbitrary Elixir code at runtime — a critical RCE vector. Redesign to use pattern matching, function dispatch maps, or macros at compile time.

Rule source requires an active Pro or Enterprise subscription.
no-hardcoded-secrets-elixir error log

Hardcoded secrets in Elixir source or config files are committed to version control. Use runtime configuration with System.get_env()/1 or a secrets manager via Config.Provider.

Rule source requires an active Pro or Enterprise subscription.
no-open-redirect-phoenix error block

RISK: Redirecting to a URL taken directly from conn.params enables open redirect (CWE-601) — an attacker can craft a link that appears to be your domain but redirects users to a phishing site. FIX: Validate the destination against an allowlist of safe paths, or use Routes helpers that only generate internal paths.

Rule source requires an active Pro or Enterprise subscription.
no-sql-fragment-ecto error block

String concatenation in Ecto fragments or raw SQL enables SQL injection. Use Ecto's parameterized fragment/2 with ^ for interpolation: fragment('col = ?', ^user_value)

Rule source requires an active Pro or Enterprise subscription.
no-string-to-atom-user-input error block

String.to_atom() with user input can exhaust the atom table (atoms are never garbage collected in Erlang/BEAM), causing a node crash. Use String.to_existing_atom/1 or work with string keys.

Rule source requires an active Pro or Enterprise subscription.
no-system-cmd-injection error log

String concatenation with <> in System.cmd arguments enables command injection. Build arguments as separate list elements — never join user input into a command string.

Rule source requires an active Pro or Enterprise subscription.
no-unsafe-deserialization-elixir error block

:erlang.binary_to_term/1 deserializes arbitrary Erlang terms and can execute arbitrary code if given malicious input. Use :erlang.binary_to_term(bin, [:safe]) to restrict to safe terms only.

Rule source requires an active Pro or Enterprise subscription.
no-user-data-in-logger info log

Logging conn.params or raw user input may persist PII (passwords, tokens, personal data) in log files and log aggregators, violating GDPR/CCPA and creating a secret exposure risk. FIX: Log only sanitized, non-sensitive fields; use Logger.metadata for structured, filterable context.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v5
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
6bed68620011b2f2aaffff77b4f307bef95254b7919bf8ac34cc82aa6ada9f8f
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-elixir/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-elixir. The published version only bumps when a maintainer resyncs.

No commit history available.