AI-assisted code generation is not inherently a software defect - most engineering teams use coding assistants every day to ship faster.
The operational bottleneck is pull-request review throughput versus diff velocity. When 800-line diffs arrive faster than senior engineers can read them line by line, three structural risks slip into production:
-
Undeclared & Hallucinated Imports (Slopsquatting): Top-level
importstatements that happen to resolve locally via transitive packages (or do not exist inpyproject.toml/requirements.txtat all). -
Silent Broad Exception Swallowing:
except Exception: passor emptycatch {}blocks that make CI tests green while hiding production failures. -
Cognitive Ownership Debt: Deeply nested control flow (
depth >= 6) and 150-line monolithic functions that nobody on on-call can safely debug.
To catch these deterministically in CI without external SaaS tokens or probabilistic "AI authorship detectors," I packaged our core heuristics into a zero-dependency composite GitHub Action: evan-mercer-dev/slopcodemonitor-action@v1, benchmarked directly against the 7,352 open-source repositories (~3.9B LOC) tracked on SlopCodeMonitor.
Drop-In Workflow (.github/workflows/slopcodemonitor.yml)
The Action runs on standard ubuntu-latest runners in under 2 seconds using Python's built-in ast module:
name: Code Review & Supply-Chain Gate
on:
pull_request:
push:
branches: [main]
jobs:
review-risk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: SlopCodeMonitor AST & Dependency Gate
uses: evan-mercer-dev/slopcodemonitor-action@v1
with:
path: "."
fail-on-score: "35" # Omit or set "101" for non-blocking PR summaries
Contextualizing Scores Against 7,352 Open-Source Repositories
Raw static warnings are hard to calibrate without ecosystem baselines. Every run writes a Markdown report into $GITHUB_STEP_SUMMARY comparing your repository's score against the empirical cohort means from slopcodemonitor.ai:
| Language Ecosystem | Scanned OSS Repos | Mean Cohort Baseline (/100) |
Canonical Reference |
|---|---|---|---|
| Python | 1,310 | 13.34 | Python Benchmark |
| TypeScript | 1,240 | 2.34 | TypeScript Benchmark |
| JavaScript | 555 | 3.48 | JavaScript Benchmark |
| Rust | 492 | 1.70 | Rust Benchmark |
| Go | 671 | 1.40 | Go Benchmark |
If your public repository is already among the 7,352 scanned projects (you can check via the Hugging Face Explorer Space or the Top 200 Monitored Repos Index), the Action automatically links your published AST evidence profile in the CI job summary.
Source, Tests & Feedback
-
GitHub Action Repository (
MIT):evan-mercer-dev/slopcodemonitor-action(Releasev1.0.0) - Full 121-Language Supply-Chain Matrix: slopcodemonitor.ai/benchmark-supply-chain.html
- Methodology & Limitations: slopcodemonitor.ai/#risk-payload-methodology
-
Open Dataset (
CC-BY-4.0): Evan-Mercer-Dev/slopcodemonitor-oss-benchmark
If there are additional structural AST checks (e.g. Go or Rust syn patterns) you would find valuable in PR summaries, open an issue on slopcodemonitor-action!

Top comments (0)