{"schema_version":"2","scorer_version":"0.1.0","scoring_version":"prov-5+qual-2+sec-2","generated_at":"2026-11-14T14:52:00.906415Z","repo":{"ref":{"host":"github.com","owner":"LinkedDestiny","name":"swoole-doc"},"default_branch":"master","clone_url":"https://github.com/LinkedDestiny/swoole-doc.git","html_url":"https://github.com/LinkedDestiny/swoole-doc","description":"swoole文档及入门教程","stars":1581,"forks":711,"is_fork":false,"is_archived":false,"is_private":false,"size_kb":445,"primary_language":"PHP","license_spdx":null,"created_at":"2014-10-19T08:12:06Z","pushed_at":"2017-03-29T02:36:53Z","security_policy_url":null,"distribution":{"owner_created_at":"2013-10-15T07:38:36Z","owner_type":"User","release_assets":[]}},"commit_sha":"2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb","profile":{"lines_by_language":{"PHP":8035,"SQL":544,"C":117,"Shell":11},"files_by_category":{"source":156,"docs":29,"vendored":29,"other":13,"config":9,"binary":3,"test":3,"generated":3},"source_lines":8625,"test_lines":82},"pillars":{"ai_provenance":{"score":0.0,"confidence":0.65,"coverage":1.0,"label":"none-detected","breakdown":{"attributed_share":0.0,"suspected_share":0.0,"estimated_share":0.0,"ai_artifacts":0.0,"flagged_work_units":0.0,"flagged_releases":null,"style_index":0.0},"summary":"No AI attribution or AI-consistent velocity signals detected."},"quality":{"score":50.2,"confidence":0.9,"coverage":1.0,"label":"weak","breakdown":{"complexity":98.2,"duplication":7.4,"lint":97.0,"testing":21.5,"docs":20.0,"type_safety":null,"process":null},"summary":"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."},"security":{"score":70.3,"confidence":0.85,"coverage":1.0,"label":"adequate","breakdown":{"secrets":65.9,"sast":81.4,"dependencies":100.0,"ci_actions":null,"posture":0.0,"scorecard":null},"summary":"Security posture is adequate: 1 possible secret(s) in the tree, 0 only in history; 5 high-severity SAST findings. Weakest area: posture."}},"analyzer_results":[{"analyzer":"sec-scorecard","pillar":"security","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":"no published OpenSSF Scorecard result for this repo"},{"analyzer":"sec-registry","pillar":"security","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":"no registry dependencies declared"},{"analyzer":"ai-attribution","pillar":"ai_provenance","status":"ok","tool_version":"signatures-v1","metrics":{"commits":118.0,"attributed_commits":0.0,"attributed_commit_share":0.0,"effective_loc":9529.0,"attributed_loc":0.0,"attributed_loc_share":0.0,"tools_detected":0.0},"findings":[],"evidence":[],"data":{"attributed_loc_by_commit":{},"tools":{},"monthly":{"2014-10":{"loc":2138,"attributed_loc":0},"2014-11":{"loc":1623,"attributed_loc":0},"2014-12":{"loc":105,"attributed_loc":0},"2015-04":{"loc":0,"attributed_loc":0},"2015-05":{"loc":1553,"attributed_loc":0},"2016-03":{"loc":0,"attributed_loc":0},"2016-06":{"loc":0,"attributed_loc":0},"2016-07":{"loc":3209,"attributed_loc":0},"2016-08":{"loc":895,"attributed_loc":0},"2017-03":{"loc":6,"attributed_loc":0}}},"error":null},{"analyzer":"ai-artifacts","pillar":"ai_provenance","status":"ok","tool_version":"signatures-v1","metrics":{"artifacts":0.0,"workflow_agents":0.0,"tools_configured":0.0},"findings":[],"evidence":[],"data":{"artifacts":[],"workflows":[],"tools":[]},"error":null},{"analyzer":"ai-velocity","pillar":"ai_provenance","status":"ok","tool_version":"prov-4","metrics":{"work_units":31.0,"flagged_units":0.0,"pre_ai_era_bursts":0.0,"pre_ai_era_measured_loc":9529.0,"pre_ai_era_burst_loc":0.0,"measured_loc":9529.0,"flagged_loc":0.0,"flagged_loc_share":0.0,"max_loc_per_hour":388.25,"median_loc_per_hour":57.81487101669195,"pr_timed_units":0.0,"excluded_import_loc":0.0},"findings":[],"evidence":[],"data":{"flagged_loc_by_commit":{},"excluded_import_commits":[]},"error":null},{"analyzer":"ai-release-velocity","pillar":"ai_provenance","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"ai-stylometry","pillar":"ai_provenance","status":"ok","tool_version":null,"metrics":{"lines_scanned":8625.0,"index":0.0,"count:narrated_steps":0.0,"per_kloc:narrated_steps":0.0,"files:narrated_steps":0.0,"count:placeholder":0.0,"per_kloc:placeholder":0.0,"files:placeholder":0.0,"count:emoji_in_code":0.0,"per_kloc:emoji_in_code":0.0,"files:emoji_in_code":0.0,"count:assistant_voice":0.0,"per_kloc:assistant_voice":0.0,"files:assistant_voice":0.0},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"sec-secrets","pillar":"security","status":"ok","tool_version":"gitleaks 8.30.1","metrics":{"secrets_current":1.0,"secrets_history":0.0,"secrets_nonprod":0.0,"secrets_low_confidence":0.0},"findings":[{"rule_id":"gitleaks/private-key","severity":"high","message":"Possible private-key secret in the current tree","path":"src/tmp/cert/test.key","line":1,"fingerprint":"src/tmp/cert/test.key:private-key:1"}],"evidence":[],"data":{},"error":null},{"analyzer":"sec-sast","pillar":"security","status":"ok","tool_version":"opengrep 1.33.1; rules f1d2b562b414","metrics":{"findings":9.0,"findings_high":5.0,"findings_medium":4.0,"findings_low":0.0,"weighted_findings":4.75,"scanned_lines":8081.0,"parse_errors":2.0},"findings":[{"rule_id":"opengrep/php.lang.security.weak-crypto","severity":"high","message":"Detected usage of weak crypto function. Consider using stronger alternatives. [confidence low]","path":"src/DBPool/db.php","line":37,"fingerprint":"php.lang.security.weak-crypto:src/DBPool/db.php:37"},{"rule_id":"opengrep/php.lang.security.exec-use","severity":"high","message":"Executing non-constant commands. This can lead to command injection. [confidence low]","path":"src/course/ws/shell/shell_server.php","line":112,"fingerprint":"php.lang.security.exec-use:src/course/ws/shell/shell_server.php:112"},{"rule_id":"opengrep/php.lang.security.exec-use","severity":"high","message":"Executing non-constant commands. This can lead to command injection. [confidence low]","path":"src/course/ws/shell/shell_server.php","line":119,"fingerprint":"php.lang.security.exec-use:src/course/ws/shell/shell_server.php:119"},{"rule_id":"opengrep/php.lang.security.weak-crypto","severity":"high","message":"Detected usage of weak crypto function. Consider using stronger alternatives. [confidence low]","path":"src/course/ws/ws_update/ws_server.php","line":66,"fingerprint":"php.lang.security.weak-crypto:src/course/ws/ws_update/ws_server.php:66"},{"rule_id":"opengrep/c.lang.security.double-free","severity":"high","message":"Variable 'line' was freed twice. This can lead to undefined behavior. [confidence low]","path":"src/tmp/swoole_ssl_client.c","line":71,"fingerprint":"c.lang.security.double-free:src/tmp/swoole_ssl_client.c:71"},{"rule_id":"opengrep/php.symfony.security.audit.symfony-non-literal-redirect","severity":"medium","message":"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]","path":"src/03/yii_task/protected/controllers/SiteController.php","line":95,"fingerprint":"php.symfony.security.audit.symfony-non-literal-redirect:src/03/yii_task/protected/controllers/SiteController.php:95"},{"rule_id":"opengrep/php.symfony.security.audit.symfony-non-literal-redirect","severity":"medium","message":"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]","path":"src/03/yii_task/protected/controllers/SiteController.php","line":107,"fingerprint":"php.symfony.security.audit.symfony-non-literal-redirect:src/03/yii_task/protected/controllers/SiteController.php:107"},{"rule_id":"opengrep/php.lang.security.unserialize-use","severity":"medium","message":"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]","path":"src/course/task/Server.php","line":53,"fingerprint":"php.lang.security.unserialize-use:src/course/task/Server.php:53"},{"rule_id":"opengrep/c.lang.security.function-use-after-free","severity":"medium","message":"Variable 'line' was passed to a function after being freed. This can lead to undefined behavior. [confidence low]","path":"src/tmp/swoole_ssl_client.c","line":70,"fingerprint":"c.lang.security.function-use-after-free:src/tmp/swoole_ssl_client.c:70"}],"evidence":[],"data":{"rulesets":["php","c","bash"]},"error":null},{"analyzer":"sec-deps","pillar":"security","status":"ok","tool_version":"osv-scanner version: 2.7.1","metrics":{"vulnerable_packages":0.0,"vulnerabilities":0.0,"vulns_critical":0.0,"vulns_high":0.0,"vulns_medium":0.0,"vulns_low":0.0,"vulns_unknown":0.0,"penalty":0.0},"findings":[],"evidence":[],"data":{"ecosystems":["Packagist"]},"error":null},{"analyzer":"sec-actions","pillar":"security","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":null},{"analyzer":"sec-posture","pillar":"security","status":"ok","tool_version":null,"metrics":{"check:security_policy":0.0,"check:dependency_updates":0.0,"check:signed_commits":0.0,"check:lockfiles":0.0,"signed_commit_share":0.0,"unpinned_manifests":1.0},"findings":[],"evidence":[{"kind":"posture","description":"src/course/ws/chat/composer.json has no lockfile alongside it (unpinned dependencies)","ref":"src/course/ws/chat/composer.json","url":null,"weight":0.3}],"data":{},"error":null},{"analyzer":"sec-distribution","pillar":"security","status":"ok","tool_version":null,"metrics":{"signals":0.0,"binary_assets":0.0,"suspicious":0.0},"findings":[],"evidence":[],"data":{"signals":[],"suspicious":false,"unusual_traction":false,"metadata":true},"error":null},{"analyzer":"qual-complexity","pillar":"quality","status":"ok","tool_version":"lizard 1.25.1","metrics":{"functions":520.0,"function_nloc":4574.0,"mean_ccn":1.85,"p90_ccn":4.0,"complex_functions":1.0,"long_functions":0.0,"many_param_functions":0.0,"risky_nloc_share":0.0061},"findings":[],"evidence":[{"kind":"complex-function","description":"Messages::publicMessages in src/03/yii_task/protected/models/Messages.php: complexity 22, 28 lines","ref":"src/03/yii_task/protected/models/Messages.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/03/yii_task/protected/models/Messages.php#L195","weight":0.36666666666666664}],"data":{},"error":null},{"analyzer":"qual-duplication","pillar":"quality","status":"ok","tool_version":"repotrust-dup-w6","metrics":{"compared_lines":5413.0,"duplicated_lines":2352.0,"duplicated_share":0.4345,"files":156.0},"findings":[],"evidence":[{"kind":"duplicate-code","description":"6+ duplicated lines: src/01/swoole_simple_client.php:1 and src/05/client.php:1","ref":"src/01/swoole_simple_client.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/01/swoole_simple_client.php#L1","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/01/swoole_simple_client.php:18 and src/06/swoole_async_io_client.php:16","ref":"src/01/swoole_simple_client.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/01/swoole_simple_client.php#L18","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/01/swoole_simple_server.php:1 and src/02/swoole_task_server.php:1","ref":"src/01/swoole_simple_server.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/01/swoole_simple_server.php#L1","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/01/swoole_simple_server.php:17 and src/05/swoole_eof_server.php:19","ref":"src/01/swoole_simple_server.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/01/swoole_simple_server.php#L17","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/01/swoole_simple_server.php:18 and src/04/reload/swoole_reload_server.php:24","ref":"src/01/swoole_simple_server.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/01/swoole_simple_server.php#L18","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/02/swoole_async_client.php:1 and src/03/swoole_heartbeat_client.php:1","ref":"src/02/swoole_async_client.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/02/swoole_async_client.php#L1","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/02/swoole_task_server.php:9 and src/04/reload/swoole_reload_server.php:14","ref":"src/02/swoole_task_server.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/02/swoole_task_server.php#L9","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/02/swoole_task_server.php:15 and src/course/task/Server.php:20","ref":"src/02/swoole_task_server.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/02/swoole_task_server.php#L15","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/02/swoole_task_server.php:19 and src/03/swoole_mysql_pool_server.php:20","ref":"src/02/swoole_task_server.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/02/swoole_task_server.php#L19","weight":0.3},{"kind":"duplicate-code","description":"6+ duplicated lines: src/02/swoole_task_server.php:25 and src/04/swoole_after_server.php:23","ref":"src/02/swoole_task_server.php","url":"https://github.com/LinkedDestiny/swoole-doc/blob/2168d4e3fb7455bd64b3a64c632c3bf5a624e4cb/src/02/swoole_task_server.php#L25","weight":0.3}],"data":{},"error":null},{"analyzer":"qual-lint","pillar":"quality","status":"ok","tool_version":"opengrep 1.33.1; rules f1d2b562b414","metrics":{"findings":1.0,"weighted_findings":1.0,"scanned_lines":8081.0,"category:correctness":1.0},"findings":[{"rule_id":"opengrep/c.lang.correctness.incorrect-use-ato-fn","severity":"medium","message":"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.","path":"src/tmp/swoole_ssl_client.c","line":95,"fingerprint":"c.lang.correctness.incorrect-use-ato-fn:src/tmp/swoole_ssl_client.c:95"}],"evidence":[],"data":{},"error":null},{"analyzer":"qual-testing","pillar":"quality","status":"ok","tool_version":null,"metrics":{"check:has_tests":1.0,"check:test_ratio":0.019,"check:ci_present":0.0,"check:ci_runs_tests":0.0,"check:ci_runs_lint":0.0,"check:tests_cochange":0.1,"test_lines":82.0,"source_lines":8625.0,"test_ratio":0.0095,"ci_files":0.0,"cochange_share":0.025,"cochange_commits":40.0},"findings":[],"evidence":[],"data":{"test_commands":[],"lint_commands":[]},"error":null},{"analyzer":"qual-docs","pillar":"quality","status":"ok","tool_version":null,"metrics":{"check:readme":0.5,"check:license":0.0,"check:contributing":0.0,"check:changelog":0.0,"readme_lines":5.0},"findings":[],"evidence":[{"kind":"docs","description":"README.md","ref":"README.md","url":null,"weight":0.0}],"data":{},"error":null},{"analyzer":"qual-type-safety","pillar":"quality","status":"skipped","tool_version":null,"metrics":{},"findings":[],"evidence":[],"data":{},"error":null}],"flags":[]}