123 points · by WestCoastJustin · 13y ago · 87 comments
Rails gets a lot of scrutiny. Just because your ad hoc Flask app doesn't does not mean it would hold up a lot better. If you believe it will, think very hard about the reasons.
(This is not to say you shouldn't use something else either — just that the gut instinct of "Well, my app on this little microframework won't be getting security advisories every couple of weeks" is not necessarily something you want to follow. Like I said, think very hard about whether you really believe you can do justice to your app better than the Rails security team. And read up on some anecdotes from people who do application security while you're thinking about it, because I find people tend to underestimate just how broken most software is.)
It's not like this stuff is that hard in a lot of cases, it's often just "if I put a semicolon in the URL, how does it respond?" or "does this form have a CSRF token?".
That doesn't mean my software is secure. Unfortunately some bugs are far more subtle, including the recent Rails exploit. So on one hand I trust Rails even more, precisely because such problems are found and fixed. But on the other hand this does open you up to mass exploits, which does give me the shivers.
So it really depends on how much effort you're spending on your app. If you actively maintain your app then you can take notice of zero day exploits and upgrade ASAP. But if you want a worry-less app that you don't want to maintain, a more custom stack is more suitable.
Case in point, Wordpress is the most popular blogging platform in the world. It's also the most targetted and shitty weekend blog implementations are far less likely to get hacked.
But nowadays? Rails is actually quite mature and a lot of work has gone into its engineering. It has a security team and they take these things very seriously. You might not feel they're doing well enough, but accusing them (based on no evidence whatsoever) of being obsessed with "shiny" things is not the way to express that concern.
This is not to say that you can't use whatever you want, obviously. Just that you seem to be throwing around dated stereotypes in service of a language pissing match rather than critically analyzing the merits of the framework.
A lot of what I hear is "drop what you are doing and patch this right now!". But of course there are many reasons why this might not be possible. For example you might be on a 15 hour flight with no internet, you might be dealing with some family crisis, you might be in the middle of a coke and sex binge with identical twins who look like Scarlett Johansen or whatever.
Do you live glued to your smartphone in constant fear of 0 days? Do you make sure there is some third party available to deal with this stuff? do you design with the possibility of having your app/site owned as a likely event?
And how do you make your client/employer aware of the implications of stuff like this?
I'm curious about how people do security SLAs or whatever.
Moving off Rails is not a panacea
If the security of your platform depends on that platform not become a popular target of hacker attention then sometimes it really is as simple as "I don't need to outrun the bear; I just need to outrun you"
I honestly want to know. I can understand that Rails has this problems, and due to the way it originated (37 Signals apps) I can understand if security wasn't top priority. But now it does scare me a lot. I'm designing a product to be deployed at some large companies and every day I feel less and less secure about using Rails for that. It will be hard to explain to an executive in a top 500 company that I have to patch the damn system every week for a new problem.
That's no guarantee, and Rails gets a lot of scrutiny so it's difficult to tell to what degree if any it is less secure than other, less scrutinized frameworks, but these are all worth checking out.
http://guides.rubyonrails.org/security.html
Also, ask yourself: "when I have a security vulnerability, how easy is it to fix?" Fixing a Rails vulnerability and deploying the fix to production takes about 2 minutes.
It's not called patch Tuesday for nothing.
http://forums.asp.net/1233.aspx http://www.troyhunt.com/2012/04/67-of-aspnet-websites-have-s... etc
Besides, most web app vulnerabilities are coding flaws in the user code itself, and very rarely in the framework.
For years Microsoft was the butt of most security jokes. .Net dev jobs are #2 under Java in indeed.com.
Find me a well-used platform that hasn't had a massive security hole or a community that hasn't tended to write insecure code at some point.
For most contemporary Web development, "Java development" translates as "server-side Java programmer". Which isn't without its warts (trust me on this), but it's not the place that has seen a lot of heat, despite Oracle's best efforts to fuck everything up.
The recent situation with RoR has been vastly worse, and has been server-side.
As for that well-used platform and community with few security holes, I'd suggest you look up the OpenBSD folk, if you count an OS as a platform. They take a preemptively secure approach on all system code, to the point of rewriting major libraries. Yes, it's a bit less free-form than all the cool kids like to play these days, but damned if it's not a solid platform. And that "secure by default" mentality means they avoid much of the pain other OS developers (including Linux, which I much prefer to admin myself) encounter.
RoR and Ruby have, to my mind and experience, a cultural problem with regards to security. And they're becoming widely enough used that it's starting to show.
DHH latched on to Ruby via Rails and hyped it up and suddenly Rails became the cool kid on the block, but I don't really feel that's deserved from an engineering standpoint. Rails has always been a lot of sizzle and only a little steak, from ill-conceived and convoluted workflows dressed up as "awesome, because it's better than your PHP site!" and rigidity and inability to adapt to normal needs dressed up as "opinionated design".
DHH is the only notable programmer so thick that he actually asserts mathematical background is not helpful to development, and that you should take writing classes instead, and I think that tells a lot about his general practices and his uninformed attachment to Ruby, which has propagated across to others as 37signals got coverage in our communities and more posers jumped on the bandwagon.
Java applets are not necessary.
The reason why the US government said to uninstall Java is because it is the quickest and easiest way for the layman to remove the ability for Java applets to run. If Sun^H^H^HOracle provided a way to just install Java so it can be used for client side apps without turning on Java applets in the browser, then it is not any less unsafe than C++/C#/Obj-C apps running on the same system.
This was his reaction last time there were posts on HN about security vulnerabilities in Rails.
I shouldn't have to found out about these things on HackerNews.
Someone build this website for us RoR devs, pretty please? (ps. use PHP - heh)
https://groups.google.com/forum/#!forum/rubyonrails-security
you can view it in the browser but unlike with a vanilla website, you can also receive notifications via an email.
What, you think I'm joking? Think again: http://arstechnica.com/business/2012/03/hacker-commandeers-g...