PyPI / posthog / 7.73.3

posthog 7.73.3

Source
https://github.com/posthog/posthog-python
Tag scanned
posthog-v7.73.3
Compared with
posthog-v7.73.2 (0 signals introduced since)
Files
430 scanned, 280 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 2 warn · 8 info
Scan time
7.8 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 9 of 9 warn and critical signals; 7 demoted to info.
Disclude version
4.1.0
Scanned (UTC)
2026-10-22 13:43

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. `eval` called on a non-literal expression (ast pass, confidence 0.70)

            return "Error: invalid characters"
        return f"Result: {eval(expression.replace('^', '**'))}"
    suspicious LLM, confidence 0.85 A calculator tool in an example agent passes a filtered expression string to eval.
    Reasoning

    eval is called on user/LLM-supplied expression after character filtering; this is a known unsafe calculator pattern in an example app, a genuine code-injection risk but not obfuscation or hidden malicious intent. Verdict suspicious given the risk in an agent tool.

  2. `eval` called on a non-literal expression (ast pass, confidence 0.70)

            return "Error: invalid characters"
        return f"Result: {eval(expression.replace('^', '**'))}"
    suspicious LLM, confidence 0.85 A calculator tool in an example agent passes a filtered expression string to eval.
    Reasoning

    Same eval-based calculator as multi_agent.py; unsafe practice in example code, not evidence of malicious intent.

  3. info warn → info by review frame-introspection posthog/exception_utils.py:1060:21

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            try:
                frame = sys._getframe(depth)
                depth += 1
            except ValueError:
    likely benign LLM, confidence 0.90 Walks the call stack via sys._getframe to collect frame information for exception reporting.
    Reasoning

    sys._getframe with a depth loop is a standard way to walk the stack for exception context in an SDK; legitimate.

  4. info warn → info by review encoding-base64 posthog/test/mcp/test_session_token.py:68:15

    base64-like blob (95 bytes, compression ratio 1.12) (raw pass, confidence 0.60)

        )
        frozen = "eyJzaWQiOiJzZXNfZml4dHVyZSIsImNuIjoiQ2xhdWRlIENvZGUiLCJjdiI6IjEuMi4zIiwicHYiOiIyMDI1LTA2LTE4In0"
    
        # Encode side: our output is byte-identical to the shared wire format.
    likely benign LLM, confidence 0.93 A base64 test fixture encoding a session token payload.
    Reasoning

    The blob is a short base64url-encoded JSON test fixture (sid, cn, cv, pv fields) in a test file, used to verify wire format compatibility. Benign test data.

  5. info warn → info by review decoder-decompress-payload posthog/test/test_capture_v1.py:456:24

    file imports decoder module(s) zlib and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

            self.assertEqual(call["data"][0], 0x78)  # zlib header
            roundtripped = zlib.decompress(call["data"]).decode("utf-8")
            self.assertNotIn("api_key", json.loads(roundtripped))
    likely benign LLM, confidence 0.93 Test decompresses a captured zlib request body to verify its contents.
    Reasoning

    Test asserts zlib-compressed request body round-trips and omits api_key; decompression of its own test output, no runtime payload execution.

  6. info warn → info by review decoder-decompress-payload posthog/test/test_metrics.py:55:23

    file imports decoder module(s) gzip and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

        body = kwargs.get("data")
        return json.loads(gzip.decompress(body).decode("utf-8"))
    likely benign LLM, confidence 0.93 Test helper decompresses and parses a gzipped request body.
    Reasoning

    Test helper gunzips a captured HTTP request body to parse JSON; ordinary test code.

  7. info warn → info by review decoder-decompress-payload posthog/test/test_request.py:227:27

    file imports decoder module(s) gzip, zlib and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

            self.assertEqual(headers["Content-Encoding"], "gzip")
            body = json.loads(gzip.decompress(data))
            self.assertEqual(body["batch"], [])
            self.assertEqual(body["api_key"], TEST_API_KEY)
    likely benign LLM, confidence 0.93 Test gunzips a request body to assert its JSON fields.
    Reasoning

    Test decompresses a gzip request body to check batch contents; standard test verification.

  8. info warn → info by review decoder-decompress-payload posthog/test/tracing/test_client_traces.py:60:23

    file imports decoder module(s) gzip and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

        args, kwargs = session.post.call_args
        return json.loads(gzip.decompress(kwargs["data"])), args[0], kwargs
    likely benign LLM, confidence 0.93 Test helper decompresses gzipped mock request data for inspection.
    Reasoning

    Test helper gunzips mocked request data for assertions; benign.

  9. info warn → info by review decoder-decompress-payload posthog/test/tracing/test_transport.py:71:27

    file imports decoder module(s) gzip and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

            assert kwargs["headers"]["Content-Type"] == "application/json"
            assert json.loads(gzip.decompress(kwargs["data"])) == PAYLOAD
    
        def test_falls_back_to_the_default_timeout(self):
    likely benign LLM, confidence 0.93 Test gunzips a mocked request payload and compares it to the expected payload.
    Reasoning

    Test asserts the gzipped payload equals the expected payload; benign test code.

  10. line length 1545 characters (raw pass, confidence 0.50)

    class posthog.client.Client(project_api_key: str, host=None, debug=False, max_queue_size=10000, send=True, on_error=None, flush_at=100, flush_interval=5.0, gzip=False, max_retries=3, sync_mode=False, timeout=15, thread=1, poll_interval=30, personal_api_key=None, disabled=False, disable_geoip=True, is_server=True, histo

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.

cargo install disclude --version 4.1.0
git clone https://github.com/posthog/posthog-python posthog-python && cd posthog-python
git checkout posthog-v7.73.3
disclude scan --severity info --diff posthog-v7.73.2 .