I'm incredibly careful with all my projects when it comes to security or avoiding bugs in general. It's only been after a decade or so working in my field that I took on projects where I had to write authorization/authentication code, or where I had to harden and manage a server.
Every single time that I took on work as a contractor for "Serious" BigCo, I was shocked by how much worse they were handling all of it. Literally no exception. For some of the chaotic startups I worked for, I wasn't too surprised, but this was the norm everywhere.
For example, as a contractor I'd be able to take entire continents' high-traffic websites offline for a particular media company, probably costing them a noticeable amount of money. Not only could I do this, but I could still do so more than a year after I had left the company.
I suppose having the resources to open up a can of lawyers makes a big difference though. So I'm still very careful personally.