matyhtf/webim
使用PHP+Swoole实现的网页即时聊天工具
- Repository: https://github.com/matyhtf/webim
- Commit:
62b3f879eacfe6edf8e72a20970b01247de4ecb1 - Generated: 2026-11-13T23:37:21+00:00
- Scorer 0.1.0, scoring prov-4+qual-2+sec-2, report schema v2
Scores
| Pillar | Score | Signal | Confidence | Coverage |
|---|---|---|---|---|
| AI provenance (estimated AI-generated share) | 0 | none-detected | 60% | 100% |
| Code quality | 50 | poor | 90% | 100% |
| Security | 45 | poor | 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-11 | 374 | 0% |
| 2015-01 | 2 | 0% |
| 2015-02 | 1,586 | 0% |
| 2015-07 | 7 | 0% |
| 2016-08 | 34 | 0% |
| 2016-09 | 39 | 0% |
| 2016-11 | 23 | 0% |
| 2016-12 | 5 | 0% |
| 2017-01 | 154 | 0% |
| 2017-02 | 176 | 0% |
| 2017-07 | 6 | 0% |
| 2019-10 | 1,162 | 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; 13% of function code in complex or long functions; 0% duplicated lines. Weakest area: testing.
| Area | Score |
|---|---|
| Complexity (lizard) | 68 |
| Duplication | 100 |
| Code smells (Opengrep) | 65 |
| Tests and CI | 0 |
| Documentation | 40 |
| Type safety | n/a |
| Process (Scorecard review/maintenance) | n/a |
- Functions: 268; mean complexity 2.6, 90th percentile 5; 1 complex and 1 long functions
- Duplicated lines: 0.0% of 1,017 compared
- Tests: 0 test lines for 1,457 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:
- $.toJSON in resources/static/js/jquery.json.js: complexity 25, 19 lines
- Server::run in src/Server.php: complexity 15, 122 lines
Security
Security posture is poor: 3 high-severity SAST findings. Weakest area: posture.
| Area | Score |
|---|---|
| Secrets (gitleaks, tree + history) | 97 |
| Static analysis (Opengrep) | 4 |
| Vulnerable dependencies (OSV) | n/a |
| 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 | opengrep/javascript.lang.security.detect-insecure-websocket: Insecure WebSocket Detected. WebSocket Secure (wss) should be used for all WebSocket connections. [confidence low] |
resources/static/js/comet.js:2 |
| high | opengrep/javascript.lang.security.detect-insecure-websocket: Insecure WebSocket Detected. WebSocket Secure (wss) should be used for all WebSocket connections. [confidence low] |
src/Server.php:107 |
| high | opengrep/javascript.lang.security.detect-insecure-websocket: Insecure WebSocket Detected. WebSocket Secure (wss) should be used for all WebSocket connections. [confidence low] |
src/Server.php:109 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.jquery.security.audit.prohibit-jquery-html: JQuery's html function is susceptible to Cross Site Scripting (XSS) attacks. If you're just passing text, consider text instead. Otherwise, use a function that escapes HTML such as edX's HtmlUtils.setHtml(). [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.jquery.security.audit.prohibit-jquery-html: JQuery's html function is susceptible to Cross Site Scripting (XSS) attacks. If you're just passing text, consider text instead. Otherwise, use a function that escapes HTML such as edX's HtmlUtils.setHtml(). [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.lang.security.audit.unsafe-dynamic-method: Using non-static data to retrieve and run functions from the object is dangerous. If the data is user-controlled, it may allow executing arbitrary code. [confidence low] |
resources/static/js/bootstrap.js:6 |
| medium | opengrep/javascript.jquery.security.audit.jquery-insecure-method: User controlled data in a jQuery's .html(...) is an anti-pattern that can lead to XSS vulnerabilities [confidence low] |
resources/static/js/chat.js:77 |
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: 1,457; test lines: 0
| Language | Lines |
|---|---|
| PHP | 914 |
| JavaScript | 543 |