How to Write an Application Code Review Finding

How to write an application security finding

An application security "finding" is how an application security team communicates information to a software development organization. Findings may be vulnerabilities, architectural problems, organization problems, failure to follow best practices or standards, or "good" practices that deserve recognition.

Choose a great title
When writing an application security finding, you should choose a title that captures the issue clearly, succinctly, and convincingly for the intended audience. In general, it's best to phrase the title in a positive way, such as "Add access control to business logic" or "Encode output to prevent Cross-site Scripting (XSS).

Identify the location of the vulnerability
The finding should be as specific as possible about the location in both the code and as a URL. If the finding represents a pervasive problem, then the location should provide many examples of actual instances of the problem.

Detail the vulnerability
The finding should provide enough detail about the problem that anyone can:
 * understand the vulnerability
 * understand possible attack scenarios
 * know the key factors driving likelihood and impact

Discuss the risk
There is value in both assigning a qualitative value to each finding and further discussing why this value was assigned. Some possible risk ratings are:
 * Critical
 * High
 * Moderate
 * Low

Justifying the assigned risk ratings is very important. This will allow stakeholders (especially non-technical ones) to gain more of an understanding of the issue at hand. Two key points to identify are:
 * Likelihood (ease of discovery and execution)
 * Business/Technical impact

You should have a standard methodology for rating risks in your organization. The OWASP Risk Rating Methodology is a comprehensive method that you can tailor for your organization's priorities.

Suggest remediations

 * alternatives
 * include effort required
 * discuss residual risk

Include references

 * Important note: if you use OWASP materials for any reason, you must follow the terms of our license

Use a positive tone
Personally, I find all of these lists (the SANS Top 20, the old Top 10, the old Guide, etc) very negative - which is the way they were  designed. Even the chapter headings in the new book from Howard and LeBlanc are negative.

A few years ago, that's how I thought, too. However, I've moved on. Sure we need to tell people, don't do X when it is necessary, but I think human nature works better when ideas are framed in a positive way. Certainly with business types who don't (yet) understand risk properly. Read this:

http://www.asktog.com/columns/047HowToWriteAReport.html

I write many reports which occasionally detail pretty bad news for the recipients. Typically, they are not technical people (nor necessarily should they be - well-written reports should be understandable by lay people). Tog's essay was an eye opener for me and I wish I'd read it sooner. With my more positive approach, I'm getting greater traction and things are getting fixed. Before, they'd often go "it's all too hard, we accept this risk, next!"

I strongly believe we are here to enable secure business, not get in the way. Too many security folks* forget that we exist to make sure that ordinary folks don't lose money, don't see their details lost to identity thieves, and don't lose privacy. "Thou Shalt Not ..." lists don't really work in this "enable secure business" ideology.

That's why the Guide has moved from negative titles to positive or neutral titles. I've tried as hard as I can do phrase the issue in terms of "This is the business reason why we check for this issue.

Check X. Do Y", rather than say "Faulty authorization. Don't do X. It's bad. M'kay?". Only a few times I resorted to "don't do X" when it was truly unavoidable and that's a few times too many. Hopefully, by Guide 2.1 I can make it even more positive.