RATS(1)
π RATS(1) β the manual, but make it slay β¨
okay bestie, so this is rats(1), from the General Commands Manual section. Yes, section one. Yes, we're doing this. Sit down, grab a boba, and let's get into it π
πΈ NAME πΈ
rats β the Rough Auditing Tool for Security. That's it, that's the name, and it absolutely ate π₯
π¦ SYNOPSIS π¦
rats [options] [file]...
β¨ DESCRIPTION β¨
So rats is a rough auditing tool for security, developed by Secure Software, Inc. She scans C, Perl, PHP, and Python source code and flags those common security-related programming errors we all pretend we'd never write β think buffer overflows and TOCTOU (Time Of Check, Time Of Use) race conditions. Classic. Iconic, even.
But here's the vibe check, bestie: like her name literally says, she does a rough analysis of source code. That means she will not find every error, and she will also find things that are not errors at all. Not her fault, she's doing her best π . Manual inspection of your code is still necessary β but this tool makes it so much easier. Not me hyping up a static analyzer, but here we are π«Ά
When you start her up, RATS scans each file β or each file in each directory β that you specified on the command line, and she produces a report when the scanning is complete. Which vulnerabilities show up in that final report depends on the data inside the vulnerability database(s) being used, plus the warning level you've got going. Mix and match, it's giving customizable β¨
For every vulnerability, she gives you the list of files and line numbers where it occurred, followed by a brief description of the vulnerability and a suggested action. So you get the tea and the fix. Obsessed.
π OPTIONS π
-h,--helpβ shows you a brief usage summary and then exits. The "help me bestie" button π-a <fun>β reports any occurrence of the function fun in the source file(s). Any. Single. One. She's thorough like that.-d <filename>,--database <filename>,--db <filename>β specifies a vulnerability database to be loaded. And listen, you can pass multiple-doptions, and each database you specify will be loaded. Stack 'em up, queen π-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. Receipts, but for input π-l <lang>,--language <language>β forces the specified language to be used regardless of the filename extension. Currently valid language names are"c","perl","php"and"python". Don't try anything else, she will not play along.-r,--referencesβ causes references to vulnerable function calls that are not being used as calls themselves to be reported. Sneaky little mentions, we see them π-w <level>,--warning <level>β sets the warning level. Valid levels are1,2or3.1includes only default and high severity.2includes medium severity (default).3includes low severity vulnerabilities.
-xβ causes the default vulnerability databases (which are in the installation data directory,/usr/share/ratsby default) to not be loaded. Going rogue, no defaults, only your own dbs π-R,--no-recurssionβ do not recurse subdirectories when encountered. (And yes, it's spelledno-recurssionwith the double s, that's just how she is, we don't fix her, we love her π)--xmlβ output in XML. Machine-readable era.--htmlβ output in HTML. For when you want your vulnerabilities to be aesthetic π--follow-symlinksβ follow symlinks and treat them like whatever they are pointing to. If the symlink points to a directory, it will be descended into unless-Ris specified. If it's pointing to a file, it will be treated as a file. She commits to the bit, no cap.
π«Ά AUTHOR π«Ά
This manual page was orginally written by Adam Lazur <adam@lazur.org>, for the Debian GNU/Linux system (but may be used by others). Yes, "orginally". We're keeping it exactly as it is, character for character, because that's the law π
Modified by Secure Software, Inc.
aaaand that's the whole page, bestie π she's giving September 17, 2001, straight out of the General Commands Manual, RATS(1) and thriving. Go scan something, stay safe, and remember: rough analysis only, manual inspection still required, periodt π
β¨π¦
π¦ where this page comes from
- fedora 43: rats 2.4-30.fc43 Β· GPL-2.0-only
- fedora 44: rats 2.4-31.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms