Repository Analysis

openspug/spug

Spug is a lightweight agent-free automatic operation and maintenance platform designed for small and medium-sized enterprises. It integrates host management, host batch execution, host online terminal, file management, application release and deployment, pipelines, online task planning, configuration center, monitoring, alarm and so on.

4.6 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of openspug/spug, a JavaScript project with 11,055 GitHub stars. SynthScan v2.0 examined 37,242 lines of code across 449 source files, recording 157 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 4.6 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).

4.6
Adjusted Score
4.6
Raw Score
100%
Time Factor
2026-08-29
Last Push
11.1K
Stars
JavaScript
Language
37.2K
Lines of Code
449
Files
157
Pattern Hits
2026-08-29
Scan Date
0.00
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

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.

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 2MEDIUM 7LOW 148

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 157 distinct pattern matches across 8 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 Nesting56 hits · 56 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/ldap.py31CODE
LOWspug_api/libs/spug.py39CODE
LOWspug_api/libs/spug.py147CODE
LOWspug_api/libs/parser.py29CODE
LOWspug_api/libs/utils.py133CODE
LOWspug_api/libs/ssh.py207CODE
LOWspug_api/libs/middleware.py34CODE
LOWspug_api/libs/middleware.py55CODE
LOWspug_api/consumer/utils.py27CODE
LOWspug_api/apps/pipeline/utils.py68CODE
LOWspug_api/apps/pipeline/utils.py181CODE
LOWspug_api/apps/pipeline/helper.py21CODE
LOWspug_api/apps/pipeline/helper.py57CODE
LOWspug_api/apps/pipeline/helper.py135CODE
LOWspug_api/apps/pipeline/views.py79CODE
LOWspug_api/apps/repository/utils.py93CODE
LOWspug_api/apps/schedule/utils.py17CODE
LOWspug_api/apps/schedule/builtin.py24CODE
LOWspug_api/apps/schedule/builtin.py78CODE
LOWspug_api/apps/schedule/scheduler.py96CODE
LOWspug_api/apps/monitor/executors.py101CODE
LOWspug_api/apps/monitor/executors.py139CODE
LOWspug_api/apps/monitor/utils.py48CODE
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.py189CODE
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/ext1.py18CODE
LOWspug_api/apps/deploy/utils.py32CODE
LOWspug_api/apps/deploy/ext2.py17CODE
LOWspug_api/apps/deploy/ext2.py130CODE
LOWspug_api/apps/deploy/helper.py22CODE
LOWspug_api/apps/deploy/helper.py77CODE
LOWspug_api/apps/deploy/helper.py129CODE
LOWspug_api/apps/deploy/helper.py183CODE
LOWspug_api/apps/deploy/helper.py224CODE
LOWspug_api/apps/deploy/helper.py269CODE
LOWspug_api/apps/deploy/helper.py359CODE
LOWspug_api/apps/deploy/views.py217CODE
LOWspug_api/apps/deploy/views.py64CODE
LOWspug_api/apps/deploy/views.py125CODE
LOWspug_api/apps/exec/transfer.py122CODE
LOWspug_api/apps/exec/transfer.py32CODE
LOWspug_api/apps/exec/views.py127CODE
LOWspug_api/apps/exec/management/commands/runworker.py33CODE
LOWspug_api/apps/exec/management/commands/runworker.py52CODE
LOWspug_api/apps/alarm/views.py94CODE
LOWspug_api/apps/account/models.py41CODE
LOWspug_api/apps/account/views.py184CODE
LOWspug_api/apps/account/management/commands/user.py34CODE
Excessive Try-Catch Wrapping45 hits · 54 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/ldap.py27 except Exception as error:CODE
LOWspug_api/libs/ldap.py52 except Exception as error:CODE
LOWspug_api/libs/ldap.py74 except Exception as error:CODE
MEDIUMspug_api/libs/ldap.py20def connect(self):CODE
LOWspug_api/libs/webhook.py44 except Exception as e:CODE
LOWspug_api/libs/webhook.py50 except Exception:CODE
LOWspug_api/libs/webhook.py135 except Exception as e:CODE
MEDIUMspug_api/libs/webhook.py41def _request(url, data, mode):CODE
LOWspug_api/libs/spug.py42 except Exception as e:CODE
MEDIUMspug_api/libs/spug.py39def handle_request(url, data, mode=None):CODE
LOWspug_api/libs/middleware.py44 except Exception:CODE
LOWspug_api/libs/middleware.py80 except Exception:CODE
LOWspug_api/consumer/consumers.py119 except Exception as e:CODE
LOWspug_api/apps/pipeline/utils.py173 except Exception as e:CODE
LOWspug_api/apps/pipeline/utils.py224 except Exception as e:CODE
LOWspug_api/apps/pipeline/utils.py255 except Exception as e:CODE
LOWspug_api/apps/pipeline/utils.py289 except Exception as e:CODE
LOWspug_api/apps/pipeline/utils.py324 except Exception as e:CODE
LOWspug_api/apps/repository/utils.py69 except Exception as e:CODE
LOWspug_api/apps/repository/utils.py80 except Exception as e:CODE
LOWspug_api/apps/schedule/builtin.py42 except Exception as e:CODE
LOWspug_api/apps/schedule/builtin.py89 except Exception as e:CODE
LOWspug_api/apps/schedule/builtin.py97 except Exception as e:CODE
LOWspug_api/apps/schedule/builtin.py107 except Exception as e:CODE
LOWspug_api/apps/monitor/executors.py29 except Exception as e:CODE
LOWspug_api/apps/monitor/executors.py44 except Exception as e:CODE
LOWspug_api/apps/monitor/executors.py85 except Exception as e:CODE
LOWspug_api/apps/monitor/executors.py97 except Exception as e:CODE
MEDIUMspug_api/apps/monitor/executors.py21def site_check(url, limit):CODE
MEDIUMspug_api/apps/monitor/executors.py37def port_check(addr, port):CODE
MEDIUMspug_api/apps/monitor/executors.py65def ping_check(addr):CODE
MEDIUMspug_api/apps/monitor/executors.py89def host_executor(host, command):CODE
LOWspug_api/apps/apis/deploy.py33 except Exception as e:CODE
LOWspug_api/apps/deploy/ext1.py69 except Exception as e:CODE
LOWspug_api/apps/deploy/ext1.py116 except Exception as e:CODE
LOWspug_api/apps/deploy/utils.py66 except Exception as e:CODE
LOWspug_api/apps/deploy/ext2.py119 except Exception as e:CODE
LOWspug_api/apps/deploy/ext2.py157 except Exception as e:CODE
LOWspug_api/apps/deploy/ext2.py167 except Exception as e:CODE
LOWspug_api/apps/exec/executors.py71 except Exception as e:CODE
LOWspug_api/apps/exec/management/commands/runworker.py43 except Exception as e:CODE
LOWspug_api/apps/setting/views.py176 except Exception as e:CODE
LOWspug_api/apps/setting/views.py213 except Exception as e:CODE
LOWspug_api/apps/setting/views.py228 except Exception as e:CODE
LOWspug_api/apps/setting/views.py244 except Exception as e:CODE
Unused Imports30 hits · 30 pts
SeverityFileLineSnippetContext
LOWspug_api/spug/settings.py144CODE
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/ssh.py9CODE
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/repository/views.py6CODE
LOWspug_api/apps/repository/views.py7CODE
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/alarm/urls.py6CODE
LOWspug_api/apps/account/urls.py6CODE
LOWspug_api/apps/account/urls.py7CODE
LOWspug_api/apps/account/views.py6CODE
LOWspug_api/apps/account/views.py20CODE
LOWspug_api/apps/setting/urls.py6CODE
LOWspug_api/apps/setting/views.py19CODE
Over-Commented Block19 hits · 19 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/pipeline/__init__.py1# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spugCOMMENT
LOWspug_api/apps/credential/__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
Cross-Language Confusion2 hits · 8 pts
SeverityFileLineSnippetContext
HIGHspug_api/libs/utils.py96 'SPUG_PY=$(command -v python3 || command -v python)\n'CODE
HIGHspug_api/libs/ssh.py215 command += '[ -n "$ZSH_VERSION" ] && set +o zle && set -o no_nomatch && HISTFILE=""\n'STRING
Hyper-Verbose Identifiers3 hits · 2 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/ssh.py159 def _win_exec_command_with_stream(self, command, environment=None):STRING
LOWspug_api/apps/host/utils.py33def check_instance_charge_type(value, supplier):CODE
LOWspug_api/apps/host/utils.py47def check_internet_charge_type(value, supplier):CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/locale.py307# Display values of model field choices, returned to the client through theCOMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWspug_api/libs/spug.py39 def handle_request(url, data, mode=None):CODE