PyPI / websockets / 17.3
websockets 17.3
- Source
- https://github.com/python-websockets/websockets
- Tag scanned
17.3- Compared with
17.2(0 signals introduced since)- Files
- 285 scanned, 67 skipped (binary, oversized, or unrecognised)
- Signals
- 1 critical · 0 warn · 43 info
- Scan time
- 28.0 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 35 of 35 warn and critical signals; 34 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-20 03:26
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
= =suspicious Runtime-built command with shell=True where a SHA from commit data is substituted into a URL template.Reasoning
The command is built by replacing ':sha' in a COMMIT_API template with a value popped from a todo list fed by API results, then run with shell=True. That is a real shell-injection risk if the SHA or API data is untrusted, but the snippet shows a plain experiment script fetching commits, with no sign of malicious intent or obfuscation. It is a code-quality issue more than a malware indicator.
-
⟨U+00A0⟩ ⟨U+00A0⟩ ⟨U+00A0⟩likely benign Non-breaking space in the indentation of a git commit output example in Heroku deployment docs.Reasoning
The flagged U+00A0 sits in the indentation of a pasted git terminal transcript inside an RST code block. Non-breaking spaces are a common artifact of copying from web pages or terminals, and the surrounding text is ordinary git output with no executable payload.
-
⟨U+00A0⟩ ⟨U+00A0⟩ ⟨U+00A0⟩ ⟨U+00A0⟩likely benign Non-breaking space in the indentation of a git output transcript in Heroku docs.Reasoning
Same pattern as the adjacent finding: a U+00A0 in the indentation of a git push/commit transcript in documentation. It is a formatting artifact with no code execution or hidden logic.
-
⟨U+00A0⟩ ⟨U+00A0⟩ ⟨U+00A0⟩likely benign Non-breaking space in indentation of git 'create mode' output in Heroku docs.Reasoning
The line is a plain 'create mode' git output line inside a documentation code block, with a non-breaking space in the indentation. This is consistent with copy-paste formatting rather than an obfuscated payload.
-
⟨U+00A0⟩ ⟨U+00A0⟩likely benign Non-breaking space in indentation of git output in Heroku docs.Reasoning
A non-breaking space in the indentation of a git output example. The raw pass flags whitespace only, and the content is benign documentation text.
-
⟨U+00A0⟩likely benign Non-breaking space in indentation of a git push transcript in Heroku docs.Reasoning
The line is a git push output transcript ('To https://git.heroku.com/...') with a non-breaking space in the indentation. This is a documentation formatting artifact.
-
⟨U+00A0⟩ ⟨U+00A0⟩ ⟨U+00A0⟩likely benign Non-breaking space in indentation of git commit output in Koyeb docs.Reasoning
A non-breaking space in the indentation of a git commit output example in Koyeb deployment docs. Consistent with copy-paste artifacts in documentation, with no executable content.
-
⟨U+00A0⟩ ⟨U+00A0⟩ ⟨U+00A0⟩ ⟨U+00A0⟩likely benign Non-breaking space in indentation of git output in Koyeb docs.Reasoning
Non-breaking space in the indentation of git output lines in a documentation block. The content is benign transcript text.
-
⟨U+00A0⟩ ⟨U+00A0⟩ ⟨U+00A0⟩likely benign Non-breaking space in indentation of git output in Koyeb docs.Reasoning
Non-breaking space in the indentation of git 'create mode' lines in a docs code block. This is a formatting artifact, not obfuscation.
-
⟨U+00A0⟩ ⟨U+00A0⟩likely benign Non-breaking space in indentation of git output in Koyeb docs.Reasoning
Non-breaking space in indentation of git output lines inside documentation. The raw pass flags whitespace only and the content is ordinary transcript text.
-
dismissed Placeholder '<id>' in a Koyeb URL example was misparsed as a shell redirect to a file named 'id'.
Reasoning
The 'redirect to id' is an artifact of the placeholder '<id>' in the URL 'wss://<app>-<user>-<id>.koyeb.app/' inside a shell-like example. The AST pass read the angle brackets as redirection, so there is no real write to a file named 'id' and no PATH hijack. The snippet is a websockets session transcript.
-
dismissed Placeholder '<id>' in a Koyeb websockets example misread as a redirect target.
Reasoning
Same false positive: the '<id>' placeholder in a websockets URL example is parsed as a redirect. The snippet shows an interactive client session, not a command that writes to a system-command path.
-
dismissed Placeholder '<id>' in a Koyeb websockets example misread as a redirect target.
Reasoning
Identical pattern: angle-bracket placeholder '<id>' inside a URL in a documented websockets transcript, misclassified as a redirect to a file named 'id'.
-
dismissed Placeholder '<id>' in a tutorial URL example misread as a redirect to 'id'.
Reasoning
The '<id>' template placeholder in the URL is parsed as a redirect by the AST pass. The surrounding transcript is documentation of a websockets client session with no file write or PATH manipulation.
-
=likely benign subprocess call with shell=True running a literal git rev-parse command.Reasoning
The command is a fixed string literal, 'git rev-parse origin/main', so there is no injection surface. shell=True is unnecessary but harmless here, and the call is ordinary repository tooling.
-
# PyPI disables the "raw" directive. Remove this section of the README.likely benign setup.py execs the project's own version.py to read __version__ during packaging.Reasoning
The exec reads src/websockets/version.py from the project's own tree to obtain the version string, a common setup.py idiom. The surrounding code is ordinary packaging logic, so the flagged non-literal exec is benign.
-
likely benign Calls os.system('') on Windows to enable ANSI terminal color support.
Reasoning
The literal os.system call with an empty string is the well-known Windows trick to enable ANSI escape handling in the console. It runs no attacker-controlled command.
-
info
warn→ info by reviewdecoder-decompress-payloadsrc/websockets/extensions/permessage_deflate.py:72:28=likely benign Creates a zlib decompressor to implement WebSocket permessage-deflate decompression.Reasoning
zlib.decompressobj is the standard permessage-deflate implementation required by RFC 7692 for decompressing WebSocket frame payloads. There is no embedded payload; the data comes from the peer protocol stream.
-
assert < , = returnlikely benign Dynamically imports a (possibly relative) module by name for lazy loading.Reasoning
This is a lazy_import helper that resolves a module name from the caller's package and relative level, a standard pattern for deferred imports. The name comes from library code, not untrusted input.
-
= await == :likely benign Test echo server that evals client-sent expressions to test remote evaluation.Reasoning
This is a test fixture server that evals messages received over the socket to return values for latency tests. Evaluating remote input is unsafe if deployed, but here it is an intentional test-only helper with no production role.
-
await = awaitlikely benign Evaluates the test server's latency reply in an asyncio server test.Reasoning
The test sends the fixed string ws.latency to the test server and evals the server's numeric reply. The eval runs only on known test responses.
-
await =likely benign Evaluates the test server's latency reply in an asyncio server test.Reasoning
Same pattern as the other latency test: eval of the fixed test server's numeric reply to ws.latency. No untrusted input is involved.
-
await =likely benign Evaluates the test server's latency reply in an asyncio server test.Reasoning
Same pattern again: eval of the test server's reply to a fixed ws.latency request, confined to the test suite.
-
# Control frames aren't encoded or decoded.likely benign Round-trips an extension object through repr and eval in a unit test.Reasoning
The test evals repr() of the extension object it created to check round-trip equality. The input is entirely local and is a standard repr-roundtrip test.
-
=likely benign Evaluates a server-returned close_timeout value in a legacy test.Reasoning
The test evals a close_timeout value that the test server itself sent back to check a numeric result. The source is the controlled test server.
-
=likely benign Evaluates a server-returned close_timeout value in a legacy test.Reasoning
Same pattern: eval of a controlled numeric value returned by the test server in a legacy timeout test.
-
=likely benign Evaluates a server-returned close_timeout value in a legacy test.Reasoning
Same pattern: eval of a controlled numeric value returned by the test server in a legacy timeout test.
-
= == :likely benign Sync test echo server that evals client-sent expressions for tests.Reasoning
This is the sync counterpart of the asyncio test server, evaluating client-sent expressions for latency tests. It is intentionally unsafe test scaffolding and is not reachable in production code.
-
=likely benign Evaluates the test server's latency reply in a sync server test.Reasoning
The test sends ws.latency to the test server and evals its numeric reply. The eval input is fixed test output.
-
=likely benign Evaluates the test server's latency reply in a sync server test.Reasoning
Same pattern as the other sync latency test: eval of the controlled test server's reply to ws.latency.
-
=likely benign Test code evaluates a server-returned latency string with eval.Reasoning
The eval reads a latency value the test server itself returned over a websocket. It sits in a test module that exercises the server's ws.latency feature and asserts on the result. eval of network data is a poor practice, but here it is a test-harness convenience with no sign of malicious intent.
-
, , , , -
, , , ] -
, , , ] -
, , ] ] -
, , ] ] -
= -
= -
-
, , ] -
= await == :likely benign Trio test server evaluates client-sent expressions via eval.Reasoning
This is a test fixture server that evals expressions received from a websocket client. Evaluating remote input is dangerous if deployed, but the file is a test server under tests/, and the expression handler exists to drive test scenarios. Nothing suggests a dropper or a hidden payload, though the pattern would be unsafe outside tests.
-
await = awaitlikely benign Trio test evaluates the latency response with eval.Reasoning
The eval evaluates the server's own latency reply in a test that asserts on the value. This is a test-only pattern in a websocket library's test suite.
-
await =likely benign Trio test evaluates the latency response with eval.Reasoning
Same pattern as the sibling finding: eval of the server's latency reply inside a test assertion. No malicious indicators in the snippet or file context.
-
await =likely benign Trio test evaluates the latency response with eval.Reasoning
Again eval of the server's latency reply within a test asserting zero latency. It is a test-harness pattern, not an attack.
Reproduce This Scan
Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
&&