The pattern matching swiss knife
This report presents the forensic synthetic code analysis of VirusTotal/yara, a C project with 9,752 GitHub stars. SynthScan v2.0 examined 93,538 lines of code across 179 source files, recording 316 pattern matches distributed across 3 syntactic categories. The overall adjusted score of 3.4 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 316 distinct pattern matches across 3 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .readthedocs.yaml | 21 | # builder: "dirhtml" | COMMENT |
| LOW | tests/test-rules.c | 3941 | case 2: | COMMENT |
| LOW | docs/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/conf.py | 21 | #sys.path.insert(0, os.path.abspath('.')) | COMMENT |
| LOW | docs/conf.py | 41 | COMMENT | |
| LOW | docs/conf.py | 61 | COMMENT | |
| LOW | docs/conf.py | 121 | # "<project> v<release> documentation". | COMMENT |
| LOW | docs/conf.py | 141 | # Add any extra paths that contain custom files (such as robots.txt or | COMMENT |
| LOW | docs/conf.py | 161 | # If false, no module index is generated. | COMMENT |
| LOW | docs/conf.py | 181 | # base URL from which the finished HTML is served. | COMMENT |
| LOW | docs/conf.py | 201 | #'preamble': '', | COMMENT |
| LOW | docs/conf.py | 261 | #texinfo_domain_indices = True | COMMENT |
| LOW | cli/unicode.h | 41 | #define _T(x) x | COMMENT |
| LOW | cli/unicode.h | 61 | #define _tfopen fopen | COMMENT |
| LOW | cli/yara.c | 41 | #else | COMMENT |
| LOW | cli/yara.c | 61 | #include "threading.h" | COMMENT |
| LOW | libyara/filemap.c | 41 | #include <yara/filemap.h> | COMMENT |
| LOW | libyara/filemap.c | 61 | //////////////////////////////////////////////////////////////////////////////// | COMMENT |
| LOW | libyara/filemap.c | 161 | #include <sys/vfs.h> | COMMENT |
| LOW | libyara/filemap.c | 261 | //////////////////////////////////////////////////////////////////////////////// | COMMENT |
| LOW | libyara/scanner.c | 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | COMMENT |
| LOW | libyara/object.c | 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | COMMENT |
| LOW | libyara/exec.c | 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | COMMENT |
| LOW | libyara/exec.c | 41 | #include <yara/mem.h> | COMMENT |
| LOW | libyara/exec.c | 101 | #define check_object_canary(o) \ | COMMENT |
| LOW | libyara/atoms.c | 81 | #include <string.h> | COMMENT |
| LOW | libyara/atoms.c | 121 | // X? and ?X contribute 4 points. An additional boost consisting in 2x the | COMMENT |
| LOW | libyara/atoms.c | 201 | return YR_MAX_ATOM_QUALITY - 22 * YR_MAX_ATOM_LENGTH + quality; | COMMENT |
| LOW | libyara/atoms.c | 241 | // Returns a numeric value indicating the quality of an atom. The quality is | COMMENT |
| LOW | libyara/atoms.c | 441 | item->next = list2; | COMMENT |
| LOW | libyara/atoms.c | 621 | *atoms_quality = min_quality; | COMMENT |
| LOW | libyara/atoms.c | 681 | } | COMMENT |
| LOW | libyara/atoms.c | 1181 | } | COMMENT |
| LOW | libyara/grammar.c | 61 | #define YYPUSH 0 | COMMENT |
| LOW | libyara/grammar.c | 81 | #include <string.h> | COMMENT |
| LOW | libyara/grammar.c | 101 | #endif | COMMENT |
| LOW | libyara/grammar.c | 201 | COMMENT | |
| LOW | libyara/grammar.c | 221 | # else | COMMENT |
| LOW | libyara/grammar.c | 321 | #define _META_ 263 | COMMENT |
| LOW | libyara/grammar.c | 341 | #define _NOCASE_ 283 | COMMENT |
| LOW | libyara/grammar.c | 361 | #define _IMPORT_ 303 | COMMENT |
| LOW | libyara/grammar.c | 601 | (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of | COMMENT |
| LOW | libyara/grammar.c | 621 | #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ | COMMENT |
| LOW | libyara/grammar.c | 641 | # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX | COMMENT |
| LOW | libyara/grammar.c | 681 | # endif | COMMENT |
| LOW | libyara/grammar.c | 701 | # define YY_ATTRIBUTE_UNUSED | COMMENT |
| LOW | libyara/grammar.c | 721 | _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ | COMMENT |
| LOW | libyara/grammar.c | 741 | # define YY_IGNORE_USELESS_CAST_END \ | COMMENT |
| LOW | libyara/grammar.c | 761 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ | COMMENT |
| LOW | libyara/grammar.c | 781 | /* Pacify GCC's 'empty if-body' warning. */ | COMMENT |
| LOW | libyara/grammar.c | 801 | # define EXIT_SUCCESS 0 | COMMENT |
| LOW | libyara/rules.c | 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | COMMENT |
| LOW | libyara/hex_grammar.h | 61 | _NUMBER_ = 262 /* _NUMBER_ */ | COMMENT |
| LOW | libyara/re_lexer.c | 1 | #line 1 "libyara/re_lexer.c" | COMMENT |
| LOW | libyara/re_lexer.c | 21 | #endif | COMMENT |
| LOW | libyara/re_lexer.c | 41 | #ifdef yy_scan_bytes | COMMENT |
| LOW | libyara/re_lexer.c | 61 | #else | COMMENT |
| LOW | libyara/re_lexer.c | 81 | #endif | COMMENT |
| LOW | libyara/re_lexer.c | 101 | #ifdef yylex_init | COMMENT |
| LOW | libyara/re_lexer.c | 121 | #else | COMMENT |
| 253 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/conf.py | 6 | # This file is execfile()d with the current directory set to its | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/conf.py | 15 | CODE | |
| LOW | docs/conf.py | 16 | CODE |