Automatically exported from code.google.com/p/rough-auditing-tool-for-security
Switch branches/tags
Nothing to show
Clone or download
brian.chess@gmail.com
brian.chess@gmail.com calling this version 2.4
Latest commit 4ba54ce Dec 31, 2013
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cvsignore Initial import May 19, 2009
COPYING Initial import May 19, 2009
Makefile.in This is the initial merge of Ruby support for RATS. May 21, 2009
README Updated documentation to include ruby Jun 4, 2009
README.win32 Initial import May 19, 2009
c-lex.l fixing out-of-bounds read in YY_INPUT caused when fread() returns zer… Jun 1, 2009
c-tokens.h Initial import May 19, 2009
configure Initial import May 19, 2009
configure.ac Initial import May 19, 2009
engine.c This is the initial merge of Ruby support for RATS. May 21, 2009
engine.h This is the initial merge of Ruby support for RATS. May 21, 2009
getopt.c Initial import May 19, 2009
getopt.h Initial import May 19, 2009
hash.c Initial import May 19, 2009
hash.h Initial import May 19, 2009
install-sh Initial import May 19, 2009
kazhash.c Initial import May 19, 2009
kazhash.h Initial import May 19, 2009
lex.yyc.c fixing out-of-bounds read in YY_INPUT caused when fread() returns zer… Jun 1, 2009
lex.yyp.c fixing out-of-bounds read in YY_INPUT caused when fread() returns zer… Jun 1, 2009
lex.yyperl.c fixing out-of-bounds read in YY_INPUT caused when fread() returns zer… Jun 1, 2009
lex.yyphp.c fixing out-of-bounds read in YY_INPUT caused when fread() returns zer… Jun 1, 2009
lex.yyruby.c Updated documentation to include ruby Jun 4, 2009
main.c applying patches from Robin Johnson (robbat2@gentoo.org) to fix null … Dec 31, 2013
mkinstalldirs Initial import May 19, 2009
perl-lex.l fixing out-of-bounds read in YY_INPUT caused when fread() returns zer… Jun 1, 2009
perl-tokens.h Initial import May 19, 2009
php-lex.l fixing out-of-bounds read in YY_INPUT caused when fread() returns zer… Jun 1, 2009
php-tokens.h Initial import May 19, 2009
python-lex.l fixing out-of-bounds read in YY_INPUT caused when fread() returns zer… Jun 1, 2009
python-tokens.h Initial import May 19, 2009
rats-c.xml Initial import May 19, 2009
rats-openssl.xml Initial import May 19, 2009
rats-perl.xml Initial import May 19, 2009
rats-php.xml Initial import May 19, 2009
rats-python.xml Initial import May 19, 2009
rats-ruby.xml This is the initial merge of Ruby support for RATS. May 21, 2009
rats.1 Initial import May 19, 2009
rats.dsp Initial import May 19, 2009
rats.dsw Initial import May 19, 2009
rats.spec Initial import May 19, 2009
report.c applying patches from Robin Johnson (robbat2@gentoo.org) to fix null … Dec 31, 2013
report.h This is the initial merge of Ruby support for RATS. May 21, 2009
ruby-lex.l Updated documentation to include ruby Jun 4, 2009
ruby-tokens.h This is the initial merge of Ruby support for RATS. May 21, 2009
tokens.h This is the initial merge of Ruby support for RATS. May 21, 2009
unistd.h Initial import May 19, 2009
version.h calling this version 2.4 Dec 31, 2013
vuln_db.c Initial import May 19, 2009
vuln_db.h Initial import May 19, 2009

README

                    

		RATS - Rough Auditing Tool for Security

This is RATS, a rough auditing tool for security, developed by Secure
Software Inc.  It is a tool for scanning C, C++, Perl, PHP, Python 
and Ruby source code and flagging common security related programming
errors such as buffer overflows and TOCTOU (Time Of Check, Time Of
Use) race conditions.  As its name implies, the tool performs only a
rough analysis of source code.  It will not find every error and will
also find things that are not errors.  Manual inspection of your code
is still necessary, but greatly aided with this tool.

RATS is free software.  You may copy, distribute, and modify it under
the terms of the GNU Public License as contained in the file named
COPYING that has been included with this distribution.

Requirements
------------
RATS requires expat to be installed in order to build and run.  Expat
is often installed in /usr/local/lib and /usr/local/include.  On some
systems, you will need to specify --with-expat-lib and
--with-expat-include options to configure so that it can find your
installation of the library and header.

Expat can be found at: http://expat.sourceforge.net/

Installation
------------
Building and installation of RATS is simple.  To build, you simply
need to run the configuration shell script in the distribution's
top-level directory:

        ./configure

The configuration script is a standard autoconf generation
configuration script and accepts many options.  Run configure with the
--help option to see what options are available.

Once the configuration script has completed successfully, simply run
make in the distribution's top-level directory to build the program:

        make

By default, RATS will be installed to /usr/local/bin and its
vulnerability database will be installed to /usr/local/lib.  You may
change the installation directories of both with the --prefix option
to configure.  You may optionally use the --bindir and --datadir to
specify more precise locations for the files that are installed.

To install after building, simply run make with the install target:

        make install

This will copy the built binary, rats, to the binary installation
directory and the vulnerability database, rats.xml, to the data
installation directory.

Running RATS
------------
Once you have built and installed RATS, it's time to start auditing
your software!  RATS accepts a few command line options that will be
described here and accepts a list of files to audit on the command
line.  If no files to audit are specified, stdin will be used.

usage: rats [options] [file]...

Options explained:
    -d <filename>, --db <filename>, --database <filename>
                    Specifies a vulnerability database to be loaded.  You may
                    have multiple -d options and each database specified will
                    be loaded.
    -h, --help      Displays a brief usage summary
    -i, --input     Causes a list of function calls that were used which
                    accept external input to be produced at the end of the
                    vulnerability report.
    -l <lang>, --language <lang>
         	    Force the specified language to be used regardless of 
                    filename extension. Currently valid language names are 
                    "c", "perl", "php", "python" and "ruby".
    -r, --references
	            Causes references to vulnerable function calls that are not
                    being used as calls themselves to be reported.
    -w <level>, --warning<level>
		    Sets the warning level.  Valid levels are 1, 2 or 3.   
                    Warning level 1 includes only default and high severity
                    Level 2 includes medium severity. Level 2 is the default 
                    warning level 3 includes low severity vulnerabilities.
    -x              Causes the default vulnerability databases (which are in 
                    the installation data directory, /usr/local/lib by default)
                    to not be loaded.
    -R, --no-recursion
		    Disable recursion into subdirectories.
    --xml	    Cause output to be in XML
    --html	    Cause output to be in HTML
    --follow-symlinks
		    Evaluate and follow symlinks.

When started, RATS will scan each file specified on the command line and
produce a report when scanning is complete.  What vulnerabilities are reported
in the final report depend on the data contained in the vulnerability database
or databases that are used and the warning level in use.

For each vulnerability, the list of files and line numbers where it occured is
given, followed by a brief description of the vulnerability and suggested
action.

Contact
-------
RATS is authored, maintained and distributed by Secure Software, Inc.  All
bug reports, patches, database contributions, comments, etc. should be sent to
rats@securesoftware.com.  Our website is http://www.securesoftware.com/

Acknowledgments
---------------
Thanks to Mike Ellison for providing the legwork on the initial port
of rats-1.3 to the Win32 platform.

Special thanks to Ben Laurie for many significant contributions,
including the OpenSSL-specific portions of the database.

Thanks to Adam Lazur for originally authoring the man page