C Rules
SAST rules for C that identify insecure patterns in application code.
C Rule Catalog
| ID | Title | Severity | Category |
|---|---|---|---|
CODE-0098 | Stack-based buffer overflow | CRITICAL | Injection |
CODE-0224 | Double Free Vulnerability | CRITICAL | Generic |
CODE-0280 | Insecure use of gets() function | CRITICAL | Injection |
CODE-0286 | Incorrect use of free() on stack variable | CRITICAL | Generic |
CODE-0621 | Buffer Overflow via Uncontrolled Format String | CRITICAL | Injection |
CODE-0644 | Format String Vulnerability | CRITICAL | Injection |
CODE-0648 | Insecure use of strcpy, stpcpy, strcat | CRITICAL | Injection |
CODE-0660 | Incorrect use of strncat | CRITICAL | Injection |
CODE-0662 | Return of Stack Variable Address | CRITICAL | Generic |
CODE-0663 | Insecure use of alloca() | CRITICAL | Generic |
CODE-0672 | Insecure use of sprintf and vsprintf | CRITICAL | Injection |
CODE-0677 | Command Injection | CRITICAL | Injection |
CODE-0680 | Use After Free | CRITICAL | Generic |
CODE-0188 | Integer Overflow or Wraparound | HIGH | Injection |
CODE-0222 | Insecure API Calls | HIGH | Injection |
CODE-0473 | Incorrect Order of setuid and setgid Calls | HIGH | AccessControl |
CODE-0492 | Unchecked Return Value of setuid/seteuid | HIGH | AccessControl |
CODE-0511 | Incorrect use of strncpy, stpncpy, strlcpy, or strscpy | HIGH | Injection |
CODE-0559 | Unchecked Return Values for Privilege Drop | HIGH | AccessControl |
CODE-0560 | Ensure restrictive umask values | HIGH | InsecureConfig |
CODE-0561 | Easily misused function may lead to buffer overflows | HIGH | Injection |
CODE-0562 | Insecure string processing function | HIGH | Injection |
CODE-0563 | Format string vulnerability in scanf functions | HIGH | Injection |
CODE-0564 | Reliance on untrusted inputs in a security decision | HIGH | Injection |
CODE-0565 | Untrusted Input in Security Decision | HIGH | Injection |
CODE-0566 | Untrusted Input from getenv or curl_getenv | HIGH | Injection |
CODE-0567 | Use of deprecated function (gets) | HIGH | Injection |
CODE-0568 | Insufficient protection against buffer overflow (getwd) | HIGH | Injection |
CODE-0569 | Insecure use of strcat family functions | HIGH | Injection |
CODE-0570 | Insecure string concatenation functions | HIGH | Injection |
CODE-0571 | Insecure functions unable to limit / check buffer sizes | HIGH | Injection |
CODE-0572 | Insecure use of lstrcpyn family functions | HIGH | Injection |
CODE-0573 | Unvalidated Buffer Copy | HIGH | Injection |
CODE-0574 | Insecure use of realpath function | HIGH | Injection |
CODE-0575 | Format string vulnerability in scanf functions | HIGH | Injection |
CODE-0576 | Insecure function unable to limit / check buffer sizes | HIGH | Injection |
CODE-0577 | Insecure string processing function | HIGH | Injection |
CODE-0578 | Insecure string processing functions | HIGH | Injection |
CODE-0579 | Insecure string processing function (strcpy) | HIGH | Injection |
CODE-0580 | Insecure string processing function | HIGH | Injection |
CODE-0581 | Insecure string processing functions | HIGH | Injection |
CODE-0582 | Unbounded String Length Calculation | HIGH | Injection |
CODE-0583 | Insecure use of strncat | HIGH | Injection |
CODE-0584 | Insecure use of strncpy | HIGH | Injection |
CODE-0585 | Insecure string processing function | HIGH | Injection |
CODE-0589 | Potential format string vulnerability | HIGH | Injection |
CODE-0590 | Potential format string vulnerability | HIGH | Injection |
CODE-0591 | Potential format string vulnerability | HIGH | Injection |
CODE-0592 | Potential format string vulnerability in syslog call | HIGH | Injection |
CODE-0593 | Use of deprecated function (memalign) | HIGH | InsecureConfig |
CODE-0595 | Insecure Access Control Entry (ACE) Configuration | HIGH | AccessControl |
CODE-0596 | Uncontrolled search path element | HIGH | InsecureConfig |
CODE-0597 | Uncontrolled search path element | HIGH | InsecureConfig |
CODE-0612 | Possible executable path hijacking (CreateProcess) | HIGH | Injection |
CODE-0613 | Possible executable path hijacking (CreateProcessAsUser/CreateProcessWithLogon) | HIGH | Injection |
CODE-0614 | Potential for OS command injection | HIGH | Injection |
CODE-0615 | Potential for OS command injection | HIGH | Injection |
CODE-0647 | Incorrect use of memset | HIGH | Generic |
CODE-0673 | Unterminated String in strncpy or stpncpy | HIGH | Injection |
CODE-0738 | Off-by-one error | HIGH | Injection |
CODE-0185 | Command-Line Argument or Environment Variable Access | MEDIUM | Injection |
CODE-0186 | Incorrect use of sizeof() on malloced pointer type | MEDIUM | Generic |
CODE-0215 | Incorrect use of sprintf and snprintf | MEDIUM | Generic |
CODE-0227 | Missing break statement in switch construct | MEDIUM | Generic |
CODE-0230 | Mismatched Memory Management | MEDIUM | Generic |
CODE-0242 | Error Message Exposure of Memory Addresses | MEDIUM | ErrorHandling |
CODE-0246 | Insecure Temporary File Creation | MEDIUM | InsecureConfig |
CODE-0264 | Pointer Subtraction | MEDIUM | Generic |
CODE-0269 | Use of stack variable with putenv | MEDIUM | InsecureConfig |
CODE-0287 | Mismatched Memory Management | MEDIUM | Generic |
CODE-0289 | Signed/Unsigned Conversion | MEDIUM | Generic |
CODE-0476 | Unsafe use of strlcpy and strlcat return values | MEDIUM | Injection |
CODE-0487 | Missing Return Statement in Non-Void Function | MEDIUM | Generic |
CODE-0488 | Unchecked Return Value of Scanf Functions | MEDIUM | Injection |
CODE-0494 | Insecure Random Number Generation | MEDIUM | Crypto |
CODE-0586 | Insecure encryption algorithm (DES) | MEDIUM | Crypto |
CODE-0587 | Insecure stream cipher (RC4) | MEDIUM | Crypto |
CODE-0588 | Insecure hashing algorithm | MEDIUM | Crypto |
CODE-0594 | Possible integer overflow or underflow | MEDIUM | Injection |
CODE-0598 | Null ACL when calling SetSecurityDescriptorDacl may allow all access to objects | MEDIUM | AccessControl |
CODE-0600 | Potential Time Of Check Time Of Use Vulnerability | MEDIUM | Injection |
CODE-0606 | Potential Time Of Check Time Of Use (TOCTOU) vulnerability | MEDIUM | AccessControl |
CODE-0607 | Potential time of check time of use vulnerability (chmod) | MEDIUM | InsecureConfig |
CODE-0608 | Potential time of check time of use vulnerability (chown) | MEDIUM | AccessControl |
CODE-0609 | Time-of-check time-of-use (TOCTOU) race condition | MEDIUM | Generic |
CODE-0610 | Potential time of check time of use vulnerability (vfork) | MEDIUM | Concurrency |
CODE-0611 | Usage of insufficient random number generators | MEDIUM | Crypto |
CODE-0616 | Potential time of check time of use vulnerability (GetTempFileName) | MEDIUM | Generic |
CODE-0617 | Potential file permissions issue (mkstemp) | MEDIUM | AccessControl |
CODE-0618 | Use of deprecated function (mktemp) | MEDIUM | InsecureConfig |
CODE-0619 | Potential time of check time of use vulnerability (tmpfile) | MEDIUM | InsecureConfig |
CODE-0620 | Potential time of check time of use vulnerability (tmpnam/tempnam) | MEDIUM | InsecureConfig |
CODE-0636 | Assertion Used for Input Validation | MEDIUM | Generic |
CODE-0642 | Insecure signal() API usage | MEDIUM | Generic |
CODE-0653 | Typo in Operator | MEDIUM | Generic |
CODE-0669 | Integer Truncation Error | MEDIUM | Generic |
CODE-0743 | Integer Overflow from strlen or wcslen | MEDIUM | Injection |
CODE-0744 | Unsafe use of snprintf and vsnprintf return values | MEDIUM | Injection |
CODE-0764 | Incorrect Unsigned Comparison | MEDIUM | Generic |
CODE-0765 | Insecure API Access: Time-of-Check to Time-of-Use Vulnerability | MEDIUM | InsecureConfig |
CODE-0767 | Unchecked Return Value of Memory Allocation Function | MEDIUM | Generic |
CODE-0806 | Insecure API: atoi, atol, atof | MEDIUM | Generic |
CODE-0512 | Missing Default Case in Switch Statement | LOW | Generic |
CODE-0599 | Usage of deprecated function (cuserid) | LOW | InsecureConfig |
CODE-0601 | Usage of deprecated function (getlogin) | LOW | Generic |
CODE-0602 | Use of obsolete function getpass | LOW | InsecureConfig |
CODE-0603 | Deprecated function calls (ssignal/gsignal) | LOW | Generic |
CODE-0604 | Usage of deprecated function (ulimit) | LOW | InsecureConfig |
CODE-0605 | Usage of deprecated function (usleep) | LOW | InsecureConfig |
Total Rules: 109
Click on any rule ID to view detailed information, examples, and remediation guidance.