This post discusses common anti-patterns in Elixir projects, such as mass assignment vulnerability, using Ecto schemas in migrations, dynamic atom creation, SQL injection, and rendering untrusted user input. It provides solutions and recommendations to avoid these pitfalls and highlights the importance of using the Sobelow library for security checks.

11m read timeFrom curiosum.com
Post cover image
Table of contents
Table of contentsMass assignment vulnerability through the Ecto changesetUsing Ecto schemas in database migrationsDynamic atom creationDirectly interpolating user input into the query string (SQL injection)Rendering data from untrusted user input in web page (XSS attack)Small Elixir code pitfalls you should be aware ofSobelow library will fix most of the issuesFAQ

Sort: