Leaderboard github.com
LinkedDestiny/swoole-doc
swoole文档及入门教程
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
- 2014-102,138 · 0% AI
- 2014-111,623 · 0% AI
- 2014-12105 · 0% AI
- 2015-040 · 0% AI
- 2015-051,553 · 0% AI
- 2016-030 · 0% AI
- 2016-060 · 0% AI
- 2016-073,209 · 0% AI
- 2016-08895 · 0% AI
- 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
- 6+ duplicated lines: src/01/swoole_simple_client.php:1 and src/05/client.php:1
- 6+ duplicated lines: src/01/swoole_simple_client.php:18 and src/06/swoole_async_io_client.php:16
- 6+ duplicated lines: src/01/swoole_simple_server.php:1 and src/02/swoole_task_server.php:1
- 6+ duplicated lines: src/01/swoole_simple_server.php:17 and src/05/swoole_eof_server.php:19
- 6+ duplicated lines: src/01/swoole_simple_server.php:18 and src/04/reload/swoole_reload_server.php:24
- 6+ duplicated lines: src/02/swoole_async_client.php:1 and src/03/swoole_heartbeat_client.php:1
- 6+ duplicated lines: src/02/swoole_task_server.php:9 and src/04/reload/swoole_reload_server.php:14
- 6+ duplicated lines: src/02/swoole_task_server.php:15 and src/course/task/Server.php:20
- 6+ duplicated lines: src/02/swoole_task_server.php:19 and src/03/swoole_mysql_pool_server.php:20
- 6+ duplicated lines: src/02/swoole_task_server.php:25 and src/04/swoole_after_server.php:23
- 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
| Severity | Rule | Location | Message | Tool |
|---|---|---|---|---|
| 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.
| Analyzer | Pillar | Status | Version | Findings | Note |
|---|---|---|---|---|---|
| AI tool configuration | AI provenance | ok | signatures-v1 | 0 | |
| Explicit AI attribution | AI provenance | ok | signatures-v1 | 0 | |
| Release velocity | AI provenance | skipped | — | 0 | |
| Coding style | AI provenance | ok | — | 0 | |
| Commit velocity | AI provenance | ok | prov-4 | 0 | |
| Complexity (lizard) | Code quality | ok | lizard 1.25.1 | 0 | |
| Documentation | Code quality | ok | — | 0 | |
| Duplication (jscpd) | Code quality | ok | repotrust-dup-w6 | 0 | |
| Lint | Code quality | ok | opengrep 1.33.1; rules f1d2b562b414 | 1 | |
| Tests and CI | Code quality | ok | — | 0 | |
| Type safety | Code quality | skipped | — | 0 | |
| CI workflows (zizmor) | Security | skipped | — | 0 | |
| Dependencies (osv-scanner) | Security | ok | osv-scanner version: 2.7.1 | 0 | |
| Release downloads | Security | ok | — | 0 | |
| Security posture | Security | ok | — | 0 | |
| Package registries | Security | skipped | — | 0 | no registry dependencies declared |
| Static analysis (opengrep) | Security | ok | opengrep 1.33.1; rules f1d2b562b414 | 9 | |
| OpenSSF Scorecard | Security | skipped | — | 0 | no published OpenSSF Scorecard result for this repo |
| Secrets (gitleaks) | Security | ok | gitleaks 8.30.1 | 1 |
Score history
Scores from different scoring versions aren't directly comparable.
| Scored | Commit | Scoring | AI provenance | Quality | Security |
|---|---|---|---|---|---|
| 2026-11-14 | 2168d4e3fb74 | prov-5+qual-2+sec-2 | 0% | 50 | 70 |
| 2026-11-14 | 2168d4e3fb74 | prov-4+qual-2+sec-2 | 0% | 50 | 70 |
Full text report
- Repository: https://github.com/LinkedDestiny/swoole-doc
- Commit:
2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb - Generated: 2026-11-14T14:52:00+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 | 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 |