RepoTrust

Leaderboard github.com

LinkedDestiny/swoole-doc

swoole文档及入门教程

  • View repository ↗
  • PHP
  • ★ 1,581
  • commit 2168d4e3fb74
  • 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

50/100

weak

Confidence
90%
Coverage
100%

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

Security

70/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. 2014-102,138 · 0% AI
  2. 2014-111,623 · 0% AI
  3. 2014-12105 · 0% AI
  4. 2015-040 · 0% AI
  5. 2015-051,553 · 0% AI
  6. 2016-030 · 0% AI
  7. 2016-060 · 0% AI
  8. 2016-073,209 · 0% AI
  9. 2016-08895 · 0% AI
  10. 2017-036 · 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
118
effective_loc
9,529
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
388.25
measured_loc
9,529
median_loc_per_hour
57.81
pr_timed_units
0
pre_ai_era_burst_loc
0
pre_ai_era_bursts
0
pre_ai_era_measured_loc
9,529
work_units
31
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
8,625
per_kloc:assistant_voice
0
per_kloc:emoji_in_code
0
per_kloc:narrated_steps
0
per_kloc:placeholder
0

Code quality

50 weak

Code quality is weak: test-to-source ratio 0.01, no CI test run detected; 1% of function code in complex or long functions; 43% duplicated lines. Weakest area: duplication.

How the score is built

  • Complexity98
  • Duplication7
  • Lint and smells97
  • Tests and CI22
  • Documentation20
  • Type safetynot measured
  • Review processnot measured

Evidence by analyzer

Complexity (lizard)ok1 item
complex_functions
1
function_nloc
4,574
functions
520
long_functions
0
many_param_functions
0
mean_ccn
1.85
p90_ccn
4
risky_nloc_share
0.6%
Duplication (jscpd)ok10 items
compared_lines
5,413
duplicated_lines
2,352
duplicated_share
43.5%
files
156
Lintok
category:correctness
1
findings
1
scanned_lines
8,081
weighted_findings
1
Tests and CIok
check:ci_present
no
check:ci_runs_lint
no
check:ci_runs_tests
no
check:has_tests
yes
check:test_ratio
no
check:tests_cochange
no
ci_files
0
cochange_commits
40
cochange_share
2.5%
source_lines
8,625
test_lines
82
test_ratio
0.01
Documentationok1 item
  • README.md README.md
check:changelog
no
check:contributing
no
check:license
no
check:readme
no
readme_lines
5
Type safetyskipped

Security

70 adequate

Security posture is adequate: 1 possible secret(s) in the tree, 0 only in history; 5 high-severity SAST findings. Weakest area: posture.

How the score is built

  • Secrets66
  • Static analysis (SAST)81
  • Vulnerable dependencies100
  • 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
1
secrets_history
0
secrets_low_confidence
0
secrets_nonprod
0
Static analysis (opengrep)ok
findings
9
findings_high
5
findings_low
0
findings_medium
4
parse_errors
2
scanned_lines
8,081
weighted_findings
4.75
Dependencies (osv-scanner)ok
penalty
0
vulnerabilities
0
vulnerable_packages
0
vulns_critical
0
vulns_high
0
vulns_low
0
vulns_medium
0
vulns_unknown
0
CI workflows (zizmor)skipped
Security postureok1 item
  • src/course/ws/chat/composer.json has no lockfile alongside it (unpinned dependencies) src/course/ws/chat/composer.json
check:dependency_updates
no
check:lockfiles
no
check:security_policy
no
check:signed_commits
no
signed_commit_share
0.0%
unpinned_manifests
1
Release downloadsok
binary_assets
0
signals
0
suspicious
0

Findings

6 high5 medium

SeverityRuleLocationMessageTool
high opengrep/php.lang.security.weak-crypto src/DBPool/db.php:37 Detected usage of weak crypto function. Consider using stronger alternatives. [confidence low] Static analysis (opengrep)
high opengrep/php.lang.security.exec-use src/course/ws/shell/shell_server.php:112 Executing non-constant commands. This can lead to command injection. [confidence low] Static analysis (opengrep)
high opengrep/php.lang.security.exec-use src/course/ws/shell/shell_server.php:119 Executing non-constant commands. This can lead to command injection. [confidence low] Static analysis (opengrep)
high opengrep/php.lang.security.weak-crypto src/course/ws/ws_update/ws_server.php:66 Detected usage of weak crypto function. Consider using stronger alternatives. [confidence low] Static analysis (opengrep)
high gitleaks/private-key src/tmp/cert/test.key:1 Possible private-key secret in the current tree Secrets (gitleaks)
high opengrep/c.lang.security.double-free src/tmp/swoole_ssl_client.c:71 Variable 'line' was freed twice. This can lead to undefined behavior. [confidence low] Static analysis (opengrep)
medium opengrep/c.lang.correctness.incorrect-use-ato-fn src/tmp/swoole_ssl_client.c:95 Avoid the 'ato*()' family of functions. Their use can lead to undefined behavior, integer overflows, and lack of appropriate error handling. Instead prefer the 'strtol*()' family of functions. Lint
medium opengrep/php.symfony.security.audit.symfony-non-literal-redirect src/03/yii_task/protected/controllers/SiteController.php:107 The `redirect()` method does not check its destination in any way. If you redirect to a URL provided by end-users, your application may be open to the unvalidated redirects security vulnerability. Consider using literal values or an... Static analysis (opengrep)
medium opengrep/php.symfony.security.audit.symfony-non-literal-redirect src/03/yii_task/protected/controllers/SiteController.php:95 The `redirect()` method does not check its destination in any way. If you redirect to a URL provided by end-users, your application may be open to the unvalidated redirects security vulnerability. Consider using literal values or an... Static analysis (opengrep)
medium opengrep/php.lang.security.unserialize-use src/course/task/Server.php:53 Calling `unserialize()` with user input in the pattern can lead to arbitrary code execution. Consider using JSON or structured data approaches (e.g. Google Protocol Buffers). [confidence low] Static analysis (opengrep)
medium opengrep/c.lang.security.function-use-after-free src/tmp/swoole_ssl_client.c:70 Variable 'line' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] 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 f1d2b562b4141
Tests and CICode qualityok—0
Type safetyCode qualityskipped—0
CI workflows (zizmor)Securityskipped—0
Dependencies (osv-scanner)Securityokosv-scanner version: 2.7.10
Release downloadsSecurityok—0
Security postureSecurityok—0
Package registriesSecurityskipped—0no registry dependencies declared
Static analysis (opengrep)Securityokopengrep 1.33.1; rules f1d2b562b4149
OpenSSF ScorecardSecurityskipped—0no published OpenSSF Scorecard result for this repo
Secrets (gitleaks)Securityokgitleaks 8.30.11

Score history

Scores from different scoring versions aren't directly comparable.

ScoredCommitScoringAI provenanceQualitySecurity
2026-11-142168d4e3fb74prov-5+qual-2+sec-20%5070
2026-11-142168d4e3fb74prov-4+qual-2+sec-20%5070

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

Scores

Pillar Score Signal Confidence Coverage
AI provenance (estimated AI-generated share) 0 none-detected 65% 100%
Code quality 50 weak 90% 100%
Security 70 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
2014-10 2,138 0%
2014-11 1,623 0%
2014-12 105 0%
2015-05 1,553 0%
2016-07 3,209 0%
2016-08 895 0%
2017-03 6 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 weak: test-to-source ratio 0.01, no CI test run detected; 1% of function code in complex or long functions; 43% duplicated lines. Weakest area: duplication.

Area Score
Complexity (lizard) 98
Duplication 7
Code smells (Opengrep) 97
Tests and CI 22
Documentation 20
Type safety n/a
Process (Scorecard review/maintenance) n/a
  • Functions: 520; mean complexity 1.9, 90th percentile 4; 1 complex and 0 long functions
  • Duplicated lines: 43.5% of 5,413 compared
  • Tests: 82 test lines for 8,625 source lines (ratio 0.01); CI test commands: none detected; 2% of recent source commits also change tests
  • Docs missing or thin: readme, license, contributing, changelog

Most complex functions:

Security

Security posture is adequate: 1 possible secret(s) in the tree, 0 only in history; 5 high-severity SAST findings. Weakest area: posture.

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

Top findings

Severity Finding Location
high gitleaks/private-key: Possible private-key secret in the current tree src/tmp/cert/test.key:1
high opengrep/php.lang.security.weak-crypto: Detected usage of weak crypto function. Consider using stronger alternatives. [confidence low] src/DBPool/db.php:37
high opengrep/php.lang.security.exec-use: Executing non-constant commands. This can lead to command injection. [confidence low] src/course/ws/shell/shell_server.php:112
high opengrep/php.lang.security.exec-use: Executing non-constant commands. This can lead to command injection. [confidence low] src/course/ws/shell/shell_server.php:119
high opengrep/php.lang.security.weak-crypto: Detected usage of weak crypto function. Consider using stronger alternatives. [confidence low] src/course/ws/ws_update/ws_server.php:66
high opengrep/c.lang.security.double-free: Variable 'line' was freed twice. This can lead to undefined behavior. [confidence low] src/tmp/swoole_ssl_client.c:71
medium opengrep/php.symfony.security.audit.symfony-non-literal-redirect: The redirect() method does not check its destination in any way. If you redirect to a URL provided by end-users, your application may be open to the unvalidated redirects security vulnerability. Consider using literal values or an allowlist to validate URLs. [confidence low] src/03/yii_task/protected/controllers/SiteController.php:95
medium opengrep/php.symfony.security.audit.symfony-non-literal-redirect: The redirect() method does not check its destination in any way. If you redirect to a URL provided by end-users, your application may be open to the unvalidated redirects security vulnerability. Consider using literal values or an allowlist to validate URLs. [confidence low] src/03/yii_task/protected/controllers/SiteController.php:107
medium opengrep/php.lang.security.unserialize-use: Calling unserialize() with user input in the pattern can lead to arbitrary code execution. Consider using JSON or structured data approaches (e.g. Google Protocol Buffers). [confidence low] src/course/task/Server.php:53
medium opengrep/c.lang.security.function-use-after-free: Variable 'line' was passed to a function after being freed. This can lead to undefined behavior. [confidence low] src/tmp/swoole_ssl_client.c:70

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: 8,625; test lines: 82
Language Lines
PHP 8,035
SQL 544
C 117
Shell 11