• Saturday, June 22, 2024
businessday logo

BusinessDay

Zap ‘em: how to detect bugs before your user, or hackers do

businessday-icon

Just as there are two certainties in life – death and taxes – there seem to be two certainties in enterprise application development: coding and pain. The question left up to developers is when exactly do you want to experience that pain? During the build, when you’re testing to the point of exhaustion to make sure your software is fully, completely secure? Or after the application has launched and users start noticing bugs, or hackers start banging away to find a security flaw?

If you’ve got a rebellious streak in you, you’ve probably already facetiously answered that you would rather not experience pain at all. Well guess what? That’s an option too.

More security, not more work

This isn’t your first enterprise application rodeo. You know software security has to be a priority in order to protect user data and avoid the common pitfalls associated with cloud applications. It’s also essential for avoiding the (deservedly) loud and angry fallout that follows a data breach.

Building enterprise software that is both secure and bug-free isn’t easy, however. If it were, literally every developer would do so. Ensuring you have a secure software development lifecycle can be a time-consuming process, and when you’re up against a deadline and push comes to shove, more often than not it’s going to be that exhaustive testing that gets nudged aside. The key then is finding a way to automate the code analysis process, increasing software security without increasing your workload.

Your new best friend

Static code analysis tools can’t get you a coffee or rub your shoulders so they’re not quite infomercial-level amazing, but if you’re a developer who’s serious about the security of your builds, you’ll probably catch yourself whispering a thank you to your new static code analysis pal at some point.

Even if you’ve been in the development game for a while you might not realize these tools even exist. Static code analysis tools run in the background while the application is being developed. They run silently and analyze code as you type it into the development compiler or code environment. Any problem code is flagged in real-time, giving you the opportunity to fix it before it 1) becomes an issue you need to hunt down at the end of your build, or 2) makes it out into the wilds of the internet and becomes an exploitable vulnerability.

With a static code analysis tool, as the developer you’ll no longer need to compile and run manual tests. Human testing is still going to be necessary for your friends in quality assurance, but static code analysis will catch all of those obscure bugs that can go undetected by even the most fastidious tester.

Not all static code analysis is created equal

There are dozens of these tools on the market so you’ll need to ensure you’re investing in a good one. You can do so the short way or the long way. If the short way sounds like it’s your jam, simply skim this list from Checkmarx and select a quality open-source tool. If you’ve read this far already and you’re buckled in for the long way, the things you need to consider when selecting a static code analysis tool are discussed below.

The first thing to consider is the language you want to use, so you need a tool that makes your development language environment. In addition to working with the right language, make sure the tool integrates with your IDE. For instance, most Java developers use Eclipse, so ensure your tool can work well in that environment.

The next step is to determine the list of security flaws your tool needs to be able to identify. Some tools are better at finding certain bugs and security flaws than others. You should review the tool specifications and determine if it’s best for the type of security flaws you most need to find. One tool might be better at finding SQLi flaws while another could be better for finding buffer overflow vulnerabilities that can lead to OS command injection, so basically your worst software security-related nightmares should be what your tool is excellent at identifying.

One other thing you’ll want to watch out for is a tool that tends to kick up false positives. Trying to fix a problem when there actually is a problem is annoying enough, you don’t need to put your head through the drywall over a vulnerability or coding flaw that doesn’t actually exist. Pay attention to false positive concerns if you’re checking out reviews on potential tools.

A developer’s safety net

Look, nobody’s perfect. Getting a great static code analysis tool on your side is an easy way to ensure your careful coding is going to give you the results you’re intending. These tools take much of the overhead of bug and vulnerability detection out of your hands and turns it into a blissfully automated process that eliminates the pain of exhaustive manual testing as well as the pain that can occur when you realize a vulnerability in your product has, well, made the news.