AI Slop Code Risk Monitor

su-kaka/agy2api

SlopCodeMonitor badge for su-kaka/agy2api Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

将 Antigravity 转换为 OpenAI 、GEMINI 和 Claude API 接口

21.5 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for su-kaka/agy2api, a Python project with 5,287 GitHub stars. SynthScan examined 23,925 lines of code across 75 source files, recording 365 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 21.5 (Elevated 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.

21.5
Adjusted Signal
21.5
Raw Pattern Score
100%
Time Factor
2026-10-28
Last Push
5.3K
Stars
Python
Language
23.9K
Lines of Code
75
Files
365
Pattern Hits
2026-10-31
Scan Date
0.35
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 31.7/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 1.4/100 · LOW

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

Agent Over-Engineering Ratio 58.9/100 · HIGH

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

PR Review Velocity Impact 68.0/100 · HIGH

Which changes need focused human review? 365 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

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

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

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 26MEDIUM 25LOW 314

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 365 distinct pattern matches across 10 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.

Excessive Try-Catch Wrapping127 hits · 124 pts
SeverityFileLineSnippetContext
LOWweb.py37 except Exception as e:CODE
LOWweb.py45 except Exception as e:CODE
LOWweb.py58 except Exception as e:CODE
LOWweb.py73 except Exception as e:CODE
LOWweb.py80 except Exception as e:CODE
LOWweb.py106 except Exception as e:CODE
LOWconfig.py73 except Exception:CODE
LOWconfig.py93 except Exception:CODE
LOWsrc/usage_log.py48 except Exception:CODE
LOWsrc/usage_log.py123 except Exception as e:CODE
MEDIUMsrc/auth.py83def patched_validate(params):CODE
MEDIUMsrc/auth.py626def shutdown_server_async():CODE
LOW⚡src/auth.py72 except Exception as e:CODE
LOW⚡src/auth.py565 except Exception as e:CODE
LOW⚡src/auth.py569 except Exception as e:CODE
LOWsrc/auth.py122 except Exception:CODE
LOWsrc/auth.py155 except Exception as e:CODE
LOWsrc/auth.py267 except Exception as e:CODE
LOWsrc/auth.py302 except Exception as e:CODE
LOWsrc/auth.py339 except Exception as e:CODE
LOWsrc/auth.py359 except Exception as e:CODE
LOWsrc/auth.py405 except Exception as e:CODE
LOWsrc/auth.py614 except Exception as e:CODE
LOWsrc/auth.py618 except Exception as e:CODE
LOWsrc/auth.py635 except Exception:CODE
LOWsrc/auth.py651 except Exception:CODE
LOWsrc/auth.py656 except Exception as e:CODE
LOWsrc/credential_manager.py133 except Exception as e:CODE
LOWsrc/credential_manager.py153 except Exception as e:CODE
LOWsrc/credential_manager.py166 except Exception as e:CODE
LOWsrc/credential_manager.py214 except Exception as e:CODE
LOWsrc/credential_manager.py246 except Exception as e:CODE
LOWsrc/credential_manager.py278 except Exception as e:CODE
LOWsrc/request_body_log.py82 except Exception as e:CODE
LOWsrc/request_body_log.py108 except Exception:CODE
LOWsrc/request_body_log.py130 except Exception as e:CODE
LOWsrc/google_oauth_api.py111 except Exception as e:CODE
LOWsrc/google_oauth_api.py241 except Exception as e:CODE
LOWsrc/google_oauth_api.py313 except Exception as e:CODE
LOWsrc/google_oauth_api.py342 except Exception as e:CODE
LOWsrc/google_oauth_api.py367 except Exception as e:CODE
LOWsrc/google_oauth_api.py384 except Exception as e:CODE
LOWsrc/google_oauth_api.py398 except Exception as e:CODE
LOWsrc/google_oauth_api.py459 except Exception as e:CODE
LOWsrc/httpx_client.py58 except Exception as e:CODE
LOWsrc/session_cache.py67 except Exception as e:CODE
LOWsrc/session_cache.py79 except Exception:CODE
LOWsrc/session_cache.py153 except Exception as e:CODE
LOWsrc/session_cache.py171 except Exception as e:CODE
LOWsrc/session_cache.py186 except Exception as e:CODE
LOWsrc/panel/usage_logs.py63 except Exception as e:CODE
LOWsrc/panel/usage_logs.py88 except Exception as e:CODE
LOWsrc/panel/usage_logs.py123 except Exception as e:CODE
LOWsrc/panel/usage_logs.py151 except Exception as e:CODE
LOWsrc/panel/usage_logs.py169 except Exception as e:CODE
LOWsrc/panel/auth.py40 except Exception as e:CODE
LOWsrc/panel/auth.py74 except Exception as e:CODE
LOWsrc/panel/auth.py127 except Exception as e:CODE
LOWsrc/panel/auth.py177 except Exception as e:CODE
LOWsrc/panel/auth.py192 except Exception as e:CODE
67 more matches not shown…
Empty Error Handlers22 hits · 110 pts
SeverityFileLineSnippetContext
HIGHconfig.py93except Exception:CODE
HIGHconfig.py162except ValueError:CODE
HIGHconfig.py177except ValueError:CODE
HIGHconfig.py198except ValueError:CODE
HIGHconfig.py216except ValueError:CODE
HIGHconfig.py246except ValueError:CODE
HIGHconfig.py707except ValueError:CODE
HIGHconfig.py592except (json.JSONDecodeError, ValueError):CODE
HIGHsrc/auth.py86except Warning:CODE
HIGHsrc/auth.py122except Exception:CODE
HIGHsrc/auth.py635except Exception:CODE
HIGHsrc/auth.py651except Exception:CODE
HIGHsrc/request_body_log.py146except OSError:CODE
HIGHsrc/session_cache.py79except Exception:CODE
HIGHsrc/converter/anti_truncation.py259except (json.JSONDecodeError, TypeError):CODE
HIGHsrc/converter/anti_truncation.py787except ValueError:CODE
HIGHsrc/storage/database.py551except ValueError:CODE
HIGHsrc/api/antigravity.py834except Exception:CODE
HIGHsrc/api/antigravity.py1125except Exception:CODE
HIGHsrc/api/antigravity.py846except Exception:CODE
HIGHsrc/api/antigravity.py481except Exception:CODE
HIGHsrc/router/base_router.py61except Exception:CODE
Hyper-Verbose Identifiers99 hits · 100 pts
SeverityFileLineSnippetContext
LOWconfig.py204async def get_anti_truncation_max_attempts() -> int:CODE
LOWconfig.py284async def get_return_thoughts_to_frontend() -> bool:CODE
LOWconfig.py308async def get_sensitive_words_enabled() -> bool:CODE
LOWconfig.py373def apply_sensitive_word_filter(text: str, patterns) -> str:CODE
LOWconfig.py382async def get_sensitive_word_filter():CODE
LOWconfig.py537async def get_model_rewrite_enabled() -> bool:CODE
LOWconfig.py552async def get_model_rewrite_rules_config() -> list:CODE
LOWconfig.py573def _parse_model_rewrite_rules_value(value: Any) -> Optional[list]:CODE
LOWconfig.py605def compile_model_rewrite_rules(rules: list):CODE
LOWconfig.py695async def get_request_log_error_codes() -> list:CODE
LOWconfig.py722async def get_credential_select_mode() -> str:CODE
LOW⚡src/auth.py63def _cleanup_auth_flow_server(state: str):CODE
LOW⚡src/auth.py78def _patch_oauthlib_validation():CODE
LOW⚡src/auth.py574async def complete_auth_flow_from_callback_url(CODE
LOWsrc/auth.py43def _prepare_credentials_data(credentials: Credentials, project_id: str, subscription_tier: str = None) -> Dict[str, AnyCODE
LOWsrc/auth.py102def cleanup_auth_flows_for_memory():CODE
LOWsrc/auth.py344async def _save_antigravity_credential(CODE
LOWsrc/auth.py448async def asyncio_complete_auth_flow(CODE
LOWsrc/credential_manager.py295def _is_permanent_refresh_failure(error_msg: str, status_code: Optional[int] = None) -> bool:CODE
LOWsrc/google_oauth_api.py372async def fetch_user_email_from_file(cred_data: Dict[str, Any]) -> Optional[str]:CODE
LOWsrc/google_oauth_api.py403async def fetch_project_id_and_tier(CODE
LOWsrc/utils.py22def _get_latest_antigravity_cli_version() -> str:CODE
LOWsrc/utils.py83def get_base_model_from_feature_model(model_name: str) -> str:CODE
LOW⚡src/panel/creds.py52async def _import_single_credential(data: Dict[str, Any]) -> Dict[str, Any]:CODE
LOW⚡src/panel/creds.py142async def extract_json_files_from_zip(zip_file: UploadFile) -> List[dict]:CODE
LOW⚡src/panel/creds.py189async def upload_credentials_common( files: List[UploadFile] ) -> JSONResponse:CODE
LOW⚡src/panel/creds.py638async def verify_credential_project(CODE
LOWsrc/panel/creds.py335async def download_all_creds_common() -> Response:CODE
LOWsrc/panel/creds.py384async def verify_credential_project_common(email: str) -> JSONResponse:CODE
LOWsrc/converter/antigravity_fix.py80def _clean_parameters_json_schema(CODE
LOWsrc/converter/antigravity_fix.py268def _normalize_tools_for_internal_api(tools: Any) -> Any:CODE
LOWsrc/converter/antigravity_fix.py314def _ensure_empty_tool_schema_for_claude(tools: Any, model_name: str) -> Any:CODE
LOWsrc/converter/antigravity_fix.py426def _should_skip_thought_signature(part: Dict[str, Any], model_name: str) -> bool:CODE
LOWsrc/converter/antigravity_fix.py439def _normalize_part_thought_signature(part: Dict[str, Any], model_name: str) -> Dict[str, Any]:CODE
LOWsrc/converter/antigravity_fix.py495def _parse_size_to_image_config(size_str: str) -> Dict[str, str]:CODE
LOWsrc/converter/antigravity_fix.py540def prepare_image_generation_request(CODE
LOWsrc/converter/antigravity_fix.py681async def _get_sensitive_word_patterns():CODE
LOWsrc/converter/antigravity_fix.py692def _filter_contents_sensitive_words(contents: Any, patterns) -> Any:CODE
LOWsrc/converter/antigravity_fix.py719def _filter_system_instruction_sensitive_words(system_instruction: Any, patterns) -> Any:CODE
LOWsrc/converter/antigravity_fix.py803def _strip_trailing_model_turns(contents: List[Any]) -> Tuple[List[Any], int]:CODE
LOWsrc/converter/antigravity_fix.py847async def normalize_antigravity_request(CODE
LOWsrc/converter/anti_truncation.py73def _collect_function_tool_names(tools: List[Dict[str, Any]]) -> List[str]:CODE
LOWsrc/converter/anti_truncation.py98def _resolve_function_calling_mode(tools: List[Dict[str, Any]]) -> Tuple[str, bool]:CODE
LOWsrc/converter/anti_truncation.py201def extract_synthetic_content_from_response(CODE
LOWsrc/converter/anti_truncation.py244def _extract_content_from_json_str(args_str: str) -> Optional[str]:CODE
LOWsrc/converter/anti_truncation.py287def _chunk_has_real_function_call(data: Dict[str, Any]) -> bool:CODE
LOWsrc/converter/anti_truncation.py303def _replace_thought_signatures(data: Dict[str, Any]) -> bool:CODE
LOWsrc/converter/anti_truncation.py340def build_text_chunk_from_synthetic(CODE
LOWsrc/converter/anti_truncation.py409def _deep_copy_anti_truncation_payload(payload: Dict[str, Any]) -> Dict[str, Any]:CODE
LOWsrc/converter/anti_truncation.py969 def _build_fallback_text_chunk(self, text: str) -> Optional[bytes]:CODE
LOWsrc/converter/anti_truncation.py985 def _build_finish_reason_chunk(self, finish_reason: str = "STOP") -> bytes:CODE
LOWsrc/converter/anti_truncation.py999 async def _handle_non_streaming_response(self, response) -> bytes:CODE
LOWsrc/converter/thoughtSignature_fix.py17def is_internal_placeholder_text(text: Any) -> bool:CODE
LOWsrc/converter/thoughtSignature_fix.py23def is_skip_thought_signature_placeholder(part: Mapping[str, Any]) -> bool:CODE
LOWsrc/converter/thoughtSignature_fix.py34def encode_tool_id_with_signature(tool_id: str, signature: Optional[str]) -> str:CODE
LOWsrc/converter/thoughtSignature_fix.py56def decode_tool_id_and_signature(encoded_id: str) -> Tuple[str, Optional[str]]:CODE
LOWsrc/converter/utils.py9def extract_content_and_reasoning(parts: list) -> tuple:CODE
LOW⚡src/converter/anthropic2gemini.py35def has_valid_thoughtsignature(block: Dict[str, Any]) -> bool:CODE
LOW⚡src/converter/anthropic2gemini.py199def _cached_content_token_count(usage_metadata: Any) -> int:CODE
LOW⚡src/converter/anthropic2gemini.py205def _anthropic_usage_from_metadata(usage_metadata: Any) -> Dict[str, Any]:CODE
39 more matches not shown…
Decorative Section Separators22 hits · 87 pts
SeverityFileLineSnippetContext
MEDIUM⚡src/panel/creds.py48# =============================================================================COMMENT
MEDIUM⚡src/panel/creds.py50# =============================================================================COMMENT
MEDIUM⚡src/panel/creds.py137# =============================================================================COMMENT
MEDIUM⚡src/panel/creds.py139# =============================================================================COMMENT
MEDIUMsrc/panel/creds.py445# =============================================================================COMMENT
MEDIUMsrc/panel/creds.py447# =============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py27# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py29# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py189# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py191# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py406# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py408# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py598# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py600# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py723# ============================================================================COMMENT
MEDIUM⚡src/converter/anthropic2gemini.py725# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py280# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py282# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py373# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py375# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py639# ============================================================================COMMENT
MEDIUMsrc/converter/anthropic2gemini.py641# ============================================================================COMMENT
Deep Nesting75 hits · 60 pts
SeverityFileLineSnippetContext
LOWconfig.py403CODE
LOWconfig.py573CODE
LOWsrc/token_estimator.py7CODE
LOWsrc/token_estimator.py13CODE
LOWsrc/usage_log.py22CODE
LOWsrc/auth.py102CODE
LOWsrc/auth.py132CODE
LOWsrc/auth.py247CODE
LOWsrc/auth.py448CODE
LOWsrc/credential_manager.py32CODE
LOWsrc/credential_manager.py181CODE
LOWsrc/request_body_log.py113CODE
LOWsrc/google_oauth_api.py126CODE
LOWsrc/utils.py92CODE
LOWsrc/session_cache.py87CODE
LOWsrc/panel/auth.py80CODE
LOWsrc/panel/auth.py133CODE
LOWsrc/panel/version.py20CODE
LOWsrc/panel/config_routes.py104CODE
LOWsrc/panel/creds.py52CODE
LOWsrc/panel/creds.py142CODE
LOWsrc/panel/creds.py189CODE
LOWsrc/panel/creds.py335CODE
LOWsrc/panel/creds.py489CODE
LOWsrc/panel/creds.py531CODE
LOWsrc/panel/creds.py669CODE
LOWsrc/converter/antigravity_fix.py80CODE
LOWsrc/converter/antigravity_fix.py268CODE
LOWsrc/converter/antigravity_fix.py314CODE
LOWsrc/converter/antigravity_fix.py447CODE
LOWsrc/converter/antigravity_fix.py692CODE
LOWsrc/converter/antigravity_fix.py739CODE
LOWsrc/converter/anti_truncation.py201CODE
LOWsrc/converter/anti_truncation.py340CODE
LOWsrc/converter/anti_truncation.py463CODE
LOWsrc/converter/anti_truncation.py999CODE
LOWsrc/converter/utils.py60CODE
LOWsrc/converter/anthropic2gemini.py128CODE
LOWsrc/converter/anthropic2gemini.py284CODE
LOWsrc/converter/anthropic2gemini.py424CODE
LOWsrc/converter/anthropic2gemini.py553CODE
LOWsrc/converter/anthropic2gemini.py602CODE
LOWsrc/converter/anthropic2gemini.py941CODE
LOWsrc/converter/openai2gemini.py132CODE
LOWsrc/converter/openai2gemini.py227CODE
LOWsrc/converter/openai2gemini.py376CODE
LOWsrc/converter/openai2gemini.py613CODE
LOWsrc/converter/openai2gemini.py799CODE
LOWsrc/converter/openai2gemini.py877CODE
LOWsrc/converter/openai2gemini.py948CODE
LOWsrc/converter/openai2gemini.py1052CODE
LOWsrc/converter/openai2gemini.py1105CODE
LOWsrc/converter/openai2gemini.py1142CODE
LOWsrc/converter/openai2gemini.py1172CODE
LOWsrc/converter/openai2gemini.py1214CODE
LOWsrc/converter/openai2gemini.py1498CODE
LOWsrc/converter/openai2gemini.py1674CODE
LOWsrc/storage/database.py188CODE
LOWsrc/storage/database.py236CODE
LOWsrc/storage/database.py425CODE
15 more matches not shown…
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHsrc/utils.py102 统一的灵活认证函数,支持多种认证方式 此函数可以直接用作 FastAPI 的 Depends 依赖 支持的认证方式: - URL 参数: key - HTTP 头部: AuthoSTRING
HIGHsrc/utils.py211 简化的控制面板密码验证函数 直接验证Bearer token是否等于控制面板密码 Args: credentials: HTTPAuthorizationCredentials 自动注入 STRING
HIGHsrc/converter/thoughtSignature_fix.py35 将 thoughtSignature 编码到工具调用ID中,以便往返保留。 Args: tool_id: 原始工具调用ID signature: thoughtSignature(可选) STRING
HIGHsrc/converter/thoughtSignature_fix.py57 从编码的ID中提取原始工具ID和thoughtSignature。 Args: encoded_id: 编码的工具调用ID Returns: (原始工具ID, thoughtSiSTRING
Unused Imports10 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/token_estimator.py2CODE
LOWsrc/usage_log.py9CODE
LOWsrc/auth.py28CODE
LOWsrc/google_oauth_api.py6CODE
LOWsrc/panel/creds.py10CODE
LOWsrc/panel/creds.py12CODE
LOWsrc/panel/creds.py12CODE
LOWsrc/converter/anthropic2gemini.py6CODE
LOWsrc/api/antigravity.py25CODE
LOWsrc/router/antigravity/anthropic.py21CODE
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWlog.py84__all__ = ["log", "set_log_level", "get_log_level", "LOG_LEVELS"]CODE
LOWsrc/session_cache.py160async def set_session_binding(session_key: str, email: str) -> None:CODE
LOWsrc/panel/__init__.py28__all__ = ["router"]CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/panel/usage_logs.py27CODE
LOWsrc/storage/database.py761CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWinstall.sh294# Check if web.py existsCOMMENT