RepoTrust

Leaderboard github.com

lucaperl/paperless-local-ai

Local OCR, metadata automation and RAG document chat for Paperless-ngx using PaddleOCR and Ollama, designed for CPU-only self-hosted servers

  • View repository ↗
  • Python
  • ★ 22
  • commit 716044b35b7e
  • scored 2026-11-13
  • scoring prov-4+qual-2+sec-2

AI provenance

0%

possible

Confidence
65%
Coverage
100%

Estimated share of AI-generated code. Explicit attribution is a lower bound.

Code quality

70/100

adequate

Confidence
90%
Coverage
100%

Complexity, duplication, lint density, tests, CI, docs and review process.

Security

73/100

adequate

Confidence
85%
Coverage
100%

Secrets, static analysis, vulnerable dependencies, CI and supply-chain posture.

Scores

Pillar Score Signal Confidence Coverage
AI provenance (estimated AI-generated share) 0 possible 65% 100%
Code quality 70 adequate 90% 100%
Security 73 adequate 85% 100%

AI provenance

Weak signals consistent with AI-assisted development.

  • Explicitly attributed share (lower bound): 0.0%

  • Unattributed share in AI-consistent velocity bursts: 27.0%

  • Estimated AI-generated share: 0.0%

  • AI tooling configured in repo: generic-agent

  • Stylometry index: 0.02 per 1,000 lines (narrated steps 0, placeholders 0, assistant phrasing 0, emoji 1). Reported as a signal, not scored.

Month Lines added Attributed to AI
2026-08 26,898 0%
2026-09 7,392 0%
2026-10 11 0%

Evidence

  • AGENTS.md (generic-agent configuration) (AGENTS.md)
  • 6,513 lines of first-party code in ~4.0h (1,616 lines/hour, PR #62) (0edcb2923c02)
  • v0.3.4 → v0.3.5-rc.1: 6,513 lines in 0.46 days (14,046.3 lines/day) (v0.3.4...v0.)
  • 2,743 lines of first-party code in ~4.0h (686 lines/hour, 1 commit session) (b35152ae89f4)

AI provenance describes how code was produced; it is not a quality judgment. Unless attribution is explicit, these are signals consistent with AI generation, not proof. Squash/rebase workflows, imported code, and rewritten history reduce accuracy.

Code quality

Code quality is adequate: test-to-source ratio 0.14, CI runs tests; 25% of function code in complex or long functions; 5% duplicated lines. Weakest area: type safety.

Area Score
Complexity (lizard) 47
Duplication 72
Code smells (Opengrep) 80
Tests and CI 82
Documentation 100
Type safety 0
Process (Scorecard review/maintenance) n/a
  • Functions: 972; mean complexity 4.5, 90th percentile 10; 42 complex and 21 long functions
  • Duplicated lines: 5.5% of 17,371 compared
  • Tests: 3,204 test lines for 22,779 source lines (ratio 0.14); CI test commands: pytest, go test, cargo test; 95% of recent source commits also change tests
  • Docs missing or thin: none

Most complex functions:

Security

Security posture is adequate: 14 known vulnerabilities in 7 dependencies; 4 high-severity SAST findings; 37 high-severity workflow issues. Weakest area: ci actions.

Area Score
Secrets (gitleaks, tree + history) 100
Static analysis (Opengrep) 90
Vulnerable dependencies (OSV) 65
CI workflows (zizmor) 0
Posture (policy, updates, signing, lockfiles) 100
OpenSSF Scorecard n/a
  • Known vulnerabilities: 14 in 7 packages (critical 0, high 2, medium 2, low 2)

  • Posture checks passed: security policy, dependency updates, signed commits; missing: lockfiles

Top findings

Severity Finding Location
high opengrep/python.lang.security.audit.dangerous-subprocess-use-audit: Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. [confidence low] src/core/history_broker.py:141
high opengrep/javascript.browser.security.insecure-document-method: User controlled data in methods like innerHTML, outerHTML or document.write is an anti-pattern that can lead to XSS vulnerabilities [confidence low] src/ocr/paperless_local_ai_ui/assets/chat.js:354
high opengrep/javascript.browser.security.insecure-innerhtml: User controlled data in a node.innerHTML is an anti-pattern that can lead to XSS vulnerabilities [confidence low] src/ocr/paperless_local_ai_ui/assets/chat.js:354
high opengrep/python.lang.security.audit.dangerous-subprocess-use-audit: Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. [confidence low] src/ocr/service.py:600
high osv/RUSTSEC-2026-0340: quinn-proto@0.11.17 (crates.io) is affected by RUSTSEC-2026-0340 Cargo.lock
high osv/RUSTSEC-2026-0343: quinn-proto@0.11.17 (crates.io) is affected by RUSTSEC-2026-0343 Cargo.lock
high zizmor/excessive-permissions: overly broad permissions [confidence high] .github/workflows/build-test-images.yml:16
high zizmor/template-injection: code injection via template expansion [confidence high] .github/workflows/build-test-images.yml:50
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/build-test-images.yml:29
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/build-test-images.yml:68
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/build-test-images.yml:73
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/build-test-images.yml:75
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/build-test-images.yml:82
high zizmor/excessive-permissions: overly broad permissions [confidence high] .github/workflows/pages-demo.yml:18
high zizmor/excessive-permissions: overly broad permissions [confidence high] .github/workflows/pages-demo.yml:19
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/pages-demo.yml:29
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/pages-demo.yml:53
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/pages-demo.yml:56
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/pages-demo.yml:69
high zizmor/excessive-permissions: overly broad permissions [confidence high] .github/workflows/publish.yml:9
high zizmor/excessive-permissions: overly broad permissions [confidence high] .github/workflows/publish.yml:10
high zizmor/excessive-permissions: overly broad permissions [confidence high] .github/workflows/publish.yml:11
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/publish.yml:21
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/publish.yml:22
high zizmor/unpinned-uses: unpinned action reference [confidence high] .github/workflows/publish.yml:52

Static signals only: the scorer never runs the project's code. Secret findings are pattern matches that were not verified, and secret values are never stored.

Repository profile

  • Source lines: 22,779; test lines: 3,204
Language Lines
Python 13,996
Rust 10,084
JavaScript 1,903

Embed a badge

Maintainers can show these in a README. Badges update when the repository is re-scored.

[![RepoTrust ai](https://repotrust.synapticcyber.com/badge/github.com/lucaperl/paperless-local-ai/ai.svg)](https://repotrust.synapticcyber.com/r/github.com/lucaperl/paperless-local-ai/)
[![RepoTrust quality](https://repotrust.synapticcyber.com/badge/github.com/lucaperl/paperless-local-ai/quality.svg)](https://repotrust.synapticcyber.com/r/github.com/lucaperl/paperless-local-ai/)
[![RepoTrust security](https://repotrust.synapticcyber.com/badge/github.com/lucaperl/paperless-local-ai/security.svg)](https://repotrust.synapticcyber.com/r/github.com/lucaperl/paperless-local-ai/)