RepoTrust

Leaderboard github.com

selwin/diff-viewer

  • View repository ↗
  • Swift
  • ★ 0
  • commit eaa47cef4315
  • scored 2026-11-14
  • scoring prov-5+qual-2+sec-2

AI provenance

10%

explicit

Confidence
95%
Coverage
100%

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

Code quality

67/100

adequate

Confidence
90%
Coverage
100%

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

Security

87/100

strong

Confidence
85%
Coverage
100%

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

AI provenance

10% explicit

Explicit AI attribution on 10% of first-party code added; an estimated 10% including velocity signals.

How the score is built

  • Explicitly attributed share10%
  • Unattributed share in AI-pace bursts29%
  • Estimated AI-generated share10%
  • AI tool configuration files0
  • Work sessions at AI pace17
  • Releases at AI pacenot measured
  • Coding-style index (1.0+ means possible)0.09

Attributed AI tools

ToolCommitsLines addedFirst seenLast seen
Claude Code259,6542026-09-122026-09-30
GitHub Copilot coding agent17732026-09-242026-09-24

Lines added per month all AI-attributed share

  1. 2026-0968,183 · 15% AI
  2. 2026-1026,562 · 0% AI
  3. 2026-119,168 · 0% AI

Findings in AI-attributed lines vs the rest

From git blame: 7,034 lines trace to AI-attributed commits, 68,508 to others. Reported, not scored.

Findings per 1,000 linesAI-attributedOtherRatio
Code quality0.570.069.81×
Security0.990.00—

Evidence by analyzer

Explicit AI attributionok27 items
attributed_commit_share
14.9%
attributed_commits
26
attributed_loc
10,427
attributed_loc_share
10.0%
commits
175
effective_loc
103,913
tools_detected
2
AI tool configurationok
artifacts
0
tools_configured
0
workflow_agents
0
Commit velocityok15 items
excluded_import_loc
4,424
flagged_loc
35,715
flagged_loc_share
35.9%
flagged_units
17
max_loc_per_hour
6,420
measured_loc
99,489
median_loc_per_hour
248.40
pr_timed_units
89
pre_ai_era_burst_loc
0
pre_ai_era_bursts
0
pre_ai_era_measured_loc
0
work_units
136
Release velocityskipped
Coding styleok
count:assistant_voice
0
count:emoji_in_code
14
count:narrated_steps
0
count:placeholder
0
files:assistant_voice
0
files:emoji_in_code
6
files:narrated_steps
0
files:placeholder
0
index
0.09
lines_scanned
75,542
per_kloc:assistant_voice
0
per_kloc:emoji_in_code
0.18
per_kloc:narrated_steps
0
per_kloc:placeholder
0
Findings in AI-written linesok
ai_lines
7,034
blame_failures
0
files_blamed
447
other_lines
68,508
quality:ai_findings
4
quality:ai_per_kloc
0.57
quality:other_findings
4
quality:other_per_kloc
0.06
quality:ratio
9.81
security:ai_findings
7
security:ai_per_kloc
0.99
security:other_findings
0
security:other_per_kloc
0

Code quality

67 adequate

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

How the score is built

  • Complexity94
  • Duplication88
  • Lint and smells99
  • Tests and CI25
  • Documentation40
  • Type safetynot measured
  • Review processnot measured

Evidence by analyzer

Complexity (lizard)ok10 items
complex_functions
22
function_nloc
48,549
functions
5,392
long_functions
0
many_param_functions
14
mean_ccn
2.18
p90_ccn
5
risky_nloc_share
2.2%
Duplication (jscpd)ok10 items
compared_lines
57,236
duplicated_lines
1,257
duplicated_share
2.2%
files
447
Lintok
category:correctness
8
findings
8
scanned_lines
75,542
weighted_findings
2
Tests and CIok4 items
  • CI config: .github/workflows/format.yml .github/workflows/format.yml
  • CI config: .github/workflows/lint.yml .github/workflows/lint.yml
  • CI config: .github/workflows/test.yml .github/workflows/test.yml
  • CI runs linters (swiftlint)
check:ci_present
yes
check:ci_runs_lint
yes
check:ci_runs_tests
no
check:has_tests
no
check:test_ratio
no
check:tests_cochange
no
ci_files
3
cochange_commits
160
cochange_share
0.0%
source_lines
75,542
test_lines
0
test_ratio
0
Documentationok1 item
  • README.md README.md
check:changelog
no
check:contributing
no
check:license
no
check:readme
yes
readme_lines
188
Type safetyskipped

Security

87 strong

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

How the score is built

  • Secrets100
  • Static analysis (SAST)99
  • Vulnerable dependenciesnot measured
  • CI workflows94
  • Security posture20
  • OpenSSF Scorecardnot measured

Evidence by analyzer

OpenSSF Scorecardskipped

no published OpenSSF Scorecard result for this repo

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
7
findings_high
0
findings_low
0
findings_medium
7
parse_errors
6
scanned_lines
75,542
weighted_findings
1.75
Dependencies (osv-scanner)skipped
CI workflows (zizmor)ok
findings
3
findings_high
0
findings_low
0
findings_medium
3
penalty
3.60
workflows
3
Security postureok
check:dependency_updates
no
check:lockfiles
yes
check:security_policy
no
check:signed_commits
yes
signed_commit_share
52.0%
unpinned_manifests
0
Release downloadsok
binary_assets
0
signals
0
suspicious
0

Findings

10 medium8 low

SeverityRuleLocationMessageTool
medium zizmor/artipacked .github/workflows/format.yml:38 credential persistence through GitHub Actions artifacts [confidence low] CI workflows (zizmor)
medium zizmor/artipacked .github/workflows/lint.yml:35 credential persistence through GitHub Actions artifacts [confidence low] CI workflows (zizmor)
medium zizmor/artipacked .github/workflows/test.yml:26 credential persistence through GitHub Actions artifacts [confidence low] CI workflows (zizmor)
medium opengrep/swift.lang.crypto.insecure-random DiffViewerTests/LineDiffTests.swift:66 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 DiffViewerTests/LineDiffTests.swift:69 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 DiffViewerTests/RowFoldingTests.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 DiffViewerTests/RowFoldingTests.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 DiffViewerTests/RowFoldingTests.swift:165 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 DiffViewerTests/RowFoldingTests.swift:171 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 DiffViewerTests/RowFoldingTests.swift:174 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 scripts/check-unstaged.sh:29 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 scripts/check-unstaged.sh:36 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 scripts/check-unstaged.sh:42 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 scripts/snapshot.sh:31 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 scripts/swift-format.sh:23 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 scripts/swift-format.sh:23 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 scripts/swiftlint.sh:24 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 scripts/swiftlint.sh:24 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 provenanceskipped—0
Coding styleAI provenanceok—0
Commit velocityAI provenanceokprov-40
Findings in AI-written linesAI provenanceokgit-blame0
Complexity (lizard)Code qualityoklizard 1.25.10
DocumentationCode qualityok—0
Duplication (jscpd)Code qualityokrepotrust-dup-w60
LintCode qualityokopengrep 1.33.1; rules f1d2b562b4148
Tests and CICode qualityok—0
Type safetyCode qualityskipped—0
CI workflows (zizmor)Securityokzizmor 1.32.03
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 f1d2b562b4147
OpenSSF ScorecardSecurityskipped—0no published OpenSSF Scorecard result for this repo
Secrets (gitleaks)Securityokgitleaks 8.30.10

Score history

Scores from different scoring versions aren't directly comparable.

ScoredCommitScoringAI provenanceQualitySecurity
2026-11-14eaa47cef4315prov-5+qual-2+sec-210%6787
2026-11-14eaa47cef4315prov-4+qual-2+sec-210%6787

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/selwin/diff-viewer/ai.svg)](https://repotrust.synapticcyber.com/r/github.com/selwin/diff-viewer/)
[![RepoTrust quality](https://repotrust.synapticcyber.com/badge/github.com/selwin/diff-viewer/quality.svg)](https://repotrust.synapticcyber.com/r/github.com/selwin/diff-viewer/)
[![RepoTrust security](https://repotrust.synapticcyber.com/badge/github.com/selwin/diff-viewer/security.svg)](https://repotrust.synapticcyber.com/r/github.com/selwin/diff-viewer/)
Full text report
  • Repository: https://github.com/selwin/diff-viewer
  • Commit: eaa47cef4315003b08d15754e2bc0374140864b0
  • Generated: 2026-11-14T14:52:07+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) 10 explicit 95% 100%
Code quality 67 adequate 90% 100%
Security 87 strong 85% 100%

AI provenance

Explicit AI attribution on 10% of first-party code added; an estimated 10% including velocity signals.

  • Explicitly attributed share (lower bound): 10.0%
  • Unattributed share in AI-consistent velocity bursts: 29.1%
  • Estimated AI-generated share: 10.0%
AI tool Attributed commits Lines added
Claude Code 25 9,654
GitHub Copilot coding agent 1 773

Current source lines last changed by AI-attributed commits: 7,034 of 75,542.

Findings per 1,000 lines AI-attributed Other Ratio
Quality 0.569 0.058 9.81x
Security 0.995 0.0 n/a
  • Stylometry index: 0.09 per 1,000 lines (narrated steps 0, placeholders 0, assistant phrasing 0, emoji 14). Reported as a signal, not scored.
Month Lines added Attributed to AI
2026-09 68,183 15%
2026-10 26,562 0%
2026-11 9,168 0%

Evidence

  • Claude Code: PR description attribution (a64ef7e33a6c)
  • Claude Code: trailer 'Co-Authored-By: Claude' (5b3e225a3d6f)
  • Claude Code: trailer 'Co-Authored-By: Claude' (922c1ef29352)
  • Claude Code: trailer 'Co-Authored-By: Claude' (01bf79d97624)
  • Claude Code: trailer 'Co-Authored-By: Claude' (50055c751020)
  • Claude Code: trailer 'Co-Authored-By: Claude' (94b4c8ae8fca)
  • Claude Code: trailer 'Co-Authored-By: Claude' (77269cefcd6b)
  • Claude Code: trailer 'Co-Authored-By: Claude' (dd56dd51e0a7)
  • Claude Code: trailer 'Co-authored-by: Claude' (b90273baa796)
  • Claude Code: trailer 'Co-authored-by: Claude' (11ca7a8445db)
  • GitHub Copilot coding agent: trailer 'Co-authored-by: copilot' (6b95d51a678c)
  • Claude Code: trailer 'Co-Authored-By: Claude' (a7e7305c67b6)
  • Claude Code: trailer 'Co-Authored-By: Claude' (a045da284fd5)
  • Claude Code: trailer 'Co-Authored-By: Claude' (8894631ccb5e)
  • Claude Code: trailer 'Co-Authored-By: Claude' (b6a0bd404aa2)

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.00, no CI test run detected; 2% of function code in complex or long functions; 2% duplicated lines. Weakest area: testing.

Area Score
Complexity (lizard) 94
Duplication 88
Code smells (Opengrep) 99
Tests and CI 25
Documentation 40
Type safety n/a
Process (Scorecard review/maintenance) n/a
  • Functions: 5,392; mean complexity 2.2, 90th percentile 5; 22 complex and 0 long functions
  • Duplicated lines: 2.2% of 57,236 compared
  • Tests: 0 test lines for 75,542 source lines (ratio 0.00); CI test commands: none detected; 0% of recent source commits also change tests
  • Docs missing or thin: license, contributing, changelog

Most complex functions:

Security

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

Area Score
Secrets (gitleaks, tree + history) 100
Static analysis (Opengrep) 99
Vulnerable dependencies (OSV) n/a
CI workflows (zizmor) 94
Posture (policy, updates, signing, lockfiles) 20
OpenSSF Scorecard n/a
  • Posture checks passed: signed commits, lockfiles; missing: security policy, dependency updates

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] DiffViewerTests/LineDiffTests.swift:66
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] DiffViewerTests/LineDiffTests.swift:69
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] DiffViewerTests/RowFoldingTests.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] DiffViewerTests/RowFoldingTests.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] DiffViewerTests/RowFoldingTests.swift:165
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] DiffViewerTests/RowFoldingTests.swift:171
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] DiffViewerTests/RowFoldingTests.swift:174
medium zizmor/artipacked: credential persistence through GitHub Actions artifacts [confidence low] .github/workflows/format.yml:38
medium zizmor/artipacked: credential persistence through GitHub Actions artifacts [confidence low] .github/workflows/lint.yml:35
medium zizmor/artipacked: credential persistence through GitHub Actions artifacts [confidence low] .github/workflows/test.yml:26

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: 75,542; test lines: 0
Language Lines
Swift 75,361
Shell 181