Repository Analysis

openspug/spug

开源运维平台:面向中小型企业设计的轻量级无Agent的自动化运维平台,整合了主机管理、主机批量执行、主机在线终端、文件在线上传下载、应用发布部署、在线任务计划、配置中心、监控、报警等一系列功能。

5.3 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of openspug/spug, a JavaScript project with 11,030 GitHub stars. SynthScan v2.0 examined 27,778 lines of code across 348 source files, recording 119 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 5.3 places this repository in the Low AI signal 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).

5.3
Adjusted Score
5.3
Raw Score
100%
Time Factor
2026-07-09
Last Push
11.0K
Stars
JavaScript
Language
27.8K
Lines of Code
348
Files
119
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 5MEDIUM 7LOW 107

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 119 distinct pattern matches across 7 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.

Deep Nesting38 hits · 38 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/spug.py46CODE
LOWspug_api/libs/spug.py187CODE
LOWspug_api/libs/parser.py36CODE
LOWspug_api/consumer/consumers.py61CODE
LOWspug_api/consumer/utils.py27CODE
LOWspug_api/apps/repository/utils.py66CODE
LOWspug_api/apps/repository/views.py109CODE
LOWspug_api/apps/schedule/utils.py19CODE
LOWspug_api/apps/schedule/builtin.py24CODE
LOWspug_api/apps/schedule/scheduler.py95CODE
LOWspug_api/apps/monitor/executors.py74CODE
LOWspug_api/apps/monitor/executors.py111CODE
LOWspug_api/apps/monitor/scheduler.py51CODE
LOWspug_api/apps/monitor/views.py111CODE
LOWspug_api/apps/apis/config.py49CODE
LOWspug_api/apps/apis/deploy.py37CODE
LOWspug_api/apps/host/add.py30CODE
LOWspug_api/apps/host/utils.py185CODE
LOWspug_api/apps/host/group.py32CODE
LOWspug_api/apps/app/views.py123CODE
LOWspug_api/apps/file/utils.py25CODE
LOWspug_api/apps/file/utils.py73CODE
LOWspug_api/apps/deploy/utils.py76CODE
LOWspug_api/apps/deploy/utils.py131CODE
LOWspug_api/apps/deploy/utils.py283CODE
LOWspug_api/apps/deploy/helper.py25CODE
LOWspug_api/apps/deploy/helper.py191CODE
LOWspug_api/apps/deploy/views.py208CODE
LOWspug_api/apps/deploy/views.py64CODE
LOWspug_api/apps/deploy/views.py103CODE
LOWspug_api/apps/exec/transfer.py121CODE
LOWspug_api/apps/exec/transfer.py31CODE
LOWspug_api/apps/exec/management/commands/runworker.py33CODE
LOWspug_api/apps/exec/management/commands/runworker.py52CODE
LOWspug_api/apps/alarm/views.py113CODE
LOWspug_api/apps/account/models.py44CODE
LOWspug_api/apps/account/views.py187CODE
LOWspug_api/apps/account/management/commands/user.py34CODE
Excessive Try-Catch Wrapping28 hits · 35 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/ldap.py29 except Exception as error:CODE
MEDIUMspug_api/libs/ldap.py17def valid_user(self, username, password):CODE
LOWspug_api/libs/spug.py49 except Exception as e:CODE
MEDIUMspug_api/libs/spug.py46def handle_request(url, data, mode=None):CODE
LOWspug_api/libs/push.py26 except Exception:CODE
MEDIUMspug_api/libs/push.py20def get_contacts(token):CODE
LOWspug_api/consumer/consumers.py112 except Exception as e:CODE
LOWspug_api/apps/repository/utils.py52 except Exception as e:CODE
LOWspug_api/apps/monitor/executors.py28 except Exception as e:CODE
LOWspug_api/apps/monitor/executors.py43 except Exception as e:CODE
LOWspug_api/apps/monitor/executors.py58 except Exception as e:CODE
LOWspug_api/apps/monitor/executors.py70 except Exception as e:CODE
MEDIUMspug_api/apps/monitor/executors.py20def site_check(url, limit):CODE
MEDIUMspug_api/apps/monitor/executors.py36def port_check(addr, port):CODE
MEDIUMspug_api/apps/monitor/executors.py47def ping_check(addr):CODE
MEDIUMspug_api/apps/monitor/executors.py62def host_executor(host, command):CODE
LOWspug_api/apps/apis/deploy.py33 except Exception as e:CODE
LOWspug_api/apps/deploy/utils.py62 except Exception as e:CODE
LOWspug_api/apps/deploy/utils.py124 except Exception as e:CODE
LOWspug_api/apps/deploy/utils.py214 except Exception as e:CODE
LOWspug_api/apps/deploy/utils.py255 except Exception as e:CODE
LOWspug_api/apps/deploy/utils.py304 except Exception as e:CODE
LOWspug_api/apps/deploy/utils.py314 except Exception as e:CODE
LOWspug_api/apps/exec/executors.py68 except Exception as e:CODE
LOWspug_api/apps/exec/management/commands/runworker.py43 except Exception as e:CODE
LOWspug_api/apps/setting/views.py87 except Exception as e:CODE
LOWspug_api/apps/setting/views.py107 except Exception as e:CODE
LOWspug_api/apps/setting/views.py134 except Exception as e:CODE
Unused Imports26 hits · 26 pts
SeverityFileLineSnippetContext
LOWspug_api/spug/settings.py140CODE
LOWspug_api/libs/__init__.py4CODE
LOWspug_api/libs/__init__.py4CODE
LOWspug_api/libs/__init__.py5CODE
LOWspug_api/libs/__init__.py6CODE
LOWspug_api/libs/__init__.py7CODE
LOWspug_api/libs/__init__.py8CODE
LOWspug_api/libs/push.py4CODE
LOWspug_api/consumer/routing.py6CODE
LOWspug_api/apps/home/urls.py6CODE
LOWspug_api/apps/notify/urls.py6CODE
LOWspug_api/apps/repository/urls.py6CODE
LOWspug_api/apps/schedule/builtin.py6CODE
LOWspug_api/apps/schedule/urls.py6CODE
LOWspug_api/apps/monitor/urls.py6CODE
LOWspug_api/apps/host/urls.py6CODE
LOWspug_api/apps/app/urls.py6CODE
LOWspug_api/apps/file/urls.py6CODE
LOWspug_api/apps/config/urls.py6CODE
LOWspug_api/apps/config/views.py9CODE
LOWspug_api/apps/deploy/urls.py6CODE
LOWspug_api/apps/exec/urls.py6CODE
LOWspug_api/apps/alarm/urls.py6CODE
LOWspug_api/apps/account/urls.py6CODE
LOWspug_api/apps/account/urls.py7CODE
LOWspug_api/apps/setting/urls.py6CODE
Cross-Language Confusion5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHspug_api/libs/ssh.py183 command += '[ -n "$ZSH_VERSION" ] && set +o zle && set -o no_nomatch\n'CODE
HIGHspug_api/apps/schedule/executors.py42 attach = 'INTERPRETER=python\ncommand -v python3 &> /dev/null && INTERPRETER=python3'CODE
HIGHspug_api/apps/schedule/builtin.py64 os.system(f'umount -f {transfer_dir} &> /dev/null ; rm -rf {transfer_dir}')CODE
HIGHspug_api/apps/exec/executors.py42 attach = 'INTERPRETER=python\ncommand -v python3 &> /dev/null && INTERPRETER=python3'CODE
HIGHspug_api/apps/exec/transfer.py61 os.system(f'umount -f {base_dir} &> /dev/null ; rm -rf {base_dir}')CODE
Over-Commented Block17 hits · 17 pts
SeverityFileLineSnippetContext
LOWspug_api/spug/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/consumer/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/home/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/notify/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/repository/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/schedule/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/monitor/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/apis/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/host/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/app/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/file/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/config/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/deploy/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/exec/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/alarm/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/account/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/setting/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
Hyper-Verbose Identifiers4 hits · 4 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/ssh.py14def _finalize_pubkey_algorithm(self, key_type):CODE
LOWspug_api/libs/ssh.py125 def _win_exec_command_with_stream(self, command, environment=None):CODE
LOWspug_api/apps/host/utils.py29def check_instance_charge_type(value, supplier):CODE
LOWspug_api/apps/host/utils.py43def check_internet_charge_type(value, supplier):CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/spug.py46 def handle_request(url, data, mode=None):CODE