whatisgithub

What is taintflow?

h3lium4u/taintflow — explained in plain English

Analysis updated 2026-05-18

2RustAudience · developerComplexity · 4/5LicenseSetup · moderate

In one sentence

A Rust and machine learning powered security scanner that finds SQL injection, command injection, and other common vulnerabilities in Python and Java code.

Mindmap

mindmap
  root((TaintFlow))
    What it does
      Taint analysis
      ML confidence scoring
      CWE detection
    Tech stack
      Rust
      LightGBM
      ONNX
    Use cases
      Scan codebases
      CI security checks
      VS Code integration
    Audience
      Developers
      Security teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Scan a Python or Java codebase for SQL injection, command injection, and other common CWE vulnerabilities.

USE CASE 2

Run the scanner as a Docker container in a CI pipeline to catch security issues before merging code.

USE CASE 3

Use the VS Code extension to see vulnerability findings underlined directly in the editor as you write code.

USE CASE 4

Export scan results as JSON or an HTML report to share with a team or feed into another tool.

What is it built with?

RustPythonLightGBMONNXDocker

How does it compare?

h3lium4u/taintflow132ikl/game1lystore/pay-dcp
Stars222
LanguageRustRustRust
Last pushed2020-12-30
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity4/52/53/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs a Rust toolchain plus Python ML packages, or use the pre-built Docker image instead.

MIT license: use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.

So what is it?

TaintFlow is a security scanner that looks for common vulnerability patterns in Python and Java source code. It combines a Rust based analysis engine with a machine learning model to decide how likely a finding is to be a real problem rather than a false alarm. The core engine parses source code into a syntax tree, builds a control flow graph, and traces how data moves from risky entry points, such as user input, through the program to sensitive operations, such as a database query or a shell command. This kind of tracing is called taint analysis. The tool looks specifically for seven categories of vulnerability defined by the industry standard CWE list: SQL injection, operating system command injection, path traversal, server side request forgery, unsafe deserialization, hardcoded credentials, and weak cryptographic algorithms. On top of the pattern matching, a LightGBM machine learning model, trained on thousands of before and after code patches, scores each finding by comparing features of the code before and after a fix would be applied, and the trained model can be exported to the ONNX format so it can run in different environments. You can install it locally by building the Rust engine with Cargo and installing a handful of Python packages for the machine learning part, or you can run it as a ready made container image pulled from Docker Hub or GitHub's container registry. Once installed, you scan a single file or an entire folder from the command line, and results can be printed as plain text, exported as JSON, or turned into an HTML report. Each finding includes a CWE code, a severity level, a confidence score, the file and line number, a description of the tainted data flow, and a suggested fix. There is also a companion VS Code extension that runs the same scanner inside the editor, underlining risky code directly in red or yellow depending on severity, linking each CWE code to its official definition, and offering an optional automatic scan whenever a file is saved. The README reports benchmark results on cross validated and external test data, and the project is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me build the Rust engine and install the Python dependencies to run TaintFlow locally.
Prompt 2
Show me how to run TaintFlow against my project using the Docker container instead of building from source.
Prompt 3
Explain what a taint analysis finding for CWE-89 SQL injection means and how to fix it.
Prompt 4
Walk me through installing and using the TaintFlow VS Code extension to scan my workspace.

Frequently asked questions

What is taintflow?

A Rust and machine learning powered security scanner that finds SQL injection, command injection, and other common vulnerabilities in Python and Java code.

What language is taintflow written in?

Mainly Rust. The stack also includes Rust, Python, LightGBM.

What license does taintflow use?

MIT license: use, modify, and distribute freely, including commercially, as long as you keep the copyright notice.

How hard is taintflow to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is taintflow for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.