<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[static analysis - Endless Wyrd]]></title><description><![CDATA[The official blog of The Wizard & The Wyrd, LLC.  We are engaged in software and systems research and development with an emphasis on information security, evolutionary machine learning, and AI.]]></description><link>http://wizardandthewyrdblog.azurewebsites.net/</link><generator>Ghost 0.5</generator><lastBuildDate>Tue, 14 Apr 2026 23:55:45 GMT</lastBuildDate><atom:link href="http://wizardandthewyrdblog.azurewebsites.net/tag/static-analysis/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Flawfinder 1.31 & Ruby 2.2.x-master]]></title><description><![CDATA[<p><a href="https://www.ruby-lang.org/en/">Ruby</a> is one of the most popular pogramming languages in production use for a variety of systems and applications; most notably, we see wide adoption in web application development with the Ruby on Rails framework and DevOps tooling with the likes of Puppet and Chef.</p>

<p>The Ruby language, compared to other languages used to build and deliver web applications, has a comparitively small list of disclosed exploits on the CVE (Common Vulnerabilities and Exposures) list.</p>

<p>For reference, here is a list of historical CVE disclosures to date for a handful of languages/platforms used to develop web applications:</p>

<ol>
<li>Python: <a href="http://www.cvedetails.com/product/18230/Python-Python.html?vendor_id=10210">23</a>  </li>
<li>Ruby: <a href="http://www.cvedetails.com/vulnerability-list/vendor_id-7252/product_id-12215/Ruby-lang-Ruby.html">45</a>  </li>
<li>PHP: <a href="https://www.cvedetails.com/vulnerability-list/vendor_id-74/product_id-128/PHP-PHP.html">409</a>  </li>
<li>Oracle JRE: <a href="https://www.cvedetails.com/vulnerability-list/vendor_id-93/product_id-19117/Oracle-JRE.html">413</a></li>
</ol>

<p>Here is the result of running Flawfinder 1.31, with the default rules in the Homebrew distribution, against the master branch of the <a href="https://github.com/ruby/ruby">current Ruby 2.2.x source code</a>:</p>

<pre><code>ANALYSIS SUMMARY:

Hits = 636  
Lines analyzed = 197285 in approximately 3.93 seconds (50139 lines/second)  
Physical Source Lines of Code (SLOC) = 141537  
Hits@level = [0]   0 [1] 246 [2] 288 [3]  35 [4]  52 [5]  15  
Hits@level+ = [0+] 636 [1+] 636 [2+] 390 [3+] 102 [4+]  67 [5+]  15  
Hits/KSLOC@level+ = [0+] 4.49352 [1+] 4.49352 [2+] 2.75546 [3+] 0.72066 [4+] 0.473374 [5+] 0.105979  
Minimum risk level = 1  
Not every hit is necessarily a security vulnerability.  
There may be other security vulnerabilities; review your code!  
See 'Secure Programming for Linux and Unix HOWTO'  
(http://www.dwheeler.com/secure-programs) for more information.
</code></pre>

<p>These results, at first glance, may prove interesting:  </p>

<pre><code>./addr2line.c:449:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Consider using strcpy_s, strncpy, or strlcpy (warning, strncpy is easily
  misused).
./addr2line.c:450:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Consider using strcpy_s, strncpy, or strlcpy (warning, strncpy is easily
  misused).
./addr2line.c:723:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Consider using strcpy_s, strncpy, or strlcpy (warning, strncpy is easily
  misused).
</code></pre>

<p>For the complete test results, see this <a href="http://pastebin.com/Bu8TNgBp">Paste</a>.</p>

<p>Simply scanning the Ruby source of this particular implementation of Ruby with a single static analysis tool should be considered a preliminary exercise for more research.</p>]]></description><link>http://wizardandthewyrdblog.azurewebsites.net/flawfinder_and_ruby/</link><guid isPermaLink="false">8d67efef-6471-41c8-811e-b03ec43442ed</guid><category><![CDATA[ruby]]></category><category><![CDATA[static analysis]]></category><category><![CDATA[infosec]]></category><dc:creator><![CDATA[Ramon J. Long III]]></dc:creator><pubDate>Sat, 03 Oct 2015 02:02:45 GMT</pubDate></item></channel></rss>