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.
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).
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 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spug_api/libs/ldap.py | 31 | CODE | |
| LOW | spug_api/libs/spug.py | 39 | CODE | |
| LOW | spug_api/libs/spug.py | 147 | CODE | |
| LOW | spug_api/libs/parser.py | 29 | CODE | |
| LOW | spug_api/libs/utils.py | 133 | CODE | |
| LOW | spug_api/libs/ssh.py | 207 | CODE | |
| LOW | spug_api/libs/middleware.py | 34 | CODE | |
| LOW | spug_api/libs/middleware.py | 55 | CODE | |
| LOW | spug_api/consumer/utils.py | 27 | CODE | |
| LOW | spug_api/apps/pipeline/utils.py | 68 | CODE | |
| LOW | spug_api/apps/pipeline/utils.py | 181 | CODE | |
| LOW | spug_api/apps/pipeline/helper.py | 21 | CODE | |
| LOW | spug_api/apps/pipeline/helper.py | 57 | CODE | |
| LOW | spug_api/apps/pipeline/helper.py | 135 | CODE | |
| LOW | spug_api/apps/pipeline/views.py | 79 | CODE | |
| LOW | spug_api/apps/repository/utils.py | 93 | CODE | |
| LOW | spug_api/apps/schedule/utils.py | 17 | CODE | |
| LOW | spug_api/apps/schedule/builtin.py | 24 | CODE | |
| LOW | spug_api/apps/schedule/builtin.py | 78 | CODE | |
| LOW | spug_api/apps/schedule/scheduler.py | 96 | CODE | |
| LOW | spug_api/apps/monitor/executors.py | 101 | CODE | |
| LOW | spug_api/apps/monitor/executors.py | 139 | CODE | |
| LOW | spug_api/apps/monitor/utils.py | 48 | CODE | |
| LOW | spug_api/apps/monitor/scheduler.py | 51 | CODE | |
| LOW | spug_api/apps/monitor/views.py | 111 | CODE | |
| LOW | spug_api/apps/apis/config.py | 49 | CODE | |
| LOW | spug_api/apps/apis/deploy.py | 37 | CODE | |
| LOW | spug_api/apps/host/add.py | 30 | CODE | |
| LOW | spug_api/apps/host/utils.py | 189 | CODE | |
| LOW | spug_api/apps/host/group.py | 32 | CODE | |
| LOW | spug_api/apps/app/views.py | 123 | CODE | |
| LOW | spug_api/apps/file/utils.py | 25 | CODE | |
| LOW | spug_api/apps/file/utils.py | 73 | CODE | |
| LOW | spug_api/apps/deploy/ext1.py | 18 | CODE | |
| LOW | spug_api/apps/deploy/utils.py | 32 | CODE | |
| LOW | spug_api/apps/deploy/ext2.py | 17 | CODE | |
| LOW | spug_api/apps/deploy/ext2.py | 130 | CODE | |
| LOW | spug_api/apps/deploy/helper.py | 22 | CODE | |
| LOW | spug_api/apps/deploy/helper.py | 77 | CODE | |
| LOW | spug_api/apps/deploy/helper.py | 129 | CODE | |
| LOW | spug_api/apps/deploy/helper.py | 183 | CODE | |
| LOW | spug_api/apps/deploy/helper.py | 224 | CODE | |
| LOW | spug_api/apps/deploy/helper.py | 269 | CODE | |
| LOW | spug_api/apps/deploy/helper.py | 359 | CODE | |
| LOW | spug_api/apps/deploy/views.py | 217 | CODE | |
| LOW | spug_api/apps/deploy/views.py | 64 | CODE | |
| LOW | spug_api/apps/deploy/views.py | 125 | CODE | |
| LOW | spug_api/apps/exec/transfer.py | 122 | CODE | |
| LOW | spug_api/apps/exec/transfer.py | 32 | CODE | |
| LOW | spug_api/apps/exec/views.py | 127 | CODE | |
| LOW | spug_api/apps/exec/management/commands/runworker.py | 33 | CODE | |
| LOW | spug_api/apps/exec/management/commands/runworker.py | 52 | CODE | |
| LOW | spug_api/apps/alarm/views.py | 94 | CODE | |
| LOW | spug_api/apps/account/models.py | 41 | CODE | |
| LOW | spug_api/apps/account/views.py | 184 | CODE | |
| LOW | spug_api/apps/account/management/commands/user.py | 34 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spug_api/libs/ldap.py | 27 | except Exception as error: | CODE |
| LOW | spug_api/libs/ldap.py | 52 | except Exception as error: | CODE |
| LOW | spug_api/libs/ldap.py | 74 | except Exception as error: | CODE |
| MEDIUM | spug_api/libs/ldap.py | 20 | def connect(self): | CODE |
| LOW | spug_api/libs/webhook.py | 44 | except Exception as e: | CODE |
| LOW | spug_api/libs/webhook.py | 50 | except Exception: | CODE |
| LOW | spug_api/libs/webhook.py | 135 | except Exception as e: | CODE |
| MEDIUM | spug_api/libs/webhook.py | 41 | def _request(url, data, mode): | CODE |
| LOW | spug_api/libs/spug.py | 42 | except Exception as e: | CODE |
| MEDIUM | spug_api/libs/spug.py | 39 | def handle_request(url, data, mode=None): | CODE |
| LOW | spug_api/libs/middleware.py | 44 | except Exception: | CODE |
| LOW | spug_api/libs/middleware.py | 80 | except Exception: | CODE |
| LOW | spug_api/consumer/consumers.py | 119 | except Exception as e: | CODE |
| LOW | spug_api/apps/pipeline/utils.py | 173 | except Exception as e: | CODE |
| LOW | spug_api/apps/pipeline/utils.py | 224 | except Exception as e: | CODE |
| LOW | spug_api/apps/pipeline/utils.py | 255 | except Exception as e: | CODE |
| LOW | spug_api/apps/pipeline/utils.py | 289 | except Exception as e: | CODE |
| LOW | spug_api/apps/pipeline/utils.py | 324 | except Exception as e: | CODE |
| LOW | spug_api/apps/repository/utils.py | 69 | except Exception as e: | CODE |
| LOW | spug_api/apps/repository/utils.py | 80 | except Exception as e: | CODE |
| LOW | spug_api/apps/schedule/builtin.py | 42 | except Exception as e: | CODE |
| LOW⚡ | spug_api/apps/schedule/builtin.py | 89 | except Exception as e: | CODE |
| LOW⚡ | spug_api/apps/schedule/builtin.py | 97 | except Exception as e: | CODE |
| LOW⚡ | spug_api/apps/schedule/builtin.py | 107 | except Exception as e: | CODE |
| LOW | spug_api/apps/monitor/executors.py | 29 | except Exception as e: | CODE |
| LOW | spug_api/apps/monitor/executors.py | 44 | except Exception as e: | CODE |
| LOW | spug_api/apps/monitor/executors.py | 85 | except Exception as e: | CODE |
| LOW | spug_api/apps/monitor/executors.py | 97 | except Exception as e: | CODE |
| MEDIUM | spug_api/apps/monitor/executors.py | 21 | def site_check(url, limit): | CODE |
| MEDIUM | spug_api/apps/monitor/executors.py | 37 | def port_check(addr, port): | CODE |
| MEDIUM | spug_api/apps/monitor/executors.py | 65 | def ping_check(addr): | CODE |
| MEDIUM | spug_api/apps/monitor/executors.py | 89 | def host_executor(host, command): | CODE |
| LOW | spug_api/apps/apis/deploy.py | 33 | except Exception as e: | CODE |
| LOW | spug_api/apps/deploy/ext1.py | 69 | except Exception as e: | CODE |
| LOW | spug_api/apps/deploy/ext1.py | 116 | except Exception as e: | CODE |
| LOW | spug_api/apps/deploy/utils.py | 66 | except Exception as e: | CODE |
| LOW | spug_api/apps/deploy/ext2.py | 119 | except Exception as e: | CODE |
| LOW | spug_api/apps/deploy/ext2.py | 157 | except Exception as e: | CODE |
| LOW | spug_api/apps/deploy/ext2.py | 167 | except Exception as e: | CODE |
| LOW | spug_api/apps/exec/executors.py | 71 | except Exception as e: | CODE |
| LOW | spug_api/apps/exec/management/commands/runworker.py | 43 | except Exception as e: | CODE |
| LOW | spug_api/apps/setting/views.py | 176 | except Exception as e: | CODE |
| LOW | spug_api/apps/setting/views.py | 213 | except Exception as e: | CODE |
| LOW | spug_api/apps/setting/views.py | 228 | except Exception as e: | CODE |
| LOW | spug_api/apps/setting/views.py | 244 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spug_api/spug/settings.py | 144 | CODE | |
| LOW | spug_api/libs/__init__.py | 4 | CODE | |
| LOW | spug_api/libs/__init__.py | 4 | CODE | |
| LOW | spug_api/libs/__init__.py | 5 | CODE | |
| LOW | spug_api/libs/__init__.py | 6 | CODE | |
| LOW | spug_api/libs/__init__.py | 7 | CODE | |
| LOW | spug_api/libs/__init__.py | 8 | CODE | |
| LOW | spug_api/libs/ssh.py | 9 | CODE | |
| LOW | spug_api/consumer/routing.py | 6 | CODE | |
| LOW | spug_api/apps/home/urls.py | 6 | CODE | |
| LOW | spug_api/apps/notify/urls.py | 6 | CODE | |
| LOW | spug_api/apps/repository/urls.py | 6 | CODE | |
| LOW | spug_api/apps/repository/views.py | 6 | CODE | |
| LOW | spug_api/apps/repository/views.py | 7 | CODE | |
| LOW | spug_api/apps/schedule/builtin.py | 6 | CODE | |
| LOW | spug_api/apps/schedule/urls.py | 6 | CODE | |
| LOW | spug_api/apps/monitor/urls.py | 6 | CODE | |
| LOW | spug_api/apps/host/urls.py | 6 | CODE | |
| LOW | spug_api/apps/app/urls.py | 6 | CODE | |
| LOW | spug_api/apps/file/urls.py | 6 | CODE | |
| LOW | spug_api/apps/config/urls.py | 6 | CODE | |
| LOW | spug_api/apps/config/views.py | 9 | CODE | |
| LOW | spug_api/apps/deploy/urls.py | 6 | CODE | |
| LOW | spug_api/apps/alarm/urls.py | 6 | CODE | |
| LOW | spug_api/apps/account/urls.py | 6 | CODE | |
| LOW | spug_api/apps/account/urls.py | 7 | CODE | |
| LOW | spug_api/apps/account/views.py | 6 | CODE | |
| LOW | spug_api/apps/account/views.py | 20 | CODE | |
| LOW | spug_api/apps/setting/urls.py | 6 | CODE | |
| LOW | spug_api/apps/setting/views.py | 19 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spug_api/spug/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/consumer/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/home/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/notify/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/pipeline/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/credential/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/repository/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/schedule/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/monitor/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/apis/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/host/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/app/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/file/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/config/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/deploy/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/exec/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/alarm/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/account/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| LOW | spug_api/apps/setting/__init__.py | 1 | # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | spug_api/libs/utils.py | 96 | 'SPUG_PY=$(command -v python3 || command -v python)\n' | CODE |
| HIGH | spug_api/libs/ssh.py | 215 | command += '[ -n "$ZSH_VERSION" ] && set +o zle && set -o no_nomatch && HISTFILE=""\n' | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spug_api/libs/ssh.py | 159 | def _win_exec_command_with_stream(self, command, environment=None): | STRING |
| LOW | spug_api/apps/host/utils.py | 33 | def check_instance_charge_type(value, supplier): | CODE |
| LOW | spug_api/apps/host/utils.py | 47 | def check_internet_charge_type(value, supplier): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spug_api/libs/locale.py | 307 | # Display values of model field choices, returned to the client through the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | spug_api/libs/spug.py | 39 | def handle_request(url, data, mode=None): | CODE |