The math library of Lean 4
This report presents the forensic synthetic code analysis of leanprover-community/mathlib4, a Lean project with 3,599 GitHub stars. SynthScan v2.0 examined 32,693 lines of code across 145 source files, recording 255 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 11.3 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 255 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | scripts/verify_version_tags.py | 220 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | scripts/verify_version_tags.py | 222 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | scripts/verify_version_tags.py | 627 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | scripts/verify_version_tags.py | 629 | # ============================================================================ | COMMENT |
| MEDIUM | scripts/runSkimmer.sh | 18 | # --------------------------------------------- | COMMENT |
| MEDIUM | scripts/runSkimmer.sh | 20 | # --------------------------------------------- | COMMENT |
| MEDIUM | scripts/runSkimmer.sh | 40 | # -------------------- | COMMENT |
| MEDIUM | scripts/runSkimmer.sh | 42 | # -------------------- | COMMENT |
| MEDIUM | scripts/dag_traversal.py | 726 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/dag_traversal.py | 728 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | .github/workflows/nightly_bump_and_merge.yml | 71 | # ============================================================================ | COMMENT |
| MEDIUM | .github/workflows/nightly_bump_and_merge.yml | 73 | # ============================================================================ | COMMENT |
| MEDIUM | .github/workflows/nightly_bump_and_merge.yml | 114 | # ============================================================================ | COMMENT |
| MEDIUM | .github/workflows/nightly_bump_and_merge.yml | 116 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | .github/workflows/nightly_bump_and_merge.yml | 317 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | .github/workflows/nightly_bump_and_merge.yml | 319 | # ============================================================================ | COMMENT |
| MEDIUM | .github/workflows/update_dependencies.yml | 118 | # ──────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | .github/workflows/update_dependencies.yml | 134 | # ── inputs ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | .github/workflows/update_dependencies.yml | 157 | # ── state ─────────────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/downstream-tags.py | 19 | print("Error: GitHub CLI (gh) is not installed or not in PATH", file=sys.stderr) | CODE |
| LOW | scripts/downstream-tags.py | 92 | except Exception as e: | CODE |
| MEDIUM | scripts/downstream-tags.py | 93 | print(f"Error fetching tags for {repo['name']}: {e}", file=sys.stderr) | CODE |
| LOW | scripts/downstream-tags.py | 127 | except Exception as e: | CODE |
| MEDIUM | scripts/downstream-tags.py | 128 | print(f"Error checking toolchain history for {repo['name']}: {e}", file=sys.stderr) | CODE |
| LOW | scripts/downstream-tags.py | 149 | except Exception: | CODE |
| MEDIUM | scripts/verify_version_tags.py | 135 | print("Error: GitHub CLI (gh) is not installed or not in PATH", file=sys.stderr) | CODE |
| MEDIUM | scripts/verify_version_tags.py | 195 | print(f"Error fetching tags from GitHub: {stderr}", file=sys.stderr) | CODE |
| MEDIUM | scripts/verify_version_tags.py | 201 | print(f"Error parsing GitHub response", file=sys.stderr) | CODE |
| MEDIUM⚡ | scripts/verify_version_tags.py | 751 | print("Error: Cannot use --all and --since together", file=sys.stderr) | STRING |
| MEDIUM⚡ | scripts/verify_version_tags.py | 755 | print("Error: Cannot specify a tag with --all", file=sys.stderr) | STRING |
| MEDIUM⚡ | scripts/verify_version_tags.py | 759 | print("Error: Cannot specify a tag with --since", file=sys.stderr) | STRING |
| MEDIUM⚡ | scripts/verify_version_tags.py | 787 | print("Error: No version tags found", file=sys.stderr) | STRING |
| MEDIUM⚡ | scripts/verify_version_tags.py | 796 | print(f"Error: Invalid version tag format for --since: {args.since}", | STRING |
| MEDIUM⚡ | scripts/verify_version_tags.py | 803 | print("Error: No version tags found", file=sys.stderr) | STRING |
| MEDIUM⚡ | scripts/verify_version_tags.py | 808 | print(f"Error: No version tags found >= {args.since}", file=sys.stderr) | STRING |
| LOW | scripts/verify_version_tags.py | 184 | except Exception as e: | CODE |
| LOW | scripts/verify_version_tags.py | 493 | except Exception: | CODE |
| LOW | scripts/verify_version_tags.py | 499 | except Exception as e: | CODE |
| MEDIUM | scripts/verify_version_tags.py | 776 | print(f"Error: Invalid version tag format: {args.tag}", file=sys.stderr) | STRING |
| MEDIUM | scripts/user_activity_report.py | 64 | print("Error: 'gh' command not found. Please install GitHub CLI.", file=sys.stderr) | CODE |
| MEDIUM | scripts/user_activity_report.py | 79 | print(f"Error: Invalid repository format '{repo_arg}'. {e}", file=sys.stderr) | CODE |
| MEDIUM | scripts/user_activity_report.py | 108 | print(f"Error getting repository info: {e}", file=sys.stderr) | CODE |
| MEDIUM | scripts/user_activity_report.py | 327 | print("Error: 'gh' is not authenticated. Please run 'gh auth login' first.", file=sys.stderr) | CODE |
| MEDIUM | scripts/downstream_dashboard.py | 33 | print("Error: GitHub CLI (gh) is not installed or not in PATH", file=sys.stderr) | CODE |
| LOW | scripts/downstream_dashboard.py | 106 | except Exception as e: | CODE |
| MEDIUM | scripts/downstream_dashboard.py | 107 | print(f"Error fetching tags for {repo['name']}: {e}", file=sys.stderr) | CODE |
| LOW | scripts/downstream_dashboard.py | 141 | except Exception as e: | CODE |
| MEDIUM | scripts/downstream_dashboard.py | 142 | print(f"Error checking toolchain history for {repo['name']}: {e}", file=sys.stderr) | CODE |
| LOW | scripts/downstream_dashboard.py | 164 | except Exception: | CODE |
| LOW | scripts/downstream_dashboard.py | 176 | except Exception: | CODE |
| LOW | scripts/downstream_dashboard.py | 225 | except Exception: | CODE |
| LOW | scripts/downstream_dashboard.py | 289 | except Exception: | CODE |
| LOW | scripts/dag_traversal.py | 92 | except Exception: | CODE |
| LOW | scripts/dag_traversal.py | 310 | except Exception as e: | CODE |
| LOW⚡ | scripts/migrate_to_fork.py | 488 | except Exception: | CODE |
| LOW | scripts/migrate_to_fork.py | 161 | except Exception: | CODE |
| LOW | scripts/migrate_to_fork.py | 196 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 207 | except Exception: | CODE |
| LOW | scripts/migrate_to_fork.py | 229 | except Exception: | CODE |
| LOW | scripts/migrate_to_fork.py | 243 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 280 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 285 | except Exception: | CODE |
| LOW | scripts/migrate_to_fork.py | 296 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 316 | except Exception: | CODE |
| LOW | scripts/migrate_to_fork.py | 429 | except Exception: | CODE |
| LOW | scripts/migrate_to_fork.py | 500 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 568 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 619 | except Exception: | CODE |
| LOW | scripts/migrate_to_fork.py | 648 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 687 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 736 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 746 | except Exception as comment_error: | CODE |
| LOW | scripts/migrate_to_fork.py | 761 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 768 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 796 | except Exception as e: | CODE |
| LOW | scripts/migrate_to_fork.py | 807 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/fix_unused_simp_args.py | 53 | CODE | |
| LOW | scripts/fix_unused_simp_args.py | 100 | CODE | |
| LOW | scripts/downstream-tags.py | 96 | CODE | |
| LOW | scripts/downstream-tags.py | 152 | CODE | |
| LOW | scripts/rm_set_option.py | 60 | CODE | |
| LOW | scripts/rm_set_option.py | 332 | CODE | |
| LOW | scripts/rm_set_option.py | 140 | CODE | |
| LOW | scripts/verify_version_tags.py | 720 | CODE | |
| LOW | scripts/user_activity_report.py | 113 | CODE | |
| LOW | scripts/user_activity_report.py | 187 | CODE | |
| LOW | scripts/user_activity_report.py | 215 | CODE | |
| LOW | scripts/user_activity_report.py | 261 | CODE | |
| LOW | scripts/user_activity_report.py | 292 | CODE | |
| LOW | scripts/user_activity_report.py | 312 | CODE | |
| LOW | scripts/fix_nonlocal_set_option.py | 48 | CODE | |
| LOW | scripts/fix_deprecations.py | 18 | CODE | |
| LOW | scripts/rm_module_set_option.py | 69 | CODE | |
| LOW | scripts/rm_module_set_option.py | 168 | CODE | |
| LOW | scripts/rm_module_set_option.py | 188 | CODE | |
| LOW | scripts/rm_module_set_option.py | 206 | CODE | |
| LOW | scripts/rm_module_set_option.py | 279 | CODE | |
| LOW | scripts/rm_module_set_option.py | 132 | CODE | |
| LOW | scripts/rm_module_set_option.py | 214 | CODE | |
| LOW | scripts/parse_shake_output.py | 21 | CODE | |
| LOW | scripts/downstream_dashboard.py | 110 | CODE | |
| LOW | scripts/downstream_dashboard.py | 316 | CODE | |
| LOW | scripts/add_module_set_option.py | 130 | CODE | |
| LOW | scripts/lint-style.py | 108 | CODE | |
| LOW | scripts/lint-style.py | 143 | CODE | |
| LOW | scripts/dag_traversal.py | 657 | CODE | |
| LOW | scripts/dag_traversal.py | 825 | CODE | |
| LOW | scripts/dag_traversal.py | 96 | CODE | |
| LOW | scripts/dag_traversal.py | 120 | CODE | |
| LOW | scripts/dag_traversal.py | 168 | CODE | |
| LOW | scripts/dag_traversal.py | 533 | CODE | |
| LOW | scripts/dag_traversal.py | 622 | CODE | |
| LOW | scripts/dag_traversal.py | 303 | CODE | |
| LOW | scripts/migrate_to_fork.py | 304 | CODE | |
| LOW | scripts/migrate_to_fork.py | 320 | CODE | |
| LOW | scripts/migrate_to_fork.py | 473 | CODE | |
| LOW | scripts/migrate_to_fork.py | 505 | CODE | |
| LOW | scripts/migrate_to_fork.py | 573 | CODE | |
| LOW | scripts/migrate_to_fork.py | 653 | CODE | |
| LOW | scripts/migrate_to_fork.py | 800 | CODE | |
| LOW | scripts/lake-build-wrapper.py | 198 | CODE | |
| LOW | scripts/add_set_option.py | 202 | CODE | |
| LOW | scripts/add_set_option.py | 356 | CODE | |
| LOW | scripts/add_set_option.py | 86 | CODE | |
| LOW | scripts/add_set_option.py | 263 | CODE | |
| LOW | scripts/bench/combine.py | 35 | CODE | |
| LOW | scripts/bench/size/run.py | 24 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/rm_set_option.py | 401 | # Step 1: lakefile.lean | COMMENT |
| LOW⚡ | scripts/rm_set_option.py | 412 | # Step 2: build DAG | COMMENT |
| LOW⚡ | scripts/rm_set_option.py | 417 | # Step 3: scan for removable lines | COMMENT |
| LOW⚡ | scripts/rm_set_option.py | 457 | # Step 4: initial build to ensure all .oleans are fresh | COMMENT |
| LOW⚡ | scripts/rm_set_option.py | 461 | # Step 5: traverse full DAG, skipping modules without removable lines. | COMMENT |
| LOW | scripts/rm_set_option.py | 533 | # Step 6: summarize (only count target modules, not skipped ones) | COMMENT |
| LOW⚡ | scripts/fix_nonlocal_set_option.py | 256 | # Step 1: collect all deps of all failing modules | COMMENT |
| LOW⚡ | scripts/fix_nonlocal_set_option.py | 261 | # Step 2: add option to all deps that don't already have it | COMMENT |
| LOW⚡ | scripts/fix_nonlocal_set_option.py | 274 | # Step 3: verify all check modules build | COMMENT |
| LOW⚡ | scripts/fix_nonlocal_set_option.py | 283 | # Step 4: binary search remove unnecessary options | COMMENT |
| LOW | scripts/add_module_set_option.py | 171 | # Step 1: remove from lakefile | COMMENT |
| LOW | scripts/add_module_set_option.py | 189 | # Step 2: determine which files to process via the import DAG | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 821 | # Step 1: Check gh installation | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 825 | # Step 2: Get username | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 828 | # Step 3: Check/create fork | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 831 | # Step 4: Setup remotes | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 841 | # Step 5: Push branch to fork (if needed) | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 847 | # Step 6: Check for existing PRs | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/rm_set_option.py | 401 | # Step 1: lakefile.lean | COMMENT |
| LOW⚡ | scripts/rm_set_option.py | 412 | # Step 2: build DAG | COMMENT |
| LOW⚡ | scripts/rm_set_option.py | 417 | # Step 3: scan for removable lines | COMMENT |
| LOW⚡ | scripts/rm_set_option.py | 457 | # Step 4: initial build to ensure all .oleans are fresh | COMMENT |
| LOW⚡ | scripts/rm_set_option.py | 461 | # Step 5: traverse full DAG, skipping modules without removable lines. | COMMENT |
| LOW | scripts/rm_set_option.py | 533 | # Step 6: summarize (only count target modules, not skipped ones) | COMMENT |
| LOW⚡ | scripts/fix_nonlocal_set_option.py | 256 | # Step 1: collect all deps of all failing modules | COMMENT |
| LOW⚡ | scripts/fix_nonlocal_set_option.py | 261 | # Step 2: add option to all deps that don't already have it | COMMENT |
| LOW⚡ | scripts/fix_nonlocal_set_option.py | 274 | # Step 3: verify all check modules build | COMMENT |
| LOW⚡ | scripts/fix_nonlocal_set_option.py | 283 | # Step 4: binary search remove unnecessary options | COMMENT |
| LOW | scripts/add_module_set_option.py | 171 | # Step 1: remove from lakefile | COMMENT |
| LOW | scripts/add_module_set_option.py | 189 | # Step 2: determine which files to process via the import DAG | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 821 | # Step 1: Check gh installation | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 825 | # Step 2: Get username | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 828 | # Step 3: Check/create fork | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 831 | # Step 4: Setup remotes | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 841 | # Step 5: Push branch to fork (if needed) | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 847 | # Step 6: Check for existing PRs | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/downstream-tags.py | 196 | # Display results | COMMENT |
| LOW | scripts/verify_version_tags.py | 858 | # Check if this stable/patch version has a later patch | STRING |
| LOW | scripts/user_activity_report.py | 194 | # Check if cache is less than 24 hours old | COMMENT |
| LOW | scripts/user_activity_report.py | 222 | # Check if cache is less than 6 hours old | COMMENT |
| LOW | scripts/lint-style.py | 118 | # Check if the current line matches "(lemma|theorem) .* :" | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 480 | # Check if upstream is fork_remote/branch (which should point to the fork) | COMMENT |
| LOW⚡ | scripts/migrate_to_fork.py | 838 | # Check if branch is already migrated | COMMENT |
| LOW | scripts/migrate_to_fork.py | 127 | # Check if gh is installed | COMMENT |
| LOW | scripts/migrate_to_fork.py | 147 | # Check if authenticated | COMMENT |
| LOW | scripts/migrate_to_fork.py | 225 | # Check if the output contains successful authentication message | COMMENT |
| LOW | scripts/migrate_to_fork.py | 269 | # Check if fork exists | COMMENT |
| LOW | scripts/migrate_to_fork.py | 383 | # Check if origin exists and is different | COMMENT |
| LOW | scripts/migrate_to_fork.py | 401 | # Check if 'origin' is available for the fork | COMMENT |
| LOW | scripts/migrate_to_fork.py | 523 | # Check if this PR is from the main repo or a fork | COMMENT |
| LOW | scripts/auto_commit.sh | 77 | # Check if there are any staged changes | COMMENT |
| LOW | scripts/add_set_option.py | 324 | # Check if this specific error is gone (line shifted by insertion) | COMMENT |
| LOW | .github/workflows/nightly_detect_failure.yml | 165 | # Check if the remote tag exists | COMMENT |
| LOW | .github/workflows/nightly_detect_failure.yml | 509 | # Check if we already posted a message for this nightly date and bump branch. | COMMENT |
| LOW | .github/workflows/nightly_bump_and_merge.yml | 221 | # Check if the diff contains files other than the specified ones | COMMENT |
| LOW | .github/workflows/nightly_bump_and_merge.yml | 236 | # Check if there are relevant branches | COMMENT |
| LOW⚡ | .github/workflows/nightly_bump_and_merge.yml | 313 | # Output the results | COMMENT |
| LOW | .github/workflows/nightly_bump_and_merge.yml | 369 | # Output the message using the correct GitHub Actions syntax | COMMENT |
| LOW | .github/workflows/remove_deprecated_decls.yml | 174 | # Check if the branch exists remotely | COMMENT |
| LOW | .github/workflows/commit_verification.yml | 57 | # Check if any commits have transient or auto prefix | COMMENT |
| LOW | .github/workflows/update_dependencies.yml | 45 | # Check if the branch exists remotely | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | bors.toml | 41 | # `restrict_to_paths`. | COMMENT |
| LOW | docs/1000.yaml | 1 | # This file tracks the formalisation status of theorems from the experimental | COMMENT |
| LOW | scripts/grind_unused_lemmas.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | scripts/runSkimmer.sh | 21 | COMMENT | |
| LOW | scripts/find-ci-errors.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/find-ci-errors.sh | 21 | # # Find PRs and request master merge to fix infrastructure issues | COMMENT |
| LOW | scripts/lake-build-with-retry.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/yaml_check.py | 61 | authors: Optional[str] = None | COMMENT |
| LOW | scripts/auto_commit.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | .github/workflows/lake_cache_shadow.yml | 1 | name: Lake cache shadow (master) | COMMENT |
| LOW | .github/workflows/lake_cache_shadow.yml | 21 | # LAKE_CACHE_REVISION_ENDPOINT_PUBLIC — e.g. https://pub-<hash>.r2.dev/<prefix>/revisions | COMMENT |
| LOW | .github/workflows/lake_cache_shadow.yml | 41 | # The `toolchain_override` input, or else the LAKE_SHADOW_TOOLCHAIN_OVERRIDE | COMMENT |
| LOW | .github/workflows/lake_cache_shadow.yml | 281 | || echo "::warning::warm start from rev ${prev:0:12} failed; proceeding without it" | COMMENT |
| LOW | .github/workflows/lake_cache_shadow.yml | 401 | # (Lake's revisionUrl ignores it for `.str` scopes), but stays | COMMENT |
| LOW | .github/workflows/build_template.yml | 101 | # CI writes the new container layout via the master-built cache binary, | COMMENT |
| LOW | .github/workflows/build_template.yml | 361 | echo "Please run 'lake exe mk_all' to regenerate the import all files" | COMMENT |
| LOW | .github/workflows/export_crossrefs.yml | 101 | # On manual runs this defaults to true (see the workflow_dispatch | COMMENT |
| LOW | .github/workflows/validate_mathlib_ci_paths.yml | 1 | # Sanity checks for mathlib-ci usage in workflow files | COMMENT |
| LOW | .github/workflows/pr_check_downstream.yml | 1 | name: PR check downstream | COMMENT |
| LOW | .github/workflows/pr_check_downstream.yml | 21 | # (e.g. `FLT`) or its GitHub `owner/repo` slug | COMMENT |
| LOW | .github/workflows/update_dependencies.yml | 121 | # already has identical content. This gate is therefore the ONLY | COMMENT |
| LOW | .github/workflows/bors.yml | 21 | # All other permissions are implicitly 'none' | COMMENT |
| LOW | .github/workflows/decls-diff.yml | 1 | # Post-build workflow that patches the `### PR summary` comment with a | COMMENT |
| LOW | .github/workflows/publish_tools.yml | 1 | # Builds the trusted CI tooling (`cache` binary + the `lake-build-*` helper scripts) | COMMENT |
| LOW | .github/workflows/publish_tools.yml | 61 | # `check-yaml` and `graph` are built as a smoke test that master's tools | COMMENT |
| LOW | .github/actions/get-tools/action.yml | 1 | # Populates `tools-branch/` with the trusted CI tooling (`cache` binary + the | COMMENT |
| LOW | .github/actions/cache-trust-dispatch/action.yml | 61 | COMMENT | |
| LOW | .github/actions/cache-trust-dispatch/action.yml | 81 | case "$REPO" in | COMMENT |
| LOW | .github/actions/setup-build-env/action.yml | 1 | # Shared runner setup for the self-hosted `build` and `test_lint` jobs in | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | scripts/verify_version_tags.py | 224 | def verify_local_remote_consistency(tag: str) -> VerificationResult: | CODE |
| LOW | scripts/verify_version_tags.py | 455 | def verify_lean_version_string(tag: str, checkout_dir: str) -> VerificationResult: | CODE |
| LOW | scripts/user_activity_report.py | 159 | def get_contributors_fallback(owner: str, repo: str, limit: Optional[int] = None) -> List[Dict]: | CODE |
| LOW | scripts/rm_module_set_option.py | 106 | def module_set_option_pattern(option: str, value: str = "false") -> re.Pattern: | CODE |
| LOW | scripts/rm_module_set_option.py | 188 | def _collect_all_dependencies(dag: DAG, module_name: str) -> set[str]: | CODE |
| LOW | scripts/downstream_dashboard.py | 191 | def check_workflow_uses_action(repo: Dict[str, str], workflow_name: str, expected_action: str, silent=False) -> bool: | CODE |
| LOW | scripts/lint-style.py | 108 | def four_spaces_in_second_line(lines, path): | CODE |
| LOW | scripts/lint-style.py | 143 | def isolated_by_dot_semicolon_check(lines, path): | CODE |
| LOW | scripts/githelper.py | 208 | def git_get_branch_push_remote(branch: str) -> str | None: | CODE |
| LOW | scripts/githelper.py | 226 | def git_set_branch_push_remote(branch: str, remote: str) -> str | None: | CODE |
| LOW | scripts/githelper.py | 363 | def gh_get_all_branches_of_open_prs_from_fork(repo: str, fork: str) -> list[str]: | STRING |
| LOW | scripts/githelper.py | 427 | def cmd_fix_update_default_gh_repo() -> None: | STRING |
| LOW | scripts/githelper.py | 440 | def cmd_fix_set_origin_to_fork(fork: str) -> None: | STRING |
| LOW | scripts/githelper.py | 457 | def cmd_fix_update_origin_to_fork(fork: str) -> None: | STRING |
| LOW | scripts/githelper.py | 464 | def cmd_fix_update_master_remotes() -> None: | STRING |
| LOW⚡ | scripts/migrate_to_fork.py | 473 | def check_branch_already_migrated(branch: str, username: str, fork_remote_name: str) -> bool: | CODE |
| LOW | scripts/migrate_to_fork.py | 434 | def validate_branch_for_migration(branch: str, auto_accept: bool = False) -> None: | CODE |
| LOW | scripts/lake-build-wrapper.py | 108 | def open_group_for_normal_line(self, line: str): | CODE |
| LOW | scripts/bench/repeatedly.py | 45 | def read_measurements_from_outfile(outfile: Path) -> list[Measurement]: | CODE |
| LOW | scripts/bench/repeatedly.py | 53 | def write_measurements_to_outfile( | CODE |
| LOW | .github/workflows/validate_mathlib_ci_paths.yml | 172 | def collect_mathlib_ci_checkouts(workflow, workflow_text): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/downstream_repos.yml | 1 | # This file contains basic information about significant downstream repositories. | COMMENT |
| MEDIUM | scripts/migrate_to_fork.py | 630 | # Create the summary | COMMENT |
| MEDIUM | scripts/auto_commit.sh | 87 | # Create the commit | COMMENT |
| MEDIUM | .github/workflows/nightly_bump_and_merge.yml | 131 | # Create a temporary directory for cloning | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/print-style-errors.sh | 3 | # Make this script robust against unintentional errors. | COMMENT |
| MEDIUM | scripts/lake-build-with-retry.sh | 11 | # Make this script robust against unintentional errors. | COMMENT |
| MEDIUM | scripts/lint-bib.sh | 3 | # Make this script robust against unintentional errors. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/fix_unused_simp_args.py | 13 | CODE | |
| LOW | scripts/fix_nonlocal_set_option.py | 23 | CODE | |
| LOW | scripts/fix_nonlocal_set_option.py | 25 | CODE | |
| LOW | scripts/fix_nonlocal_set_option.py | 31 | CODE | |
| LOW | scripts/fix_nonlocal_set_option.py | 32 | CODE | |
| LOW | scripts/rm_module_set_option.py | 26 | CODE | |
| LOW | scripts/rm_module_set_option.py | 34 | CODE | |
| LOW | scripts/add_module_set_option.py | 21 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | scripts/verify_version_tags.py | 628 | # Main verification orchestration | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/find-ci-errors.sh | 9 | # Usage: | COMMENT |