3 ms·
When I think of other developers like me that are building projects solo on top of Express/Sinatra/Compojure, the most helpful resource would be a simple check
by danneu 13y ago
When I think of other developers like me that are building projects solo on top of Express/Sinatra/Compojure, the most helpful resource would be a simple checklist.
For example, the CSRF section could briefly explain what cross-site request forgery is, `<img src="http://example.com/logout">` http://example.com/logout">`, and recommend some approaches and good practices.
Code examples could be provided for various languages/frameworks each in its own tab. The Clojure tab could demonstrate https://github.com/weavejester/ring-anti-forgery https://github.com/weavejester/ring-anti-forgery and a `anti-forgery-form-to` macro that wraps `hiccup.form/form-to` and inserts `(ring.util.anti-forgery/anti-forgery-field)` into the form.
The XSS section could remind us to ensure that our templates are escaping user input. The Clojure tab could chart the safe vs unsafe templating libs. (Hiccup is unsafe)
The Sessions section could remind us to sign our cookies so that someone can't just change a cookie from {:user-id 42} to {:user-id 1}. And that our never-expiring authentication cookie means that anyone with that cookie can log in as that user forever. It could explain an overview of the main solutions and their drawbacks like how to back sessions by a database or set an expiration within the signed cookie.
Just like convos about crypto, discussions about security too frequently turn into some abstinence-only pamphlet.
- stcredzero 13y agoJust like convos about crypto, discussions about security too frequently turn into some abstinence-only pamphlet. As opposed to a "Purity Test" as a checklist?
- deleted 13y ago[deleted]