RepoTrust

Leaderboard github.com

NMAC427/SwiftOCR

Fast and simple OCR library written in Swift

  • View repository ↗
  • Swift
  • ★ 4,629
  • commit 99a1d90a5f3d
  • scored 2026-11-14
  • scoring prov-5+qual-2+sec-2

AI provenance

0%

none-detected

Confidence
65%
Coverage
100%

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

Code quality

40/100

poor

Confidence
90%
Coverage
100%

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

Security

69/100

weak

Confidence
85%
Coverage
100%

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

AI provenance

0% none-detected

No AI attribution or AI-consistent velocity signals detected.

How the score is built

  • Explicitly attributed share0%
  • Unattributed share in AI-pace bursts0%
  • Estimated AI-generated share0%
  • AI tool configuration files0
  • Work sessions at AI pace0
  • Releases at AI pace0
  • Coding-style index (1.0+ means possible)0.36

Lines added per month all AI-attributed share

  1. 2016-0449,428 · 0% AI
  2. 2016-051,309 · 0% AI
  3. 2016-06317 · 0% AI
  4. 2016-07271 · 0% AI
  5. 2016-10393 · 0% AI
  6. 2016-11237 · 0% AI
  7. 2016-123 · 0% AI
  8. 2017-040 · 0% AI
  9. 2017-0912 · 0% AI
  10. 2017-1059 · 0% AI
  11. 2017-110 · 0% AI
  12. 2018-060 · 0% AI
  13. 2018-103 · 0% AI
  14. 2019-0116 · 0% AI
  15. 2019-020 · 0% AI
  16. 2019-030 · 0% AI
  17. 2019-1119 · 0% AI
  18. 2020-0530 · 0% AI
  19. 2020-120 · 0% AI

Evidence by analyzer

Explicit AI attributionok
attributed_commit_share
0.0%
attributed_commits
0
attributed_loc
0
attributed_loc_share
0.0%
commits
127
effective_loc
52,097
tools_detected
0
AI tool configurationok
artifacts
0
tools_configured
0
workflow_agents
0
Commit velocityok
excluded_import_loc
48,835
flagged_loc
0
flagged_loc_share
0.0%
flagged_units
0
max_loc_per_hour
129.83
measured_loc
3,262
median_loc_per_hour
37.25
pr_timed_units
0
pre_ai_era_burst_loc
0
pre_ai_era_bursts
0
pre_ai_era_measured_loc
3,262
work_units
56
Release velocityok
flagged_releases
0
max_loc_per_day
0.40
releases
3
Coding styleok8 items
count:assistant_voice
0
count:emoji_in_code
0
count:narrated_steps
18
count:placeholder
0
files:assistant_voice
0
files:emoji_in_code
0
files:narrated_steps
5
files:placeholder
0
index
0.36
lines_scanned
49,411
per_kloc:assistant_voice
0
per_kloc:emoji_in_code
0
per_kloc:narrated_steps
0.36
per_kloc:placeholder
0

Code quality

40 poor

Code quality is poor: test-to-source ratio 0.00, no CI test run detected; 20% of function code in complex or long functions; 29% duplicated lines. Weakest area: testing.

How the score is built

  • Complexity55
  • Duplication18
  • Lint and smells99
  • Tests and CI0
  • Documentation65
  • Type safetynot measured
  • Review process30

Evidence by analyzer

Complexity (lizard)ok10 items
complex_functions
20
function_nloc
22,775
functions
1,987
long_functions
19
many_param_functions
1
mean_ccn
2.12
p90_ccn
3
risky_nloc_share
19.8%
Duplication (jscpd)ok10 items
compared_lines
30,710
duplicated_lines
8,813
duplicated_share
28.7%
files
488
Lintok
category:correctness
2
findings
2
scanned_lines
9,692
weighted_findings
0.50
Tests and CIok
check:ci_present
no
check:ci_runs_lint
no
check:ci_runs_tests
no
check:has_tests
no
check:test_ratio
no
check:tests_cochange
no
ci_files
0
cochange_commits
74
cochange_share
0.0%
source_lines
49,411
test_lines
0
test_ratio
0
Documentationok2 items
  • README.md README.md
  • LICENSE LICENSE
check:changelog
no
check:contributing
no
check:license
yes
check:readme
yes
readme_lines
73
Type safetyskipped

Security

69 weak

Security posture is weak: no high-impact findings. Weakest area: posture.

How the score is built

  • Secrets100
  • Static analysis (SAST)86
  • Vulnerable dependenciesnot measured
  • CI workflowsnot measured
  • Security posture0
  • OpenSSF Scorecard25

Evidence by analyzer

OpenSSF Scorecardok9 items
aggregate
2.90
check:Binary-Artifacts
yes
check:Branch-Protection
no
check:CII-Best-Practices
no
check:Code-Review
yes
check:Fuzzing
no
check:License
yes
check:Maintained
no
check:SAST
no
check:Security-Policy
no
Package registriesskipped

no registry dependencies declared

Secrets (gitleaks)ok
secrets_current
0
secrets_history
0
secrets_low_confidence
0
secrets_nonprod
0
Static analysis (opengrep)ok
findings
16
findings_high
0
findings_low
0
findings_medium
16
parse_errors
179
scanned_lines
9,692
weighted_findings
4
Dependencies (osv-scanner)skipped
CI workflows (zizmor)skipped
Security postureok
check:dependency_updates
no
check:lockfiles
yes
check:security_policy
no
check:signed_commits
no
signed_commit_share
3.9%
unpinned_manifests
0
Release downloadsok
binary_assets
0
signals
0
suspicious
0

Findings

16 medium2 low

SeverityRuleLocationMessageTool
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/Extensions.swift:46 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/FFNN/FFNN.swift:567 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/FFNN/Random.swift:16 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:105 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:160 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:161 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:162 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:163 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:222 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:239 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:240 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:241 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:242 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:61 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:76 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
medium opengrep/swift.lang.crypto.insecure-random framework/SwiftOCR/SwiftOCRTraining.swift:82 A random number generator was detected which is **not** *guaranteed* to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the... Static analysis (opengrep)
low opengrep/bash.lang.correctness.unquoted-variable-expansion-in-command framework/SwiftOCR/GPUImage-master/build.sh:10 Variable expansions must be double-quoted so as to prevent being split into multiple pieces according to whitespace or whichever separator is specified by the IFS variable. If you really wish to split the variable's contents, you may... Lint
low opengrep/bash.lang.correctness.unquoted-variable-expansion-in-command framework/SwiftOCR/GPUImage-master/build.sh:11 Variable expansions must be double-quoted so as to prevent being split into multiple pieces according to whitespace or whichever separator is specified by the IFS variable. If you really wish to split the variable's contents, you may... Lint

Tools and coverage

Every analyzer that ran on this commit. A failed or skipped tool is a coverage gap: its share of the score is left out and the coverage figure drops.

AnalyzerPillarStatusVersionFindingsNote
AI tool configurationAI provenanceoksignatures-v10
Explicit AI attributionAI provenanceoksignatures-v10
Release velocityAI provenanceokprov-40
Coding styleAI provenanceok—0
Commit velocityAI provenanceokprov-40
Complexity (lizard)Code qualityoklizard 1.25.10
DocumentationCode qualityok—0
Duplication (jscpd)Code qualityokrepotrust-dup-w60
LintCode qualityokopengrep 1.33.1; rules f1d2b562b4142
Tests and CICode qualityok—0
Type safetyCode qualityskipped—0
CI workflows (zizmor)Securityskipped—0
Dependencies (osv-scanner)Securityskipped—0
Release downloadsSecurityok—0
Security postureSecurityok—0
Package registriesSecurityskipped—0no registry dependencies declared
Static analysis (opengrep)Securityokopengrep 1.33.1; rules f1d2b562b41416
OpenSSF ScorecardSecurityokscorecard v5.6.00
Secrets (gitleaks)Securityokgitleaks 8.30.10

Score history

Scores from different scoring versions aren't directly comparable.

ScoredCommitScoringAI provenanceQualitySecurity
2026-11-1499a1d90a5f3dprov-5+qual-2+sec-20%4069
2026-11-1499a1d90a5f3dprov-4+qual-2+sec-20%4069

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/NMAC427/SwiftOCR/ai.svg)](https://repotrust.synapticcyber.com/r/github.com/NMAC427/SwiftOCR/)
[![RepoTrust quality](https://repotrust.synapticcyber.com/badge/github.com/NMAC427/SwiftOCR/quality.svg)](https://repotrust.synapticcyber.com/r/github.com/NMAC427/SwiftOCR/)
[![RepoTrust security](https://repotrust.synapticcyber.com/badge/github.com/NMAC427/SwiftOCR/security.svg)](https://repotrust.synapticcyber.com/r/github.com/NMAC427/SwiftOCR/)
Full text report
  • Repository: https://github.com/NMAC427/SwiftOCR
  • Commit: 99a1d90a5f3ddef51492bca8f6606f2a60e18ffe
  • Generated: 2026-11-14T14:52:01+00:00
  • Scorer 0.1.0, scoring prov-5+qual-2+sec-2, report schema v2

Scores

Pillar Score Signal Confidence Coverage
AI provenance (estimated AI-generated share) 0 none-detected 65% 100%
Code quality 40 poor 90% 100%
Security 69 weak 85% 100%

AI provenance

No AI attribution or AI-consistent velocity signals detected.

  • Explicitly attributed share (lower bound): 0.0%

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

  • Estimated AI-generated share: 0.0%

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

Month Lines added Attributed to AI
2016-05 1,309 0%
2016-06 317 0%
2016-07 271 0%
2016-10 393 0%
2016-11 237 0%
2016-12 3 0%
2017-09 12 0%
2017-10 59 0%
2018-10 3 0%
2019-01 16 0%
2019-11 19 0%
2020-05 30 0%

Evidence

  • step-by-step narration comment: // Step 1: convert to monochrome if necessary (framework/Sw)
  • step-by-step narration comment: // Step 2: do a lookup at each pixel based on the Bresenham circle, encode comparison in two color components (framework/Sw)
  • step-by-step narration comment: // Step 3: do non-maximum suppression of close corner points (framework/Sw)
  • step-by-step narration comment: // First, generate the normal Gaussian weights for a given sigma (framework/Sw)
  • step-by-step narration comment: // Next, normalize these weights to prevent the clipping of the Gaussian curve at the end of the discrete samples from r (framework/Sw)
  • step-by-step narration comment: // Finally, generate the shader from these weights (framework/Sw)
  • step-by-step narration comment: // First, generate the normal Gaussian weights for a given sigma (framework/Sw)
  • step-by-step narration comment: // Next, normalize these weights to prevent the clipping of the Gaussian curve at the end of the discrete samples from r (framework/Sw)

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 poor: test-to-source ratio 0.00, no CI test run detected; 20% of function code in complex or long functions; 29% duplicated lines. Weakest area: testing.

Area Score
Complexity (lizard) 55
Duplication 18
Code smells (Opengrep) 99
Tests and CI 0
Documentation 65
Type safety n/a
Process (Scorecard review/maintenance) 30
  • Functions: 1,987; mean complexity 2.1, 90th percentile 3; 20 complex and 19 long functions
  • Duplicated lines: 28.7% of 30,710 compared
  • Tests: 0 test lines for 49,411 source lines (ratio 0.00); CI test commands: none detected; 0% of recent source commits also change tests
  • Docs missing or thin: contributing, changelog

Most complex functions:

Security

Security posture is weak: no high-impact findings. Weakest area: posture.

Area Score
Secrets (gitleaks, tree + history) 100
Static analysis (Opengrep) 86
Vulnerable dependencies (OSV) n/a
CI workflows (zizmor) n/a
Posture (policy, updates, signing, lockfiles) 0
OpenSSF Scorecard 25
  • Posture checks passed: lockfiles; missing: security policy, dependency updates, signed commits
  • OpenSSF Scorecard aggregate: 2.9/10 (published 2026-11-09)

Top findings

Severity Finding Location
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/Extensions.swift:46
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/FFNN/FFNN.swift:567
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/FFNN/Random.swift:16
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:61
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:76
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:82
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:105
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:160
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:161
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:162
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:163
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:222
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:239
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:240
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:241
medium opengrep/swift.lang.crypto.insecure-random: A random number generator was detected which is not guaranteed to be Cryptographically secure. If the source of entropy is used for security purposes (e.g. with other Cryptographic operations), make sure to use the SecCopyRandomBytes API explicitly. [confidence low] framework/SwiftOCR/SwiftOCRTraining.swift:242

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: 49,411; test lines: 0
Language Lines
Objective-C 39,719
C 5,011
Swift 4,650
Shell 31