All Projects → vanhauser-thc → vulntest

vanhauser-thc / vulntest

Licence: BSD-3-Clause license
Static code analysis test source code

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to vulntest

memcheck-cover
An HTML generator for Valgrind's Memcheck tool
Stars: ✭ 30 (+25%)
Mutual labels:  static-code-analysis
lints
Lint all your JavaScript, CSS, HTML, Markdown and Dockerfiles with a single command
Stars: ✭ 14 (-41.67%)
Mutual labels:  static-code-analysis
FastLint-Issues
FastLint finds & fixes bugs in your commits
Stars: ✭ 123 (+412.5%)
Mutual labels:  static-code-analysis
duplex
Duplicate code finder for Elixir
Stars: ✭ 20 (-16.67%)
Mutual labels:  static-code-analysis
codeclimate-apexmetrics
ApexMetrics - Code Climate engine for Salesforce [DISCONTINUED use CC PMD instead)
Stars: ✭ 46 (+91.67%)
Mutual labels:  static-code-analysis
stm app
This software engineer profile builder turns your code into a detailed list of skills for an online directory of software developers.
Stars: ✭ 23 (-4.17%)
Mutual labels:  static-code-analysis
Phpstan Phpunit
PHPUnit extensions and rules for PHPStan
Stars: ✭ 247 (+929.17%)
Mutual labels:  static-code-analysis
phpstan-nette
Nette Framework class reflection extension for PHPStan & framework-specific rules
Stars: ✭ 87 (+262.5%)
Mutual labels:  static-code-analysis
scancode.io
ScanCode.io is a server to script and automate software composition analysis pipelines with ScanPipe pipelines. This project is sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase/ Google Summer of Code, nexB and others generous sponsors!
Stars: ✭ 66 (+175%)
Mutual labels:  sca
mosec-maven-plugin
用于检测maven项目的第三方依赖组件是否存在安全漏洞。
Stars: ✭ 85 (+254.17%)
Mutual labels:  sca
vulndb-data-mirror
A simple Java command-line utility to mirror the entire contents of VulnDB.
Stars: ✭ 36 (+50%)
Mutual labels:  sca
healthier
🧘‍♀️ Healthier is an opinionated style agnostic code linter – a friendly companion to Prettier
Stars: ✭ 78 (+225%)
Mutual labels:  static-code-analysis
sonar-coldfusion
SonarQube ColdFusion Analyzer
Stars: ✭ 25 (+4.17%)
Mutual labels:  static-code-analysis
tryceratops
A linter to prevent exception handling antipatterns in Python (limited only for those who like dinosaurs).
Stars: ✭ 381 (+1487.5%)
Mutual labels:  static-code-analysis
systemdlint
Systemd Linter
Stars: ✭ 16 (-33.33%)
Mutual labels:  static-code-analysis
cmd-call-graph
A simple tool to generate a call graph for calls within Windows CMD (batch) files.
Stars: ✭ 37 (+54.17%)
Mutual labels:  static-code-analysis
fiasko bro
Yet another static python code validator
Stars: ✭ 27 (+12.5%)
Mutual labels:  static-code-analysis
codecat
CodeCat is an open-source tool to help you find/track user input sinks and security bugs using static code analysis. These points follow regex rules. Beta version.
Stars: ✭ 265 (+1004.17%)
Mutual labels:  static-code-analysis
klara
Automatic test case generation for python and static analysis library
Stars: ✭ 250 (+941.67%)
Mutual labels:  static-code-analysis
eclipse-pmd
eclipse-pmd has been moved to
Stars: ✭ 20 (-16.67%)
Mutual labels:  static-code-analysis

Little test programs to test static code analysis software

Introduction

These small code pieces were used by me to analyse the detective abilities of a few SCA solutions to identify security vulnerabilities in source code. This was not a comprehensive test, but rather a quick analysis.

Initially I wanted to create sophisticated bugs and check if they can find them but found out that even easy test cases can be too hard ;-)

The result of my testing can be read in the german article here: https://www.heise.de/hintergrund/Pruefstand-fuer-Testwerkzeuge-Codeanalyse-im-Praxiseinsatz-4679430.html?seite=all

The test source code

Alphabetically:

  • andreas.cpp - hard coded credentials
  • bof.c - buffer overflow based on untrusted length information
  • confuse.cpp - type confusion vulnerability
  • double_free.cpp - copy of a CWE415 NIST test source code
  • encrypt.c - weak encryption mode
  • fdleak.c - leaking a file descriptor to a child process
  • hardcoded_password.c - hard coded credentials
  • ok.c - nothing wrong here, for testing false positives and standard "warnings"
  • ok2.c - nothing wrong here, for testing false positives and standard "warnings"
  • strcpy.c - standard strcpy buffer overflow (and format string vulnerability which was not the test target)
  • strcpy2.c - standard string copy via while-loop (and format string vulnerability which was not the test target)
  • tricky.c - buffer overflow based on untrusted length information
  • use_after_free.c - use after free vulnerability

Results

All vendors reviewed the setup and verified that the results were real and not based on a misconfiguration. And yes, most of them were not happy with the results.

CODE/SOFTWARE Perforce Klocwork 19.01 Parasoft C/C++test 10.4.2 Mathworks Bugfinder R2019a (2) Viva 64 PVS Studio CodeQL Oct 2022 joern Oct 2022 semgrep Oct 2022 cppcheck 2.9 llvm 14 clang-analyzer
andreas yes no no no no no no no no
bof yes no yes no yes no no no yes(3)
confuse no no no no no no no no no
double_free yes no no yes no no no no yes
encrypt yes no yes no yes(1) no no no no
fdleak no no no no no no no no no
hardcoded_password yes no no no no no no no no
strcpy no yes no no yes(1) no no no no
strcpy2 no no no no no no no no no
tricky partial no no yes no no no no no
use_after_free yes yes yes yes no no yes yes yes

(1) Not in cpp-lgtm.qls but from cpp/ql/src/Security

(2) For Mathworks Bugfinder, there is also the Code Prover product which checks for robustness which includes buffer overruns. This might detect the buffer overflow bugs but is a seperate product that is not a SCA comparable to the others.

(3) with alpha.security checkers enabled

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].