[Owasp-leaders] Owasp Source Code Flaws Top 10 Project

Matt Tesauro mtesauro at gmail.com
Mon Dec 15 16:59:37 EST 2008

I actually think both points have validity.  I've inherited spaghetti
code with no documentation, as many have, and had to make less then
certain assumptions as to what the code's intent was.  You can't safely
assume that working code == intent of code.  That's where requirements
come in.

However, the documentation lying is also a great point. Recently, I went
through a preliminary and critical design review, approved the design
from the security perspective and the developers were given the word "Go".

Turns out when they got started coding, they decided the design didn't
work for them and they started down a _completely_ different path.  Now
we have working code + thorough documentation for some mystical code
which has yet to be written.  Great way to introduce risk.

While I'm not sure how a static analysis tool can look at documentation
which isn't in the source, a human sure could so I think there is merit
here.  Perhaps the real issue is: "Does the documentation match the
running code" Whether those docs are comments in the code or .PDFs in a
document repository somewhere, the issue still holds.

-- Matt Tesauro
OWASP Live CD 2008 Project Lead
http://mtesauro.com/livecd/ - Documentation Wiki

Daniel Cuthbert wrote:
> I disagree slightly.
> The problem I've noticed on the banking side is that you often have
> multiple development teams over the lifespan of a project. This could be
> due to a number of factors, but one thing that is given is that the same
> developer which started the project often isn't around 3 months later.
> I've noticed a massive amount of vulnerabilities due to the developers
> not knowing what was going on, which is also due to badly written code,
> but also the lack of any documentation or guidance. 
> Now your comment about unit tests and integration tests is valid and one
> that should be included.
> Documentation and correctly written code are both equally important. 
> On 15 Dec 2008, at 5:24 PM, Erlend Oftedal wrote:
>> Hi Paolo
>> This is an interesting project, which I hope will be successful.
>> I have some comments:
>> “C3 – Missing input validation” – I would call this “Missing input
>> validation and output encoding”. It’s not always possible to filter
>> out dangerous characters from the input. Consider the name O’Brian. It
>> contains a quote (‘) which might be considered dangerous
>> (SQL-injection) and filtered out. However it’s actually a part of the
>> name, and we should thus store it. So the correct way to handle this
>> character would be to encode it when sending the data to the
>> SQL-server. Best practices here would be to use parameterized queries
>> or in the case of missing language support, escape it yourself.
>> However this is not a part of input validation. It’s something
>> developers should do where they create the SQL-statement.
>> The same logic can be used for XSS.
>> Please not that I’m not saying input validation is useless. I just
>> think both are necessary.
>>  “C9 - Documentation weakness” – I don’t think that documentation is
>> the issue here. In my opinion, writing maintainable code is not about
>> documenting your code, but about writing code that others can read. If
>> you look to coding gurus like Robert C. Martin (author of books such
>> as “Clean Code”), he says "Obviously, there are times when you must
>> write a comment but I want those times to be few and far between and
>> if I find myself writing a comment because I've got no other option, I
>> kick myself. It's a failure of my ability to express myself well in code."
>> The idea  is to use short methods (easy to get an overview), good
>> method and variable naming, and good object oriented design (using
>> design principles like the Single-Responsibility-Principle) to reduce
>> the complexity of the code.
>> Documentation and comments has a tendency to lie, because when
>> developers are short on time (which they often are because of
>> management or customer pressure), they tend to fix the code without
>> updating the comments. In this case the documentation will lie, which
>> is a lot worse than no documentation at all. However the code does not
>> lie. The best documentation you can have, is in the form of unit tests
>> and integration tests, because the documentation/specification is then
>> executable. So my suggestion for C9 would be: “C9 – Readability” or
>> “C9 – Unreadable code”.
>> While on the subject of testing, “CX – Untested code” could be another
>> item in you list.
>> Best regards
>> Erlend Oftedal
>> OWASP Norway
>> *Fra:* owasp-leaders-bounces at lists.owasp.org
>> <mailto:owasp-leaders-bounces at lists.owasp.org> [mailto:owasp-leaders-bounces at lists.owasp.org] *På
>> vegne av* Paolo Perego
>> *Sendt:* 15. desember 2008 15:11
>> *Til:* Owasp leaders
>> *Emne:* [Owasp-leaders] Owasp Source Code Flaws Top 10 Project
>> Hello leaders, I'm really happy to announce a new documentation
>> project I started today. Our Top 10 most critical web app
>> vulnerabilities is the standard de facto when trying to summarize
>> findings when you assess a web application. And it is great.
>> Looking at source code assessment (or code review, or static analysis,
>> or whatever the name you want to use :-)), nothing like this exists.
>> Gary McGraw introduced the 7 kingdoms as taxonomy. I started looking
>> at this great job extending it to meet Owasp Top 10 like template.
>> I also used categories that I found useful to gather security code
>> review findings in.
>> That's why I started this Top 10 project. The goal is to provide
>> something useful in Owasp Code Review Guide while trying to organize
>> security issues and the second goal is to use it as Owasp Orizon
>> default library cookbooks in order to have a "fil rouge" from Code
>> review guide and the implementing tool. The Source code flaws Top 10
>> will be that fil rouge.
>> I really hope that everyone interested will subscribe to mailing list
>> and give some contributions to this document I'd like to release as
>> beta quality project in the next AppSec Europe 2009 in Cracow.
>> Link: http://www.owasp.org/index.php/Category:OWASP_Source_Code_Flaws_Top_10_Project
>> Roadmap: http://www.owasp.org/index.php/Category:OWASP_Source_Code_Flaws_Top_10_Project_Roadmap
>> Mailinglist subscription
>> page: https://lists.owasp.org/mailman/listinfo/owasp-source-code-flaws-top-10
>> Regards
>> thesp0nge
>> -- 
>> "stay hungry, stay foolish"
>> OWASP Orizon project, http://orizon.sourceforge.net
>> "enjoy your code review experience"
>> _______________________________________________
>> OWASP-Leaders mailing list
>> OWASP-Leaders at lists.owasp.org <mailto:OWASP-Leaders at lists.owasp.org>
>> https://lists.owasp.org/mailman/listinfo/owasp-leaders
> ------------------------------------------------------------------------
> _______________________________________________
> OWASP-Leaders mailing list
> OWASP-Leaders at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/owasp-leaders

More information about the OWASP-Leaders mailing list