Methodology
RepoTrust scores public repositories on three separate questions. The three scores are never blended into one number, because a well-tested project can be entirely AI-written, and a hand-written one can be insecure.
Every score comes with:
- Confidence: how sure the scorer is, given how much evidence it had.
- Coverage: the share of planned checks that actually ran. A check that doesn't apply (for example, no Python files for a Python linter) is dropped and the remaining weights are rescaled. A check whose tool failed lowers coverage and confidence instead of counting as clean.
- Evidence: links to the commits, files and findings behind the score.
How a repository is scored
- Fetch (networked): repository metadata, merged pull requests, a full clone, OpenSSF Scorecard results, and vulnerability databases.
- Analyze (no network): static tools run inside an isolated container that has no network access, a read-only copy of the repository, and CPU, memory and time limits. The repository's own code is never installed, built or run.
- Report (no network): sub-scores are combined using versioned weights. The scoring version is shown on every report, so scores from different versions are not silently compared.
AI provenance
The headline number is the share of code with explicit AI attribution:
- commits with AI co-author trailers or AI bot authors (Claude, Copilot agent, Cursor, Devin, Codex, Aider, and others);
- pull requests opened from AI-agent branches or marked as AI-generated.
This is a lower bound: AI use is often not attributed.
| Label | Meaning |
|---|---|
| explicit | At least 1% of attributed lines, or at least 3 attributed commits |
| possible | Weaker signals: a few attributed commits below the explicit threshold, AI tool configuration files (CLAUDE.md, .cursorrules), or commit bursts faster than a person usually writes code |
| none-detected | No signals found. This does not prove that no AI was used |
- Before AI coding tools: code committed before 29 June 2021 (GitHub Copilot's technical preview) is treated as human-written.
- Commit-speed bursts: these are shown as evidence but do not currently raise the share or produce a "likely" label. In our first calibration they were right only 38% of the time. They will count again only once they reach 90% precision on a larger labelled set.
Wording: unless attribution is explicit, reports say "signals consistent with" AI generation, never that code is AI-generated.
Code quality
| Area | Weight | Measured by |
|---|---|---|
| Testing and CI | 25% | test-to-code ratio, CI present and what it runs |
| Complexity | 20% | function complexity and length (lizard) |
| Duplication | 15% | duplicated blocks |
| Lint and smells | 15% | Opengrep code-quality rules, per thousand lines |
| Docs | 10% | README, license, contributing guide, changelog |
| Process | 10% | code review and maintenance (OpenSSF Scorecard) |
| Type safety | 5% | strict type-checking configuration and escape hatches |
Security
| Area | Weight | Measured by |
|---|---|---|
| Secrets | 25% | gitleaks over the tree and full history. Matches are not verified, and secret values are never stored or shown |
| Static analysis | 20% | Opengrep community rules, weighted by severity and confidence |
| Dependencies | 20% | known vulnerabilities in lockfiles (osv-scanner, offline) |
| CI workflows | 15% | GitHub Actions risks (zizmor) |
| Posture | 10% | security policy, automated dependency updates, signed commits |
| OpenSSF Scorecard | 10% | the public Scorecard result, where one exists |
A repository's own suppression comments and tool configuration are ignored, so every repository is measured the same way.
Labels: strong 85+, adequate 70+, weak 50+, poor below 50. Quality uses 80, 65 and 50.
Flags
- insufficient-source: fewer than 100 lines of first-party source. Quality and security are not scored, because "no findings" in an empty repository means nothing.
- suspicious-distribution: signals consistent with a malware lure, such as a downloadable payload with little source behind it, archive passwords, or links to file-sharing hosts. Release files are never downloaded.
- unusual-traction: many stars in a few days on a brand-new account. The star count is not a reliable signal for this repository.
Flags are heuristics backed by evidence, not verdicts.
Limitations
- AI detection: detection without attribution is probabilistic. Squash merges, rebases and rewritten history hide timing signals.
- No dynamic analysis: tests are not run and builds are not executed.
- Snapshots: each score is for one commit. Check the commit and date on each report.
Disagree with a score? See Disputes.