Repository navigation
Languages
Canonical source: README: Supported languages and docs/architecture.md.
On current main, Code Cleaner analyzes 12 languages. The latest release, v1.4.0, covers 11 languages; TypeScript is on main and ships in the next release. Java taint tracking is likewise on main, not in v1.4.0.
| Language | Extensions | Parser (if installed) | Without it | Taint tracking |
|---|---|---|---|---|
| Python |
.py .pyw
|
stdlib ast (always) |
— |
ast engine, one-level intra-file calls (on main; v1.4.0 stays inside one function) |
| JavaScript |
.js .jsx .mjs .cjs
|
esprima ([js], ES2017 syntax) |
pattern-based | tree-sitter engine ([treesitter]) or line-based |
| TypeScript |
.ts .tsx .mts .cts
|
tree-sitter ([treesitter]; tsx grammar for .tsx) |
pattern-based | tree-sitter engine or line-based |
| Java | .java |
javalang ([java]) |
pattern-based | tree-sitter engine ([treesitter]) or line-based (on main; none in v1.4.0) |
| C# | .cs |
tree-sitter ([treesitter]) |
pattern-based | tree-sitter engine or line-based |
| C++ (and C) |
.cpp .cc .cxx .c .h .hpp .hh .hxx
|
tree-sitter | pattern-based | tree-sitter engine or line-based |
| Go | .go |
tree-sitter | pattern-based | tree-sitter engine or line-based |
| Ruby | .rb |
tree-sitter | pattern-based | tree-sitter engine or line-based |
| Rust | .rs |
tree-sitter | pattern-based | tree-sitter engine or line-based |
| SQL | .sql |
tree-sitter | statement splitter | n/a |
| HTML |
.html .htm
|
stdlib html.parser (always) |
— | — |
| SCRAWL (ROSETTA text) |
.rosetta, .scrawl
|
built-in ROSETTA v1.4 compiler (always) | — |
rosetta 1.4.0+ (cross-check and run; not taint tracking) |
"Pattern-based" means stripped text (comments and strings removed), brace/end matching and anchored regexes. It is what v1.1 used and still works with no dependencies, but it is less precise.
--language on main accepts: python, javascript, typescript, java, csharp, cpp, sql, go, ruby, rust, html, scrawl. v1.4.0 has the same list except typescript.
-
Python is always parsed with the standard-library
astmodule. Onmain, its taint engine also follows calls one level deep within the same file; see Taint Tracking. - esprima only understands JavaScript up to ES2017; newer syntax falls back to patterns (one LOW note).
-
TypeScript (on
main) runs every JavaScript rule plustypescript-ts-ignore(@ts-ignore/@ts-nocheck, LOW) and the style ruletypescript-explicit-any. It does not type-check. Without tree-sitter there are no exact syntax errors (only the brace-balance heuristic), and function detection is regex-based. Imports resolved through tsconfigpaths/baseUrlare recognized; other resolver setups may needknown_modules. - There is no taint tracking for HTML or SQL. Java taint tracking is on
main(servlet / Spring / JAX-RS sources to JDBC,Runtime.exec, and related sinks); it is not in v1.4.0. - SCRAWL has its own pages: SCRAWL and Rosetta Stone.
To add a language, see Adding a Language.
Created by ML / ML Innovations Research Lab. Korg (AI assistant, Grok Bot), contributor. · Repository · Apache License 2.0
Start here
Using Code Cleaner
Contributing