Slashdot Mirror


Undocumented Open Source Code On the Rise

ruphus13 writes "According to security company Palamida, the use of open source code is growing rapidly within businesses. However, the lack of documentation and understanding of how the code works can increase the vulnerability and security risks the companies face. OStatic quotes Theresa Bui-Friday saying, 'In 2007, Palamida's Services team audited between 300M to 500M lines of code for F500 to venture-backed companies, across multiple industries. Of the code we reviewed, Palamida found that applications written within the last five years contain 50% or more open source code, by a line of code count. Of that 50% of open source code, 70% was undocumented. This is up from 30% in 2006.' How can businesses protect themselves and still draw on open source code effectively?"

6 of 94 comments (clear)

  1. Source code is its own documentation by mangu · · Score: 4, Insightful
    I'd rather have the source code which I can read and try to understand than an executable file alone.


    The only reason why we don't see an article "Undocumented Commercial Software On the Rise" is because the public cannot see how badly documented the commercial software is.

    1. Re:Source code is its own documentation by jps25 · · Score: 5, Insightful

      I disagree.
      This isn't about closed vs open source, this is about decent programming.
      Comments in code are neccessary and a minimal requirement for any project.
      At least add one line to any function explaining what the function does, what its input is and what it returns.
      This isn't so hard and it won't kill you, but it'll make life easier for you and anyone else who will have to deal with the code later.
      It also makes finding errors easier, as your code may not be doing what your specifications say it should do.
      I don't understand this hatred for comments and the "code-is-its-own-documentation"-philosophy. I really don't.

      <code>
      #include <iostream>
      #include <algorithm>
      #include <iterator>

      #define ch_ty(ty)           std::istream_iterator<ty>::char_type
      #define tr_ty(ty)           std::istream_iterator<ty>::traits_type

      #define cin_iter(ty)        std::istream_iterator<ty, ch_ty(ty), tr_ty(ty)>( std::cin )
      #define void_iter(ty)       std::istream_iterator<ty, ch_ty(ty), tr_ty(ty)>()

      int main( int argc, char *argv[] ) {
        while ( (cin_iter(size_t)) != void_iter(size_t)
                    ? ( std::cin.unget(),
                        argc += *cin_iter(size_t)
                    ) : (
                      printf( "\nsum: %d\n", --argc ), system("exit")
                    ) );
      }
      </code>

      Perhaps easy to understand, but one comment-line would save you minutes wasted understanding and reading it.

      or

      <code>
      #include <stdio.h>

      int v,i,j,k,l,s,a[99];main(){for(scanf("%d",&s);*a-s;v=a[j*=v]-a[i],k=i<
      s,j+=(v=j<s&&(!k&&!!printf(2+"\n\n%c"-(!l<<!j)," #Q"[l^v?(l^j)&1:2])&&++
      l||a[i]<s&&v&&v-i+j&&v+i-j))&&!(l%=s),v||(i==j?a[i+=k]=0:++a[i])>=s*k&&
      ++a[--i]);printf("\n\n");}

      </code>

      Well, obviously obfuscated, but one comment and it's immediately clear what it does.

    2. Re:Source code is its own documentation by Splab · · Score: 4, Insightful

      I keep hearing people pro open source code say "I can check it!" Well can you? Have you done so - in a project spanning more than a few thousand lines of code? Just because the code is there to see doesn't actually mean its doable to waddle through it.

      I'm not for either open source or proprietary code, my employer pays me money to produce code, what he does with it is his business, but what I do have, is experience using both proprietary code and open source code - both models have pros and cons.

      With proprietary code there are someone I can call and they are by contract obliged to fix problems within a certain time frame. One particular instance is a database we are paying license fees for, I will not name them but to this date I have found more than 10 vectors that causes crashes. Those problems have been addressed by the vendor in a timely manner (I have yet to find bugs that would be show stoppers, but some did require annoying workarounds). With OSS we don't have this possibility, yes, we can log a bug in whatever bug tracker they use and hope someone will address our issue, but we have no guarantee - also in my experience logging a bug with OSS developers can be quite a daunting process, people can have some serious egocentric issues, while this of course is also applicable for proprietary software, there are someone higher in the food chain who can be called.
      With OSS we of course got the good fortune of being able to go through the source code and try to fix the code ourselves... right?
      Have you ever even considered just how bloody huge the code base is for something like a database? Tracking down a bug, well yes, the gdb can tell you where the program stopped working, but unless you have some really really good code reading skills and are up to date on everything that happens algorithm wise you have close to zero chance of fixing anything without causing major problems.

      Also as a developer I got enough to do creating my own applications, I simply do not have the time to dig through thousands of lines of code every time something new breaks. Yes open source is nice, small projects are easy to help get along, fixing small bugs, but at some point the project grows so big that anyone using it needs to have someone they can call at 4 am in the morning to help them.

      Oh and just because some software is proprietary it doesn't mean you don't have access to the source code, even at Microsoft you can buy access to the source.

      We got builds with debug flags from the database vendor because we cannot share our database with them, therefore stack traces etc. has to be generated locally and shipped to them. (yes this is a bit annoying, but having sensitive records out in the wild is a tad more problematic).

      I don't pick OSS over proprietary or visa versa, I pick what ever tool fits my needs.

  2. 70% Undocumented, huh? by Devin+Jeanpierre · · Score: 5, Insightful

    How do you measure something like how well things are documented with a percentage? Some code simply doesn't need documentation. Other code needs plenty. Is 0% a 1:1 relationship between lines of code and lines of comments? That whole thing seems a bit strange. They could certainly back it up if they wanted to, but that'd be too much effort.

    --
    -Devin Jeanpierre
  3. Same old, same old. by khasim · · Score: 5, Insightful

    In today's world of 24/7 and persistent network access, developers dispersed across multi-national sites can include open source, freeware, public domain, evalware (demos of commercial software), etc, into the code they are writing without triggering the usual checkpoints in the procurement process.
    I've seen that same issue YEARS ago. And I'm not talking code snippets. I'm talking systems that had "evalware" tools in them.

    This has NOTHING to do with "multi-national sites" or any of that.

    This has EVERYTHING to do with clearly stating the rules and ENFORCING those rules.

    The rules do not enforce themselves. Someone, somewhere has to approve the code that goes in.

    The problem is that management does NOT understand code and will happily farm out the work to anyone who says that they can produce X lines for $Y. Without oversight. The less oversight, the less expensive the project is. Which means bigger bonuses for those same executives.
  4. Gotta love Slashdot by Anonymous Coward · · Score: 5, Insightful

    Gotta love this place. At the time of this posting, there are 11 comments modded 3 or higher. Of those, only ONE makes any reference to the act of documenting where the code is coming from (which is what the article is about). All the rest are talking about writing documentation for code, or commenting code as its written. Way to miss the ball, guys! This article is addressing you specifically, yet you have no idea what they're even saying because you can't be bothered to try to listen. Nice.