RepoTrust

Leaderboard github.com

Jack-Lee-Hiter/AlgorithmsByPython

算法/数据结构/Python/剑指offer/机器学习/leetcode

  • View repository ↗
  • Python
  • ★ 4,077
  • commit 78d7ac4d93db
  • 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

42/100

poor

Confidence
90%
Coverage
100%

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

Security

82/100

adequate

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 pacenot measured
  • Coding-style index (1.0+ means possible)0.00

Lines added per month all AI-attributed share

  1. 2016-06336 · 0% AI
  2. 2016-071,797 · 0% AI
  3. 2016-081,054 · 0% AI
  4. 2016-09103 · 0% AI
  5. 2017-050 · 0% AI
  6. 2017-110 · 0% AI
  7. 2018-0814 · 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
115
effective_loc
3,304
tools_detected
0
AI tool configurationok
artifacts
0
tools_configured
0
workflow_agents
0
Commit velocityok
excluded_import_loc
0
flagged_loc
0
flagged_loc_share
0.0%
flagged_units
0
max_loc_per_hour
181
measured_loc
3,304
median_loc_per_hour
36
pr_timed_units
0
pre_ai_era_burst_loc
0
pre_ai_era_bursts
0
pre_ai_era_measured_loc
3,304
work_units
42
Release velocityskipped
Coding styleok
count:assistant_voice
0
count:emoji_in_code
0
count:narrated_steps
0
count:placeholder
0
files:assistant_voice
0
files:emoji_in_code
0
files:narrated_steps
0
files:placeholder
0
index
0
lines_scanned
7,729
per_kloc:assistant_voice
0
per_kloc:emoji_in_code
0
per_kloc:narrated_steps
0
per_kloc:placeholder
0

Code quality

42 poor

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

How the score is built

  • Complexity96
  • Duplication36
  • Lint and smells49
  • Tests and CI0
  • Documentation40
  • Type safety40
  • Review processnot measured

Evidence by analyzer

Complexity (lizard)ok2 items
complex_functions
2
function_nloc
4,563
functions
495
long_functions
0
many_param_functions
1
mean_ccn
3.88
p90_ccn
8
risky_nloc_share
1.5%
Duplication (jscpd)ok10 items
compared_lines
6,534
duplicated_lines
1,097
duplicated_share
16.8%
files
152
Lintok
category:best-practice
12
category:maintainability
2
findings
14
scanned_lines
7,729
weighted_findings
22
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
46
cochange_share
0.0%
source_lines
7,729
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
121
Type safetyok
check:low_escape_density
yes
check:strict_config
no
escapes
0
escapes_per_kloc
0

Security

82 adequate

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

How the score is built

  • Secrets100
  • Static analysis (SAST)99
  • Vulnerable dependenciesnot measured
  • CI workflowsnot measured
  • Security posture0
  • 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
1
findings_high
0
findings_low
1
findings_medium
0
parse_errors
1
scanned_lines
7,729
weighted_findings
0.15
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
1.7%
unpinned_manifests
0
Release downloadsok
binary_assets
0
signals
0
suspicious
0

Findings

4 high10 medium1 low

SeverityRuleLocationMessageTool
high opengrep/python.lang.best-practice.open-never-closed Logistic regression/Logistic.py:6 file object opened without corresponding close Lint
high opengrep/python.lang.best-practice.open-never-closed Logistic regression/Logistic.py:82 file object opened without corresponding close Lint
high opengrep/python.lang.best-practice.open-never-closed Logistic regression/Logistic.py:83 file object opened without corresponding close Lint
high opengrep/python.lang.best-practice.open-never-closed SVM/SVM.py:5 file object opened without corresponding close Lint
medium opengrep/python.lang.maintainability.useless-if-body AVL.py:119 Useless if statement; both blocks have the same body Lint
medium opengrep/python.lang.best-practice.unspecified-open-encoding Logistic regression/Logistic.py:6 Missing 'encoding' parameter. 'open()' uses device locale encodings by default, corrupting files with special characters. Specify the encoding to ensure cross-platform support when opening files in text mode (e.g. encoding="utf-8"). Lint
medium opengrep/python.lang.best-practice.unspecified-open-encoding Logistic regression/Logistic.py:82 Missing 'encoding' parameter. 'open()' uses device locale encodings by default, corrupting files with special characters. Specify the encoding to ensure cross-platform support when opening files in text mode (e.g. encoding="utf-8"). Lint
medium opengrep/python.lang.best-practice.unspecified-open-encoding Logistic regression/Logistic.py:83 Missing 'encoding' parameter. 'open()' uses device locale encodings by default, corrupting files with special characters. Specify the encoding to ensure cross-platform support when opening files in text mode (e.g. encoding="utf-8"). Lint
medium opengrep/python.lang.maintainability.return-not-in-function QuickSort.py:46 `return` only makes sense inside a function Lint
medium opengrep/python.lang.best-practice.unspecified-open-encoding SVM/SVM.py:5 Missing 'encoding' parameter. 'open()' uses device locale encodings by default, corrupting files with special characters. Specify the encoding to ensure cross-platform support when opening files in text mode (e.g. encoding="utf-8"). Lint
medium opengrep/python.requests.best-practice.use-raise-for-status regularExpression/re练习.py:12 There's an HTTP request made with requests, but the raise_for_status() utility method isn't used. This can result in request errors going unnoticed and your code behaving in unexpected ways, such as if your authorization API returns a... Lint
medium opengrep/python.requests.best-practice.use-timeout regularExpression/re练习.py:12 Detected a 'requests' call without a timeout set. By default, 'requests' calls wait until the connection is closed. This means a 'requests' call without a timeout will hang the program if a response is never received. Consider setting a... Lint
medium opengrep/python.requests.best-practice.use-raise-for-status regularExpression/re练习.py:35 There's an HTTP request made with requests, but the raise_for_status() utility method isn't used. This can result in request errors going unnoticed and your code behaving in unexpected ways, such as if your authorization API returns a... Lint
medium opengrep/python.requests.best-practice.use-timeout regularExpression/re练习.py:35 Detected a 'requests' call without a timeout set. By default, 'requests' calls wait until the connection is closed. This means a 'requests' call without a timeout will hang the program if a response is never received. Consider setting a... Lint
low opengrep/python.lang.security.audit.insecure-transport.requests.request-with-http regularExpression/re练习.py:12 Detected a request using 'http://'. This request will be unencrypted, and attackers could listen into traffic on the network and be able to obtain sensitive information. Use 'https://' instead. [confidence medium] Static analysis (opengrep)

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
Complexity (lizard)Code qualityoklizard 1.25.10
DocumentationCode qualityok—0
Duplication (jscpd)Code qualityokrepotrust-dup-w60
LintCode qualityokopengrep 1.33.1; rules f1d2b562b41414
Tests and CICode qualityok—0
Type safetyCode qualityok—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 f1d2b562b4141
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-1478d7ac4d93dbprov-5+qual-2+sec-20%4282
2026-11-1478d7ac4d93dbprov-4+qual-2+sec-20%4282

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/Jack-Lee-Hiter/AlgorithmsByPython/ai.svg)](https://repotrust.synapticcyber.com/r/github.com/Jack-Lee-Hiter/AlgorithmsByPython/)
[![RepoTrust quality](https://repotrust.synapticcyber.com/badge/github.com/Jack-Lee-Hiter/AlgorithmsByPython/quality.svg)](https://repotrust.synapticcyber.com/r/github.com/Jack-Lee-Hiter/AlgorithmsByPython/)
[![RepoTrust security](https://repotrust.synapticcyber.com/badge/github.com/Jack-Lee-Hiter/AlgorithmsByPython/security.svg)](https://repotrust.synapticcyber.com/r/github.com/Jack-Lee-Hiter/AlgorithmsByPython/)
Full text report

Scores

Pillar Score Signal Confidence Coverage
AI provenance (estimated AI-generated share) 0 none-detected 65% 100%
Code quality 42 poor 90% 100%
Security 82 adequate 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%
Month Lines added Attributed to AI
2016-06 336 0%
2016-07 1,797 0%
2016-08 1,054 0%
2016-09 103 0%
2018-08 14 0%

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; 1% of function code in complex or long functions; 17% duplicated lines. Weakest area: testing.

Area Score
Complexity (lizard) 96
Duplication 36
Code smells (Opengrep) 49
Tests and CI 0
Documentation 40
Type safety 40
Process (Scorecard review/maintenance) n/a
  • Functions: 495; mean complexity 3.9, 90th percentile 8; 2 complex and 0 long functions
  • Duplicated lines: 16.8% of 6,534 compared
  • Tests: 0 test lines for 7,729 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:

  • [match in Target Offer/正则表达式匹配.py: complexity 21, 27 lines](https://github.com/Jack-Lee-Hiter/AlgorithmsByPython/blob/78d7ac4d93db9da40601a5567350bfb3e97e7d46/Target Offer/正则表达式匹配.py#L11)
  • smoSimple in SVM/SVM.py: complexity 16, 39 lines

Security

Security posture is adequate: 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) n/a
Posture (policy, updates, signing, lockfiles) 0
OpenSSF Scorecard n/a
  • Posture checks passed: lockfiles; missing: security policy, dependency updates, signed commits

Top findings

Severity Finding Location
low opengrep/python.lang.security.audit.insecure-transport.requests.request-with-http: Detected a request using 'http://'. This request will be unencrypted, and attackers could listen into traffic on the network and be able to obtain sensitive information. Use 'https://' instead. [confidence medium] regularExpression/re练习.py:12

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: 7,729; test lines: 0
Language Lines
Python 7,702
Shell 27