# Security in the Elm eco system

**URL:** <https://discourse.elm-lang.org/t/security-in-the-elm-eco-system/2512>\
**Category:** Learn\
**Created:** [November 14, 2018, 7:52am UTC](https://discourse.elm-lang.org/t/security-in-the-elm-eco-system/2512 "2018-11-14T07:52:35Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Libbum](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/libbum/32/1311_2.png) [@Libbum](https://discourse.elm-lang.org/u/Libbum)\
**Post date:** [November 14, 2018, 12:25pm UTC](https://discourse.elm-lang.org/t/security-in-the-elm-eco-system/2512/6 "2018-11-14T12:25:10Z")

</div>

Cross site scripting (XSS) in general is a vector to look out for in Elm (to extend on @gampleman’s post). A lot of the [known XSS attacks](https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet) can be mitigated or removed with keeping your browser up to date and applying a hardened [content security policy](https://content-security-policy.com/) (CSP) on the server side.

Some of the directions I can see in the Elm community are moving away from easy adoption of good CSPs for the sake of development ease. Whilst this is most likely not a conscious decision it is something we should keep an eye on moving forward.

My purpose in saying this is not intended to call out anyone or any particular project, but a good general example of this that I’ve seen across multiple packages is the use of embedding inline style sheets and or inline styles directly into divs etc. Just allowing this type of thing in your CSP drops your [Mozilla’s Observatory](https://observatory.mozilla.org) score by 10 points.

---

_[View the full topic](https://discourse.elm-lang.org/t/security-in-the-elm-eco-system/2512)._
