AI Slop Code Risk Monitor

chenyme/grok2api

SlopCodeMonitor badge for chenyme/grok2api Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Multi-account API gateway for Grok Build, Grok Web, and Grok Console

0.7 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for chenyme/grok2api, a Go project with 7,874 GitHub stars. SynthScan examined 209,349 lines of code across 614 source files, recording 152 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 0.7 (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.

0.7
Adjusted Signal
0.7
Raw Pattern Score
100%
Time Factor
2026-10-22
Last Push
7.9K
Stars
Go
Language
209.3K
Lines of Code
614
Files
152
Pattern Hits
2026-10-31
Scan Date
0.01
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 2.2/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.4/100 · LOW

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

Agent Over-Engineering Ratio 2.8/100 · LOW

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

PR Review Velocity Impact 4.1/100 · LOW

Which changes need focused human review? 152 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 5MEDIUM 0LOW 147

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 152 distinct pattern matches across 8 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.

Hyper-Verbose Identifiers89 hits · 76 pts
SeverityFileLineSnippetContext
LOW⚡tools/egress-quality-guard/quality_guard_test.py59 def test_passive_speed_matches_panel_and_includes_reasoning_tokens(self):CODE
LOW⚡tools/egress-quality-guard/quality_guard_test.py69 def test_passive_late_first_token_uses_full_duration(self):CODE
LOW⚡tools/egress-quality-guard/quality_guard_test.py79 def test_passive_late_first_token_without_reasoning_remains_burst(self):CODE
LOW⚡tools/egress-quality-guard/quality_guard_test.py89 def test_passive_audit_does_not_infer_thinking_requirement(self):CODE
LOW⚡tools/egress-quality-guard/quality_guard_test.py276 def test_disabled_bootstrap_exits_cleanly(self):CODE
LOW⚡tools/egress-quality-guard/quality_guard_test.py283 def test_rejects_reversed_thresholds(self):CODE
LOW⚡tools/egress-quality-guard/quality_guard_test.py287 def test_runtime_config_overrides_only_strategy_fields(self):CODE
LOW⚡tools/egress-quality-guard/quality_guard_test.py296 def test_runtime_config_reloader_keeps_last_valid_config(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py40 def test_healthy_soft_and_hard_thresholds(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py46 def test_missing_marker_is_hard_and_quality_ok_is_not_a_healthy_shortcut(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py104 def test_probe_missing_thinking_is_hard(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py150 def test_passive_ignores_short_and_failed_requests(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py159 def test_state_write_is_atomic_and_private(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py173 def test_missing_profile_file_seeds_builtin_recovery_profiles(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py180 def test_reserved_profile_ids_are_canonicalized(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py213 def test_loads_private_bootstrap_without_admin_credentials(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py312 def test_list_nodes_reads_every_page(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py328 def test_list_nodes_rejects_incomplete_pagination(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py334 def test_fixed_fallback_nodes_are_discovered_from_operations_policy(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py345 def test_list_leases_uses_stable_cursor_until_complete(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py361 def test_list_leases_rejects_non_advancing_cursor(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py442 def test_hard_signal_quarantines_and_healthy_recovery_restores(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py467 def test_auto_discovery_publishes_resolved_node_ids_for_status_consumers(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py478 def test_fixed_fallback_node_is_excluded_without_aborting_other_nodes(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py492 def test_fixed_fallback_releases_existing_account_lease_without_probe(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py509 def test_account_bound_proxy_skips_scheduled_probe_and_stays_observable(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py528 def test_account_bound_proxy_records_passive_anomaly_without_node_quarantine(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py564 def test_repeated_account_anomaly_extends_one_lease_without_double_counting(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py581 def test_due_lease_recovery_has_a_per_cycle_budget(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py601 def test_failed_lease_recovery_is_backed_off(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py619 def test_account_bound_proxy_releases_only_guard_owned_legacy_quarantine(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py646 def test_account_bound_proxy_keeps_ownership_when_legacy_release_fails(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py668 def test_enabled_node_promoted_to_fixed_fallback_releases_guard_ownership(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py688 def test_quarantine_ownership_is_persisted_before_backend_disable(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py711 def test_quarantine_state_rolls_back_when_backend_disable_fails(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py735 def test_removed_or_unmanaged_node_state_is_pruned(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py751 def test_quarantined_node_removed_from_config_is_recovered_before_release(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py771 def test_minimum_healthy_nodes_suppresses_quarantine(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py786 def test_fail_closed_rotates_soft_signal_and_restores_after_one_good_probe(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py815 def test_fail_closed_requires_consecutive_probe_errors_then_rotates(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py854 def test_probe_without_schedulable_account_is_deferred_without_rotation(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py890 def test_fail_closed_buffered_burst_restores_same_ip_after_one_good_probe(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py918 def test_fail_closed_keeps_node_isolated_when_rotated_ip_probe_is_ambiguous(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py943 def test_fail_closed_manual_reenable_requires_probe(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py967 def test_model_probe_can_restore_when_generic_connectivity_probe_is_unhealthy(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py982 def test_passive_baseline_does_not_replay_historical_audits(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py993 def test_passive_hard_signal_quarantines_immediately_and_ignores_guard_key(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py1018 def test_passive_soft_signal_quarantines_immediately_without_probe(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py1032 def test_passive_soft_signal_holds_until_quarantine_window(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py1050 def test_multiple_passive_hard_signals_only_quarantine_once(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py1064 def test_passive_hold_restores_only_after_healthy_probe(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py1091 def test_recovery_always_uses_builtin_quality_marker_profile(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py1122 def test_passive_hold_keeps_isolated_when_recovery_probe_is_unhealthy(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py1151 def test_repeat_passive_degrade_lengthens_hold(self):CODE
LOWtools/egress-quality-guard/quality_guard_test.py1188 def test_passive_user_anomaly_quarantines_without_waiting_for_probe(self):CODE
LOWtools/egress-quality-guard/session_rotator_test.py17 def test_replaces_only_selected_proxy_username(self):CODE
LOWtools/egress-quality-guard/session_rotator_test.py35 def test_update_session_sets_new_sid_and_ten_minute_stickiness(self):STRING
LOWtools/egress-quality-guard/session_rotator_test.py69 def test_rotation_compares_against_live_pre_rotation_ip(self):STRING
LOWtools/egress-quality-guard/session_rotator_test.py91 def test_rotation_reports_live_old_ip_when_it_changes(self):STRING
LOWtools/egress-quality-guard/session_rotator.py97def replace_username_in_mihomo(value: str, proxy_index: int, username: str) -> str:CODE
29 more matches not shown…
Empty Error Handlers5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHtools/egress-quality-guard/session_rotator.py299except KeyboardInterrupt:CODE
HIGHtools/egress-quality-guard/session_rotator.py234except Exception:CODE
HIGHtools/egress-quality-guard/quality_guard.py486except FileNotFoundError:CODE
HIGHtools/egress-quality-guard/quality_guard.py488except (OSError, ValueError):CODE
HIGHtools/egress-quality-guard/quality_guard.py655except FileNotFoundError:CODE
Excessive Try-Catch Wrapping19 hits · 18 pts
SeverityFileLineSnippetContext
LOWtools/egress-quality-guard/session_rotator.py166 except Exception as exc:CODE
LOWtools/egress-quality-guard/session_rotator.py229 except Exception:CODE
LOWtools/egress-quality-guard/session_rotator.py234 except Exception:CODE
LOWtools/egress-quality-guard/quality_guard.py652 except Exception:CODE
LOWtools/egress-quality-guard/quality_guard.py815 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py840 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py862 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py883 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py902 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py958 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1020 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1055 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1121 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1151 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1174 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1182 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1289 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1620 except Exception as exc:CODE
LOWtools/egress-quality-guard/quality_guard.py1626 except Exception as exc:CODE
Fake / Example Data17 hits · 17 pts
SeverityFileLineSnippetContext
LOW…d/internal/infra/provider/web/account_identity_test.go67 identity, err := parseAccountIdentity([]byte(`{"status":"authenticated","session":{"userId":"user-1","email":"user@examCODE
LOW…d/internal/infra/provider/web/account_identity_test.go71 if identity.UserID != "user-1" || identity.Email != "user@example.com" || identity.TeamID != "org-1" {CODE
LOW…d/internal/infra/provider/web/account_identity_test.go85 _, _ = writer.Write([]byte(`{"status":"authenticated","session":{"userId":"` + sessionUserID + `","email":"user@examplCODE
LOWbackend/internal/infra/provider/cli/adapter_test.go662 if request.Header.Get("x-userid") != "user-123" || request.Header.Get("x-email") != "user@example.com" || request.HeadCODE
LOWbackend/internal/infra/provider/cli/adapter_test.go667 models, err := adapter.ListModels(context.Background(), account.Credential{UserID: "user-123", Email: "user@example.comCODE
LOWbackend/internal/infra/provider/cli/oauth_test.go26 idToken := "header." + base64.RawURLEncoding.EncodeToString([]byte(`{"sub":"user-1","email":"user@example.com","team_idCODE
LOWbackend/internal/infra/provider/cli/oauth_test.go46 if prepared.AccessToken != "fresh-access" || prepared.RefreshToken != "rotated-rt" || prepared.UserID != "user-1" || prCODE
LOWbackend/internal/infra/provider/cli/normalize_test.go389 data := []byte(`{"accounts":[{"provider":"grok_build","name":"primary","client_id":"client-1","access_token":"access-1"CODE
LOWbackend/internal/infra/provider/cli/normalize_test.go448 data := []byte(`[{"type":"xai","access_token":"access-1","refresh_token":"refresh-1","email":"user@example.com","user_iCODE
LOWbackend/internal/infra/provider/cli/normalize_test.go454 if len(values) != 2 || values[0].AccessToken != "access-1" || values[0].Email != "user@example.com" || values[0].UserIDCODE
LOWbackend/internal/infra/provider/cli/normalize_test.go494 Name: "primary", Email: "user@example.com", UserID: "user-1", TeamID: "team-1",CODE
LOWbackend/internal/infra/provider/cli/normalize_test.go521 claims, _ := json.Marshal(map[string]any{"sub": "user-1", "email": "user@example.com", "team_id": "team-1", "exp": expiCODE
LOWbackend/internal/infra/provider/cli/normalize_test.go529 if len(values) != 1 || values[0].UserID != "user-1" || values[0].Email != "user@example.com" || values[0].TeamID != "teCODE
LOW…nd/internal/application/account/provider_links_test.go37 adapter.identity = provider.AccountIdentity{UserID: "11111111-1111-4111-8111-111111111111", Email: "user@example.com"}CODE
LOW…nd/internal/application/account/provider_links_test.go49 if web.UserID != "11111111-1111-4111-8111-111111111111" || web.Email != "user@example.com" || len(web.LinkedAccounts) !CODE
LOWbackend/internal/application/account/export_test.go44 Provider: accountdomain.ProviderBuild, Name: "primary", Email: "user@example.com", UserID: "user-1",CODE
LOWbackend/internal/application/account/export_test.go77 if value.Name != "primary" || value.Email != "user@example.com" || value.UserID != "user-1" || value.OIDCClientID != "cCODE
Over-Commented Block16 hits · 16 pts
SeverityFileLineSnippetContext
LOWconfig.example.yaml1# 配置标记:COMMENT
LOWconfig.example.yaml161 # account-bound state or side-effecting tools. Context compaction stays exempt.COMMENT
LOWdocker-compose.yml21 security_opt:COMMENT
LOWdocker-compose.yml41 # 在管理端将 Clearance 模式设为 FlareSolverr 或按需刷新,并使用 http://flaresolverr:8191。COMMENT
LOWbackend/internal/infra/provider/provider.go1361 result, ok := adapter.(VoiceWebSocketAdapter)COMMENT
LOWbackend/internal/transport/http/swagger_annotations.go101// @Produce jsonCOMMENT
LOWbackend/internal/transport/http/swagger_annotations.go121// @Security BearerAuthCOMMENT
LOWbackend/internal/transport/http/swagger_annotations.go141COMMENT
LOWbackend/internal/transport/http/swagger_annotations.go161// @Router /v1/responses/{response_id} [delete]COMMENT
LOWbackend/internal/transport/http/swagger_annotations.go181// @Accept jsonCOMMENT
LOWbackend/internal/transport/http/swagger_annotations.go201COMMENT
LOWbackend/internal/transport/http/swagger_annotations.go221// @Router /v1/media/images/{asset_id} [get]COMMENT
LOWbackend/internal/transport/http/swagger_annotations.go241// @Produce jsonCOMMENT
LOWbackend/internal/transport/http/swagger_annotations.go261// @Summary 查询异步视频任务COMMENT
LOWbackend/internal/application/gateway/service.go121 // auditOperation may classify a normal protocol request differently forCOMMENT
LOWbackend/internal/domain/account/account.go221 // 它不参与路由;每个新请求仍先走 Build,只有当次严格 403 才可尝试 XAI。COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtools/egress-quality-guard/session_rotator.py178 def _update_session(self, proxy_index: int, session_id: str) -> None:CODE
LOWtools/egress-quality-guard/quality_guard.py689 def _update_guard_metadata(self) -> None:CODE
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtools/egress-quality-guard/session_rotator.py8CODE
LOWtools/egress-quality-guard/quality_guard.py10CODE
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtools/egress-quality-guard/session_rotator.py193CODE
LOWtools/egress-quality-guard/quality_guard.py1251CODE