AI Slop Code RIsk Monitor

openwrt-xiaomi/xmir-patcher

Firmware patcher for Xiaomi routers

27.7 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for openwrt-xiaomi/xmir-patcher, a Python project with 3,636 GitHub stars. SynthScan examined 17,709 lines of code across 103 source files, recording 379 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 27.7 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

27.7
Adjusted Signal
27.7
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
3.6K
Stars
Python
Language
17.7K
Lines of Code
103
Files
379
Pattern Hits
2026-10-12
Scan Date
0.25
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 24.9/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 101 finding(s).

Hallucinated Dependency & Supply Chain Risk 34.6/100 · MEDIUM

Are imports declared and package/API names verified? 143 finding(s).

Agent Over-Engineering Ratio 49.4/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 138 finding(s).

PR Review Velocity Impact 79.2/100 · CRITICAL

Which changes need focused human review? 379 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 26MEDIUM 24LOW 329

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 379 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Unused Imports139 hits · 136 pts
SeverityFileLineSnippetContext
LOWshexec.py4CODE
LOWshexec.py5CODE
LOWshexec.py7CODE
LOWshexec.py8CODE
LOWshexec.py9CODE
LOWshexec.py10CODE
LOWshexec.py11CODE
LOWinstall_lang.py10CODE
LOWinstall_lang.py12CODE
LOWdevtree.py6CODE
LOWgateway.py11CODE
LOWgateway.py20CODE
LOWgateway.py22CODE
LOWgateway.py23CODE
LOWgateway.py839CODE
LOWxqimage.py7CODE
LOWxqimage.py11CODE
LOWxqimage.py12CODE
LOWxqimage.py32CODE
LOWpo2lmo.py3CODE
LOWpo2lmo.py5CODE
LOWenvbuffer.py4CODE
LOWenvbuffer.py5CODE
LOWenvbuffer.py6CODE
LOWenvbuffer.py7CODE
LOWconnect.py4CODE
LOWconnect.py6CODE
LOWconnect.py8CODE
LOWconnect.py9CODE
LOWconnect.py28CODE
LOWinstall_bl.py7CODE
LOWconnect3.py4CODE
LOWconnect3.py5CODE
LOWconnect3.py7CODE
LOWconnect3.py8CODE
LOWconnect3.py9CODE
LOWconnect3.py11CODE
LOWconnect3.py12CODE
LOWconnect3.py15CODE
LOWconnect3.py16CODE
LOWconnect3.py17CODE
LOWconnect3.py18CODE
LOWconnect3.py19CODE
LOWconnect7.py8CODE
LOWconnect7.py9CODE
LOWconnect7.py112CODE
LOWconnect6.py4CODE
LOWconnect6.py9CODE
LOWconnect6.py10CODE
LOWlmo2po.py3CODE
LOWread_dmesg.py5CODE
LOWread_dmesg.py6CODE
LOWread_dmesg.py8CODE
LOWread_dmesg.py10CODE
LOWconnect2.py4CODE
LOWconnect2.py5CODE
LOWconnect2.py6CODE
LOWconnect2.py7CODE
LOWconnect2.py8CODE
LOWconnect2.py9CODE
79 more matches not shown…
Empty Error Handlers22 hits · 110 pts
SeverityFileLineSnippetContext
HIGHgateway.py216except Exception:CODE
HIGHgateway.py524except Exception:CODE
HIGHgateway.py689except Exception:CODE
HIGHgateway.py693except Exception:CODE
HIGHgateway.py778except Exception:CODE
HIGHgateway.py782except Exception:CODE
HIGHgateway.py142except Exception:CODE
HIGHgateway.py538except Exception:CODE
HIGHgateway.py797except Exception:CODE
HIGHgateway.py918except Exception:CODE
HIGHgateway.py1035except Exception:CODE
HIGHgateway.py534except Exception:CODE
HIGHgateway.py909except Exception:CODE
HIGHgateway.py1097except Exception:CODE
HIGHgateway.py1154except Exception:CODE
HIGHread_info.py658except Exception:CODE
HIGHread_info.py668except Exception:CODE
HIGHconnect5.py266except Exception:CODE
HIGHinstall_fw.py412except ValueError:CODE
HIGHinstall_fw.py107except Exception:CODE
HIGHactivate_boot.py136except Exception:CODE
HIGHactivate_boot.py121except Exception:CODE
Excessive Try-Catch Wrapping99 hits · 94 pts
SeverityFileLineSnippetContext
MEDIUMgateway.py775def ssh_close(self):CODE
MEDIUMgateway.py828def check_telnet(self, timeout = 2, port = 23, verbose = 0):CODE
LOW⚡gateway.py516 except Exception as e:CODE
LOW⚡gateway.py524 except Exception:CODE
LOW⚡gateway.py534 except Exception:CODE
LOW⚡gateway.py538 except Exception:CODE
LOW⚡gateway.py680 except Exception as e:CODE
LOW⚡gateway.py685 except Exception as e:CODE
LOW⚡gateway.py689 except Exception:CODE
LOW⚡gateway.py693 except Exception:CODE
LOW⚡gateway.py903 except Exception as e:CODE
LOW⚡gateway.py909 except Exception:CODE
LOW⚡gateway.py918 except Exception:CODE
LOW⚡gateway.py926 except Exception:CODE
LOWgateway.py142 except Exception:CODE
LOWgateway.py155 except Exception:CODE
LOWgateway.py189 except Exception as e:CODE
LOWgateway.py216 except Exception:CODE
LOWgateway.py253 except Exception:CODE
LOWgateway.py326 except Exception:CODE
LOWgateway.py665 except Exception:CODE
LOWgateway.py778 except Exception:CODE
LOWgateway.py782 except Exception:CODE
LOWgateway.py797 except Exception:CODE
LOWgateway.py809 except Exception as e:CODE
LOWgateway.py821 except Exception as e:CODE
LOWgateway.py833 except Exception as e:CODE
LOWgateway.py842 except Exception as e:CODE
LOWgateway.py874 except Exception as e:CODE
LOWgateway.py981 except Exception as e:CODE
LOWgateway.py1025 except Exception as e:CODE
LOWgateway.py1035 except Exception:CODE
LOWgateway.py1097 except Exception:CODE
LOWgateway.py1154 except Exception:CODE
LOWconnect.py74 except Exception:CODE
LOWconnect3.py203 except Exception as e:CODE
MEDIUMconnect3.py194def device_factory_reset(timeout = 17, format_user_data = False):CODE
LOWconnect7.py29 except Exception:CODE
LOWconnect7.py253 except Exception:STRING
LOW⚡read_info.py658 except Exception:CODE
LOW⚡read_info.py668 except Exception:CODE
LOW⚡read_info.py676 except Exception:CODE
LOW⚡read_info.py682 except Exception:CODE
LOWread_info.py115 except Exception:CODE
LOWread_info.py449 except Exception:CODE
LOWread_info.py531 except Exception:CODE
LOWread_info.py591 except Exception:CODE
LOWread_info.py731 except Exception:CODE
LOWread_info.py773 except Exception:CODE
LOWread_info.py872 except Exception:CODE
LOWread_info.py942 except Exception:CODE
LOWread_info.py1007 except Exception:CODE
LOWread_info.py1103 except Exception:CODE
LOWconnect5.py72 except Exception as e:CODE
LOWconnect5.py84 except Exception:CODE
LOWconnect5.py137 except Exception:CODE
LOWconnect5.py155 except Exception:CODE
LOWconnect5.py170 except Exception:CODE
LOWconnect5.py261 except Exception:CODE
LOWconnect5.py266 except Exception:CODE
39 more matches not shown…
Deep Nesting61 hits · 56 pts
SeverityFileLineSnippetContext
LOWdevtree.py52CODE
LOWdevtree.py124CODE
LOWgateway.py280CODE
LOWgateway.py483CODE
LOWgateway.py697CODE
LOWgateway.py947CODE
LOWgateway.py1042CODE
LOWgateway.py1104CODE
LOWgateway.py1195CODE
LOWxqimage.py184CODE
LOWpo2lmo.py128CODE
LOWpo2lmo.py182CODE
LOWlmo2po.py71CODE
LOWlmo2po.py89CODE
LOWread_info.py133CODE
LOWread_info.py161CODE
LOWread_info.py268CODE
LOWread_info.py329CODE
LOWread_info.py824CODE
LOWinstall_fw.py234CODE
LOWinstall_fw.py316CODE
LOWinstall_fw.py416CODE
LOWinstall_fw.py839CODE
LOWinstall_fw.py1027CODE
LOWxmir_base/fdt/__init__.py400CODE
LOWxmir_base/fdt/__init__.py545CODE
LOWxmir_base/fdt/__init__.py608CODE
LOWxmir_base/fdt/__init__.py91CODE
LOWxmir_base/fdt/__init__.py198CODE
LOWxmir_base/fdt/__init__.py258CODE
LOWxmir_base/fdt/items.py582CODE
LOWxmir_base/fdt/items.py680CODE
LOWxmir_base/fdt/__main__.py164CODE
LOWxmir_base/ubireader/utils.py26CODE
LOWxmir_base/ubireader/utils.py84CODE
LOWxmir_base/ubireader/debug.py36CODE
LOWxmir_base/ubireader/ubi/display.py111CODE
LOWxmir_base/ubireader/ubi/display.py136CODE
LOWxmir_base/ubireader/ubi/block/sort.py91CODE
LOWxmir_base/ubireader/ubi/block/__init__.py106CODE
LOWxmir_base/ubireader/ubi/block/__init__.py160CODE
LOWxmir_base/ubireader/ubifs/list.py129CODE
LOWxmir_base/ubireader/ubifs/list.py146CODE
LOWxmir_base/ubireader/ubifs/display.py29CODE
LOWxmir_base/ubireader/ubifs/display.py44CODE
LOWxmir_base/ubireader/ubifs/display.py72CODE
LOWxmir_base/ubireader/ubifs/walk.py25CODE
LOWxmir_base/ubireader/ubifs/output.py61CODE
LOWxmir_base/ubireader/ubifs/output.py175CODE
LOWxmir_base/ubireader/scripts/ubireader_display_info.py34CODE
LOWxmir_base/ubireader/scripts/ubireader_list_files.py36CODE
LOWxmir_base/ubireader/scripts/ubireader_display_blocks.py36CODE
LOWxmir_base/ubireader/scripts/ubireader_utils_info.py50CODE
LOWxmir_base/ubireader/scripts/ubireader_utils_info.py140CODE
LOWxmir_base/ubireader/scripts/ubireader_utils_info.py164CODE
LOWxmir_base/ubireader/scripts/ubireader_extract_images.py41CODE
LOWxmir_base/ubireader/scripts/ubireader_extract_files.py47CODE
LOWxmir_base/telnetlib/telnetlib.py292CODE
LOWxmir_base/telnetlib/telnetlib.py422CODE
LOWxmir_base/telnetlib/telnetlib.py535CODE
1 more matches not shown…
Over-Commented Block34 hits · 34 pts
SeverityFileLineSnippetContext
LOWxmir_base/fdt/misc.py1# Copyright 2017 Martin OlejarCOMMENT
LOWxmir_base/fdt/header.py1# Copyright 2017 Martin OlejarCOMMENT
LOWxmir_base/fdt/__init__.py1# Copyright 2017 Martin OlejarCOMMENT
LOWxmir_base/fdt/items.py1# Copyright 2017 Martin OlejarCOMMENT
LOWxmir_base/fdt/__main__.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/utils.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/debug.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/settings.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi_io.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/__init__.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/display.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/volume.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/defines.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/defines.py21# the GNU General Public License for more details.COMMENT
LOWxmir_base/ubireader/ubi/headers.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/image.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/block/layout.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/block/sort.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubi/block/__init__.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubifs/misc.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubifs/list.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubifs/__init__.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubifs/display.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubifs/walk.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubifs/defines.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubifs/defines.py21# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License forCOMMENT
LOWxmir_base/ubireader/ubifs/nodes.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/ubifs/output.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/scripts/ubireader_display_info.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/scripts/ubireader_list_files.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/scripts/ubireader_display_blocks.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/scripts/ubireader_utils_info.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/scripts/ubireader_extract_images.py1#!/usr/bin/env pythonCOMMENT
LOWxmir_base/ubireader/scripts/ubireader_extract_files.py1#!/usr/bin/env pythonCOMMENT
Decorative Section Separators13 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUM⚡gateway.py519 #===============================================================================COMMENT
MEDIUM⚡gateway.py528 #===============================================================================COMMENT
MEDIUMgateway.py590 #===============================================================================COMMENT
MEDIUMgateway.py615 #===============================================================================COMMENT
MEDIUMgateway.py632 #===============================================================================COMMENT
MEDIUMgateway.py653 #===============================================================================COMMENT
MEDIUMgateway.py1359#===============================================================================COMMENT
MEDIUMgateway.py1429#===============================================================================COMMENT
MEDIUMinstall_fw.py1142# =====================================================================COMMENT
MEDIUMinstall_ssh.py141# ---------------------------------------------------------------------------STRING
MEDIUMinstall_ssh.py195# ---------------------------------------------------------------------------STRING
MEDIUMxmir_base/ubireader/ubi/defines.py9# --------------------------COMMENT
MEDIUMxmir_base/ubireader/ubifs/defines.py9# --------------------------COMMENT
Cross-Language Confusion4 hits · 15 pts
SeverityFileLineSnippetContext
HIGHactivate_boot.py155 if ( flag_try_sys1_failed > 1 || flag_try_sys2_failed > 1 || flag_ota_reboot > 1 || flag_last_success > 1 )STRING
HIGHactivate_boot.py158 if ( flag_try_sys1_failed == 1 && flag_try_sys2_failed == 1 )STRING
HIGHinstall_ssh.py65 grep -v "/ssh_patch.sh" $FILE_CRON > $FILE_CRON.new || echo "" > $FILE_CRON.newCODE
HIGHunlock_features.py264 grep -v "/unlockf_patch.sh" $FILE_CRON > $FILE_CRON.new || echo "" > $FILE_CRON.newCODE
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMconnect4.py70 # Create an SSL context object and configure it for the clientCOMMENT
MEDIUMconnect4.py75 # Create a TCP socket objectCOMMENT
MEDIUMxmir_base/ubireader/ubifs/defines.py11# This file is part of UBIFS.COMMENT
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWgateway.py380CODE
LOWconnect4.py87CODE
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWxmir_base/fdt/__init__.py26__all__ = [CODE
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippetContext
LOWxmir_base/telnetlib/telnetlib.py418 def set_option_negotiation_callback(self, callback):CODE