DEV Community

Cover image for Python (13.31) vs TypeScript (2.36) vs Rust (1.71) vs Go (1.40): Supply-Chain Review Risk Across 3,620 GitHub Repos
Evan Mercer
Evan Mercer

Posted on Edited on

Python (13.31) vs TypeScript (2.36) vs Rust (1.71) vs Go (1.40): Supply-Chain Review Risk Across 3,620 GitHub Repos

There is nothing inherently wrong with generating code using AI coding assistants. Most engineering teams rely on LLMs daily for scaffolding, refactors, and test generation.

The real architectural bottleneck is review throughput versus generation velocity - specifically how different language ecosystems absorb unverified dependencies, dynamic import patterns, and silent failure wrappers when pull request volume scales up.

While maintaining the SlopCodeMonitor empirical observatory (7,135 open-source repositories, ~3.8B lines of code), one cross-language divergence stood out sharply in the static supply-chain heuristic indices.

SlopCodeMonitor Python Supply-Chain Benchmark Overview

Cross-Language Supply-Chain Review Index (0-100 Heuristic Scale)

Across uniform schema and scoring versions (1.0.0 / 2.0.0 / heuristic-density-v1), here is how six major ecosystems compare on static dependency and supply-chain review prompts:

Ecosystem Scanned Repositories Mean Supply-Chain Index (/100) Cohort Benchmark Page
Python 1,259 13.31 Python Supply-Chain Benchmark
TypeScript 1,219 2.36 TypeScript Supply-Chain Benchmark
JavaScript 530 2.10 JavaScript Supply-Chain Benchmark
Java 304 1.95 Java Supply-Chain Benchmark
Rust 483 1.71 Rust Supply-Chain Benchmark
Go 659 1.40 Go Supply-Chain Benchmark

(Full 121-language distribution available in the Supply-Chain Pattern Signals by Language matrix.)

Methodology caveat: These scores are deterministic static heuristics meant to prioritize human code review and dependency verification - not proof of AI authorship and not confirmed malicious or hallucinated package incidents.

Why Python Scores ~8x Higher Than Rust and Go

Three structural properties explain why Python repositories surface dramatically higher static dependency-review density than Go (1.40) or Rust (1.71):

  1. Runtime Import Resolution vs Compile-Time Module Graphs: In Rust (Cargo.lock + rustc) and Go (go.sum + explicit module paths), unresolved or undeclared transitive imports fail compilation immediately. In Python, optional imports nested inside try / except ImportError: branches, importlib.import_module() calls, and plugin registries routinely defer resolution to runtime.
  2. Rapid AI Agent & Glue-Code Concentration: Python hosts the overwhelming majority of newly created LLM orchestration, RAG, and skill-wrapper repositories, where contributors frequently copy multi-provider SDK snippets without pruning unused imports or pinning transitive hashes.
  3. Namespace vs Package-Name Mismatches: PyPI distribution names (scikit-learn, pillow, pyyaml, beautifulsoup4) frequently differ from top-level import identifiers (sklearn, PIL, yaml, bs4), creating fertile ground for slopsquatting when coding assistants hallucinate plausible package names in requirements.txt.

Reference Baselines Across Well-Known Repositories

You can inspect individual repository pattern breakdowns directly below, or search any of the 7,135 repositories interactively via the Hugging Face Explorer Space:

Repository Pattern-Signal Score Signal Band AST & Heuristic Evidence
ollama/ollama 0.6 LOW Inspect ollama/ollama Report
kubernetes/kubernetes 1.6 LOW Inspect kubernetes/kubernetes Report
golang/go 2.9 LOW Inspect golang/go Report
torvalds/linux 3.2 LOW Inspect torvalds/linux Report
astral-sh/ruff 4.7 LOW Inspect astral-sh/ruff Report
fastapi/fastapi 7.4 LOW Inspect fastapi/fastapi Report
vllm-project/vllm 16.5 LOW Inspect vllm-project/vllm Report
langchain-ai/langchain 38.5 MEDIUM Inspect langchain-ai/langchain Report

(See also the Lowest-Signal Cohort Shortlist, the Top 200 Monitored Repositories Index, and the full scoring methodology.)

Practical Takeaways for Engineering Leads & AppSec Teams

If your organization runs polyglot services, applying identical PR review gates across Go, Rust, and Python wastes reviewer attention:

  • On Python services: Enforce strict lockfile-to-AST import reconciliation (pyproject.toml / uv.lock vs ast.Import / ast.ImportFrom), ban bare silent exception handlers (except Exception: pass), and require explicit review on any newly added PyPI package.
  • On TypeScript / Node: Audit postinstall scripts (--ignore-scripts in CI where feasible) and flag dynamic require() / import() expressions.
  • On Go & Rust: Focus reviewer budget less on phantom imports and more on cognitive ownership (unsafe blocks in Rust, goroutine lifecycle and context cancellation in Go).

All underlying CSVs are openly licensed (CC-BY-4.0) on Hugging Face at Evan-Mercer-Dev/slopcodemonitor-oss-benchmark. Feedback on false positives or edge cases in specific ecosystems is very welcome via the public issue tracker.

Automate deterministic AST & dependency checks in GitHub Pull Requests with evan-mercer-dev/slopcodemonitor-action@v1 or read the mirror notes on evan-mercer-dev.github.io.

Top comments (1)

Collapse
 
userxnom profile image
Abdullah Naseer •

The headline gap is hard to ignore — Python at 13.31 against Go at 1.40 and Rust at 1.71 across 3,620 repos in the comparison, roughly eight times the review risk. Framing it as review throughput versus generation velocity makes the number feel less like a language judgement and more like an operational one: the faster code is generated, the more the review queue matters.

Your three structural reasons land in the right order for me. Runtime import resolution and the scikit-learn/sklearn, pillow/PIL name mismatch are the two that would actually bite in a real PR — an assistant can hallucinate a plausible package name and nothing fails until install time. The baseline table drives it home: langchain-ai/langchain at 38.5 in the medium band sits far above fastapi at 7.4 and ollama at 0.6, so the index is clearly separating orchestration-heavy repos from the rest.

I also appreciate the caveat that these are deterministic static heuristics for prioritizing review, not proof of AI authorship or a malicious package.

Of the three Python drivers, which one contributes the most to that 13.31 in practice — the namespace mismatches, or the runtime import patterns?