AI Slop Code RIsk Monitor

nonebot/nonebot2

跨平台 Python 异步聊天机器人框架 / Asynchronous multi-platform chatbot framework written in Python

4.4 Low pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for nonebot/nonebot2, a Python project with 7,738 GitHub stars. SynthScan examined 95,120 lines of code across 540 source files, recording 338 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 4.4 (Low 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.

4.4
Adjusted Signal
4.4
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
7.7K
Stars
Python
Language
95.1K
Lines of Code
540
Files
338
Pattern Hits
2026-10-12
Scan Date
0.04
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 4.1/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 8.5/100 · LOW

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

Agent Over-Engineering Ratio 11.4/100 · LOW

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

PR Review Velocity Impact 21.6/100 · LOW

Which changes need focused human review? 338 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 24MEDIUM 3LOW 311

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 338 distinct pattern matches across 9 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 Imports186 hits · 169 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py25CODE
LOWtests/plugins/plugin/__init__.py1CODE
LOWtests/plugins/nested/plugins/nested_subplugin.py1CODE
LOWnonebot/params.py33CODE
LOWnonebot/params.py34CODE
LOWnonebot/params.py35CODE
LOWnonebot/params.py36CODE
LOWnonebot/params.py37CODE
LOWnonebot/params.py38CODE
LOWnonebot/params.py39CODE
LOWnonebot/params.py40CODE
LOWnonebot/params.py42CODE
LOWnonebot/params.py43CODE
LOWnonebot/params.py44CODE
LOWnonebot/params.py45CODE
LOWnonebot/params.py46CODE
LOWnonebot/compat.py89CODE
LOWnonebot/compat.py90CODE
LOWnonebot/compat.py100CODE
LOWnonebot/compat.py306CODE
LOWnonebot/matcher.py10CODE
LOWnonebot/matcher.py11CODE
LOWnonebot/matcher.py12CODE
LOWnonebot/matcher.py13CODE
LOWnonebot/matcher.py14CODE
LOWnonebot/matcher.py15CODE
LOWnonebot/matcher.py16CODE
LOWnonebot/matcher.py17CODE
LOWnonebot/matcher.py18CODE
LOWnonebot/matcher.py19CODE
LOWnonebot/permission.py15CODE
LOWnonebot/permission.py17CODE
LOWnonebot/log.py27CODE
LOWnonebot/log.py27CODE
LOWnonebot/__init__.py52CODE
LOWnonebot/__init__.py340CODE
LOWnonebot/__init__.py341CODE
LOWnonebot/__init__.py342CODE
LOWnonebot/__init__.py343CODE
LOWnonebot/__init__.py344CODE
LOWnonebot/__init__.py346CODE
LOWnonebot/__init__.py347CODE
LOWnonebot/__init__.py348CODE
LOWnonebot/__init__.py349CODE
LOWnonebot/__init__.py350CODE
LOWnonebot/__init__.py351CODE
LOWnonebot/__init__.py352CODE
LOWnonebot/__init__.py353CODE
LOWnonebot/__init__.py354CODE
LOWnonebot/__init__.py355CODE
LOWnonebot/__init__.py356CODE
LOWnonebot/__init__.py357CODE
LOWnonebot/__init__.py358CODE
LOWnonebot/__init__.py359CODE
LOWnonebot/__init__.py360CODE
LOWnonebot/__init__.py361CODE
LOWnonebot/__init__.py362CODE
LOWnonebot/__init__.py363CODE
LOWnonebot/__init__.py364CODE
LOWnonebot/__init__.py365CODE
126 more matches not shown…
Cross-File Repetition24 hits · 120 pts
SeverityFileLineSnippetContext
HIGHwebsite/docs/developer/adapter-writing.md0根据平台事件的特性,转换平台 payload 为具体 event event 模型继承自 pydantic.basemodel,具体请参考 pydantic 文档STRING
HIGH…sioned_docs/version-2.5.0/developer/adapter-writing.md0根据平台事件的特性,转换平台 payload 为具体 event event 模型继承自 pydantic.basemodel,具体请参考 pydantic 文档STRING
HIGH…sioned_docs/version-2.4.4/developer/adapter-writing.md0根据平台事件的特性,转换平台 payload 为具体 event event 模型继承自 pydantic.basemodel,具体请参考 pydantic 文档STRING
HIGH…sioned_docs/version-2.4.3/developer/adapter-writing.md0根据平台事件的特性,转换平台 payload 为具体 event event 模型继承自 pydantic.basemodel,具体请参考 pydantic 文档STRING
HIGHwebsite/docs/best-practice/database/developer/README.md0first revision 迁移 id: xxxxxxxxxxxx 父迁移: 创建时间: 2006-01-02 15:04:05.999999STRING
HIGH…rsion-2.5.0/best-practice/database/developer/README.md0first revision 迁移 id: xxxxxxxxxxxx 父迁移: 创建时间: 2006-01-02 15:04:05.999999STRING
HIGH…rsion-2.4.4/best-practice/database/developer/README.md0first revision 迁移 id: xxxxxxxxxxxx 父迁移: 创建时间: 2006-01-02 15:04:05.999999STRING
HIGH…rsion-2.4.3/best-practice/database/developer/README.md0first revision 迁移 id: xxxxxxxxxxxx 父迁移: 创建时间: 2006-01-02 15:04:05.999999STRING
HIGHwebsite/docs/best-practice/alconna/command.md0output 以下是建议的输入: * <abc: int> * --help * -h * -sct * --shortcut * foo * barSTRING
HIGH…ed_docs/version-2.5.0/best-practice/alconna/command.md0output 以下是建议的输入: * <abc: int> * --help * -h * -sct * --shortcut * foo * barSTRING
HIGH…ed_docs/version-2.4.4/best-practice/alconna/command.md0output 以下是建议的输入: * <abc: int> * --help * -h * -sct * --shortcut * foo * barSTRING
HIGH…ed_docs/version-2.4.3/best-practice/alconna/command.md0output 以下是建议的输入: * <abc: int> * --help * -h * -sct * --shortcut * foo * barSTRING
HIGHwebsite/docs/best-practice/alconna/uniseg/segment.md0- 点击 action 类型的按钮时会触发一个关于 按钮回调 事件,该事件的 button 资源会包含上述 id - 点击 link 类型的按钮时会打开一个链接或者小程序,该链接的地址为 `url` - 点击 input 类型的按钮时会在用STRING
HIGH…/version-2.5.0/best-practice/alconna/uniseg/segment.md0- 点击 action 类型的按钮时会触发一个关于 按钮回调 事件,该事件的 button 资源会包含上述 id - 点击 link 类型的按钮时会打开一个链接或者小程序,该链接的地址为 `url` - 点击 input 类型的按钮时会在用STRING
HIGH…/version-2.4.4/best-practice/alconna/uniseg/segment.md0- 点击 action 类型的按钮时会触发一个关于 按钮回调 事件,该事件的 button 资源会包含上述 id - 点击 link 类型的按钮时会打开一个链接或者小程序,该链接的地址为 `url` - 点击 input 类型的按钮时会在用STRING
HIGH…/version-2.4.3/best-practice/alconna/uniseg/segment.md0- 点击 action 类型的按钮时会触发一个关于 按钮回调 事件,该事件的 button 资源会包含上述 id - 点击 link 类型的按钮时会打开一个链接或者小程序,该链接的地址为 `url` - 点击 input 类型的按钮时会在用STRING
HIGHwebsite/docs/best-practice/alconna/uniseg/segment.md0仅建议使用下列值:primary, secondary, success, warning, danger, info, link, grey, blue 此处规定 `grey` 与 `secondary` 等同, `blue` 与 `prSTRING
HIGH…/version-2.5.0/best-practice/alconna/uniseg/segment.md0仅建议使用下列值:primary, secondary, success, warning, danger, info, link, grey, blue 此处规定 `grey` 与 `secondary` 等同, `blue` 与 `prSTRING
HIGH…/version-2.4.4/best-practice/alconna/uniseg/segment.md0仅建议使用下列值:primary, secondary, success, warning, danger, info, link, grey, blue 此处规定 `grey` 与 `secondary` 等同, `blue` 与 `prSTRING
HIGH…/version-2.4.3/best-practice/alconna/uniseg/segment.md0仅建议使用下列值:primary, secondary, success, warning, danger, info, link, grey, blue 此处规定 `grey` 与 `secondary` 等同, `blue` 与 `prSTRING
HIGHwebsite/docs/best-practice/alconna/uniseg/segment.md0- admin: 仅管理者可操作 - all: 所有人可操作 - list[at]: 指定用户/身份组可操作STRING
HIGH…/version-2.5.0/best-practice/alconna/uniseg/segment.md0- admin: 仅管理者可操作 - all: 所有人可操作 - list[at]: 指定用户/身份组可操作STRING
HIGH…/version-2.4.4/best-practice/alconna/uniseg/segment.md0- admin: 仅管理者可操作 - all: 所有人可操作 - list[at]: 指定用户/身份组可操作STRING
HIGH…/version-2.4.3/best-practice/alconna/uniseg/segment.md0- admin: 仅管理者可操作 - all: 所有人可操作 - list[at]: 指定用户/身份组可操作STRING
Hyper-Verbose Identifiers53 hits · 53 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py56def test_generic_check_issubclass():CODE
LOWtests/test_utils.py72def test_is_coroutine_callable():CODE
LOWtests/test_utils.py118def test_is_async_gen_callable():CODE
LOWtests/test_driver.py401async def test_http_client_redirects(driver: Driver, server_url: URL):CODE
LOWtests/test_driver.py669async def test_http_client_session_redirects(driver: Driver, server_url: URL):CODE
LOWtests/test_driver.py718async def test_aiohttp_stream_request_skip_empty_chunk() -> None:CODE
LOWtests/test_driver.py799async def test_aiohttp_websocket_close_frame(msg_type: str) -> None:CODE
LOWtests/test_driver.py826def test_timeout_unset_vs_none():CODE
LOWtests/test_driver.py955async def test_websocket_client_timeout(driver: Driver, server_url: URL):CODE
LOWtests/test_driver.py1007async def test_websocket_client_ping_timeout(driver: Driver, server_url: URL):CODE
LOWtests/test_driver.py1050async def test_websocket_client_ping_interval(driver: Driver, server_url: URL):CODE
LOWtests/test_broadcast.py61async def test_event_preprocessor_ignore(app: App, monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_broadcast.py91async def test_event_preprocessor_exception(CODE
LOWtests/test_broadcast.py168async def test_event_postprocessor_exception(CODE
LOWtests/test_broadcast.py242async def test_run_preprocessor_ignore(app: App, monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_broadcast.py272async def test_run_preprocessor_exception(CODE
LOWtests/test_broadcast.py354async def test_run_postprocessor_exception(CODE
LOWtests/test_config.py117def test_config_without_delimiter():CODE
LOWtests/test_adapters/test_adapter.py91 def _fake_setup_websocket_server(setup: WebSocketServerSetup):CODE
LOWtests/test_adapters/test_adapter.py205async def test_adapter_websocket_client(driver: Driver):CODE
LOWtests/test_adapters/test_bot.py28async def test_bot_calling_api_hook_simple(app: App):CODE
LOWtests/test_adapters/test_bot.py54async def test_bot_calling_api_hook_mock(app: App):CODE
LOWtests/test_adapters/test_bot.py81async def test_bot_calling_api_hook_multi_mock(app: App):CODE
LOWtests/test_adapters/test_bot.py121async def test_bot_called_api_hook_simple(app: App):CODE
LOWtests/test_adapters/test_bot.py153async def test_bot_called_api_hook_mock(app: App):CODE
LOWtests/test_adapters/test_bot.py197async def test_bot_called_api_hook_multi_mock(app: App):CODE
LOWtests/test_adapters/test_template.py36def test_rich_template_message():CODE
LOWtests/test_plugin/test_get.py24def test_get_plugin_by_module_name():CODE
LOWtests/test_plugin/test_get.py49def test_get_available_plugin():CODE
LOWtests/test_plugin/test_get.py73def test_get_plugin_config_with_env(monkeypatch: pytest.MonkeyPatch):CODE
LOWtests/test_plugin/test_load.py155def test_require_not_declared():CODE
LOWtests/test_plugin/test_load.py190def test_inherit_supported_adapters_not_found():CODE
LOWtests/test_plugin/test_load.py264def test_inherit_supported_adapters_combine(CODE
LOWtests/plugins/param/param_arg.py31async def annotated_arg_prompt_result(key: Annotated[Any, ArgPromptResult()]) -> Any:CODE
LOWtests/test_matcher/test_matcher.py234async def test_default_permission_updater(app: App):CODE
LOWtests/test_matcher/test_matcher.py255async def test_user_permission_updater(app: App):CODE
LOWtests/test_matcher/test_matcher.py277async def test_custom_permission_updater(app: App):CODE
LOWnonebot/compat.py270 def __get_pydantic_core_schema__(CODE
LOWnonebot/message.py136def _handle_ignored_exception(CODE
LOWnonebot/message.py153async def _apply_event_preprocessors(CODE
LOWnonebot/message.py210async def _apply_event_postprocessors(CODE
LOWnonebot/message.py315async def _apply_run_postprocessors(CODE
LOWnonebot/plugin/__init__.py61def _module_name_to_plugin_name(module_name: str) -> str:CODE
LOWnonebot/plugin/__init__.py87def _module_name_to_plugin_id(CODE
LOWnonebot/plugin/__init__.py148def get_plugin_by_module_name(module_name: str) -> "Plugin | None":CODE
LOWnonebot/plugin/__init__.py169def get_available_plugin_names() -> set[str]:CODE
LOWnonebot/plugin/load.py219def inherit_supported_adapters(*names: str) -> set[str] | None:CODE
LOWnonebot/plugin/manager.py84 def _previous_controlled_modules(self) -> dict[str, str]:CODE
LOWnonebot/internal/rule.py79 def _handle_skipped_exception(CODE
LOWnonebot/internal/adapter/bot.py85 def _handle_mock_api_exception(CODE
LOWnonebot/internal/adapter/bot.py135 def _handle_mock_api_exception(CODE
LOWnonebot/internal/adapter/template.py18 def formatter_field_name_split(CODE
LOWnonebot/internal/matcher/matcher.py877 def _handle_special_exception(CODE
Excessive Try-Catch Wrapping39 hits · 39 pts
SeverityFileLineSnippetContext
LOWwebsite/docs/developer/adapter-writing.md73except Exception as e:CODE
LOWwebsite/docs/developer/adapter-writing.md176 except Exception as e:CODE
LOWwebsite/docs/developer/adapter-writing.md186 except Exception as e:CODE
LOWwebsite/docs/developer/adapter-writing.md312 except Exception as e:CODE
LOW…sioned_docs/version-2.5.0/developer/adapter-writing.md73except Exception as e:CODE
LOW…sioned_docs/version-2.5.0/developer/adapter-writing.md176 except Exception as e:CODE
LOW…sioned_docs/version-2.5.0/developer/adapter-writing.md186 except Exception as e:CODE
LOW…sioned_docs/version-2.5.0/developer/adapter-writing.md312 except Exception as e:CODE
LOW…sioned_docs/version-2.4.4/developer/adapter-writing.md73except Exception as e:CODE
LOW…sioned_docs/version-2.4.4/developer/adapter-writing.md176 except Exception as e:CODE
LOW…sioned_docs/version-2.4.4/developer/adapter-writing.md186 except Exception as e:CODE
LOW…sioned_docs/version-2.4.4/developer/adapter-writing.md312 except Exception as e:CODE
LOW…sioned_docs/version-2.4.3/developer/adapter-writing.md73except Exception as e:CODE
LOW…sioned_docs/version-2.4.3/developer/adapter-writing.md176 except Exception as e:CODE
LOW…sioned_docs/version-2.4.3/developer/adapter-writing.md186 except Exception as e:CODE
LOW…sioned_docs/version-2.4.3/developer/adapter-writing.md312 except Exception as e:CODE
LOWtests/test_driver.py216 except Exception as e:CODE
LOWnonebot/permission.py102 except Exception:CODE
LOWnonebot/__init__.py63except Exception: # pragma: no coverCODE
LOWnonebot/message.py396 except Exception as e:CODE
LOWnonebot/message.py406 except Exception as e:CODE
LOWnonebot/message.py462 except Exception as e:CODE
LOWnonebot/message.py557 except Exception as e:CODE
LOWnonebot/rule.py168 except Exception:CODE
LOWnonebot/rule.py223 except Exception:CODE
LOWnonebot/rule.py278 except Exception:CODE
LOWnonebot/rule.py328 except Exception:CODE
LOWnonebot/rule.py567 except Exception as e:CODE
LOWnonebot/rule.py687 except Exception:CODE
LOWnonebot/utils.py271 except Exception as e:CODE
LOWnonebot/plugins/single_session.py25 except Exception:CODE
LOWnonebot/plugin/manager.py196 except Exception as e:CODE
LOWnonebot/plugin/manager.py257 except Exception:CODE
LOWnonebot/internal/params.py308 except Exception as e:CODE
LOWnonebot/internal/permission.py139 except Exception:CODE
LOWnonebot/internal/adapter/bot.py129 except Exception as e:CODE
LOWnonebot/internal/matcher/matcher.py602 except Exception:CODE
LOWnonebot/internal/matcher/matcher.py628 except Exception:CODE
LOWnonebot/dependencies/utils.py46 except Exception as e:CODE
Deep Nesting19 hits · 19 pts
SeverityFileLineSnippetContext
LOWtests/fake_server.py86CODE
LOWtests/test_param.py793CODE
LOWnonebot/config.py133CODE
LOWnonebot/config.py142CODE
LOWnonebot/config.py183CODE
LOWnonebot/rule.py88CODE
LOWnonebot/utils.py154CODE
LOWnonebot/plugin/manager.py156CODE
LOWnonebot/internal/params.py571CODE
LOWnonebot/internal/params.py581CODE
LOWnonebot/internal/driver/model.py66CODE
LOWnonebot/internal/driver/model.py229CODE
LOWnonebot/internal/adapter/message.py108CODE
LOWnonebot/internal/adapter/message.py154CODE
LOWnonebot/internal/adapter/message.py254CODE
LOWnonebot/internal/adapter/template.py88CODE
LOWnonebot/internal/adapter/template.py121CODE
LOWnonebot/internal/matcher/matcher.py822CODE
LOWnonebot/dependencies/__init__.py120CODE
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py63CODE
LOWtests/utils.py76CODE
LOWtests/plugins/param/priority.py11CODE
LOWnonebot/plugin/on.py114CODE
LOWnonebot/internal/driver/model.py66CODE
LOWnonebot/internal/matcher/matcher.py195CODE
Modern Structural Boilerplate6 hits · 6 pts
SeverityFileLineSnippetContext
LOWnonebot/internal/params.py140 def set_result(self, result: Any) -> None:CODE
LOWnonebot/internal/params.py150 def set_exception(self, exception: BaseException) -> None:CODE
LOWnonebot/internal/matcher/matcher.py711 def set_receive(self, id: str, event: Event) -> None:CODE
LOWnonebot/internal/matcher/matcher.py742 def set_arg(self, key: str, message: Message) -> None:CODE
LOWnonebot/internal/matcher/matcher.py746 def set_target(self, target: str, cache: bool = True) -> None:CODE
LOWnonebot/internal/matcher/manager.py91 def set_provider(self, provider_class: type[MatcherProvider]) -> None:CODE
Dead Code3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMnonebot/internal/driver/abstract.py274CODE
MEDIUMnonebot/internal/driver/abstract.py316CODE
MEDIUMnonebot/internal/driver/abstract.py340CODE
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWwebsite/docusaurus.config.ts261 // "**/_*/**",COMMENT
LOWwebsite/src/components/Paginate/index.tsx41 // (element: HTMLElement | null) => {COMMENT