PyPI / networkx / 3.7

networkx 3.7

Source
https://github.com/networkx/networkx
Tag scanned
networkx-3.7
Compared with
networkx-3.6.1 (0 signals introduced since)
Files
907 scanned, 48 skipped (binary, oversized, or unrecognised)
Signals
1 critical · 0 warn · 12 info
Scan time
13.1 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 10 of 10 warn and critical signals; 9 demoted to info.
Disclude version
4.1.0
Scanned (UTC)
2026-10-22 03:22

Signals

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

  1. `os.popen` called on a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)

        # print(cmd)
        result = os.popen(cmd).read()
        # print(result)
    likely benign LLM, confidence 0.60 Documentation helper that runs a shell command built at runtime and reads its output.
    Reasoning

    A maintainer doc script runs os.popen on a variable command, which is a shell invocation with a runtime-determined string. The file is a documentation helper, and the commented-out print lines suggest debugging of a fixed report command. The command source is not visible, so some doubt remains.

  2. info warn → info by review unicode-mixed-script doc/release/release_2.6.rst:659:22

    identifier `frɨʂtat` mixes scripts: Latin + Other (raw pass, confidence 0.80)

    - Martin Fleischmann
    - Martha Frysztacki [frɨʂtat͡skʲ]
    - Debargha Ganguly
    - CUI Hao
    likely benign LLM, confidence 0.90 IPA transcription of a contributor's name in a release changelog.
    Reasoning

    The flagged token is an IPA phonetic transcription of a researcher's name in a release-notes contributor list. Mixed Latin and IPA characters are expected in that context and carry no execution or hiding behaviour.

  3. info warn → info by review unicode-mixed-script doc/release/release_2.6.rst:659:33

    identifier `skʲ` mixes scripts: Latin + Other (raw pass, confidence 0.80)

    - Martin Fleischmann
    - Martha Frysztacki [frɨʂtat͡skʲ]
    - Debargha Ganguly
    - CUI Hao
    likely benign LLM, confidence 0.90 Second fragment of the same IPA name transcription in the release notes.
    Reasoning

    The 'skʲ' part of the same IPA pronunciation annotation next to a contributor name. It is ordinary documentation text, not an identifier used by code.

  4. identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)

    --------------------------
    Bipartite Motifs: α/β-core
    --------------------------
  5. identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)

        G_core.remove_nodes_from(remove_nodes)
    print(f"Nodes comprising the α({alpha})/β({beta})-core of G: {set(G_core.nodes)}")
    
    # Visualize the graph
  6. info warn → info by review dynamic-execution networkx/algorithms/operators/tests/test_all.py:28:32

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

            graph, node = n
            assert ghj.nodes[n] == eval(graph).nodes[int(node)]
    
        assert ghj.graph["attr"] == "attr"
    likely benign LLM, confidence 0.85 Test helper evaluating a graph-name string from test parameters.
    Reasoning

    In a test, eval parses a graph name taken from parametrized test data to fetch a graph object. This is a common test-harness idiom over trusted in-repo inputs.

  7. info warn → info by review dynamic-execution networkx/algorithms/operators/tests/test_binary.py:23:31

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

            graph, node = n
            assert gh.nodes[n] == eval(graph).nodes[int(node)]
    
        assert gh.graph["attr"] == "attr"
    likely benign LLM, confidence 0.85 Test helper evaluating a graph-name string from test parameters.
    Reasoning

    Same eval-based graph lookup pattern as the sibling test file, over trusted parametrized test data in the repository.

  8. info warn → info by review frame-introspection networkx/lazy_imports.py:170:22

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

            try:
                parent = inspect.stack()[1]
                frame_data = {
                    "spec": fullname,
    likely benign LLM, confidence 0.90 Frame introspection to identify the importing caller for lazy module loading.
    Reasoning

    inspect.stack()[1] is used to find the calling module so a lazy import can be resolved relative to its parent. This is standard lazy-loading machinery in a well-known library, not evasion.

  9. file mixes tab and space indentation (4 tab-indented and 664 space-indented lines) (raw pass, confidence 0.40)

    class TestGraph:
        @classmethod
        def setup_class(cls):
            cls.simple_data = """Creator "me"
  10. info warn → info by review dynamic-execution networkx/tests/test_lazy_imports.py:83:5

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

    
        exec(s, {}, locls)
        expected = {
            "attach": lazy.attach,
    likely benign LLM, confidence 0.80 Test executing generated lazy-import stub code.
    Reasoning

    A test executes generated stub source with empty globals to check lazy-import stub output. The exec input comes from the test itself, which is a legitimate testing pattern.

  11. info warn → info by review decoder-import-with-exec networkx/utils/decorators.py:915:20

    file imports decoder module(s) bz2, gzip and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)

            filename = f"{self.__class__} compilation {self._count()}"
            compiled = compile(code, filename, "exec")
            exec(compiled, globl, locl)
            func = locl[sig.name]
    likely benign LLM, confidence 0.80 Argmap decorator in networkx compiles and executes generated wrapper source.
    Reasoning

    The decorator generates a function from source text with compile and exec, which is how networkx builds argmap wrappers. The bz2 and gzip imports are part of the same library's code-generation machinery, and the flagged pattern matches a multi-stage payload shape only superficially. Lack of a visible malicious sink lowers confidence somewhat.

  12. info warn → info by review dynamic-execution networkx/utils/decorators.py:915:20

    `compile` called on a non-literal expression (ast pass, confidence 0.70)

            filename = f"{self.__class__} compilation {self._count()}"
            compiled = compile(code, filename, "exec")
            exec(compiled, globl, locl)
            func = locl[sig.name]
    likely benign LLM, confidence 0.80 Compile step in networkx's argmap decorator code generator.
    Reasoning

    The compile call is the source-to-code step of the same legitimate networkx code-generation routine, over code the library itself produces.

  13. info warn → info by review dynamic-execution networkx/utils/decorators.py:916:9

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            compiled = compile(code, filename, "exec")
            exec(compiled, globl, locl)
            func = locl[sig.name]
            func._code = code
    likely benign LLM, confidence 0.80 Executes generated decorator wrapper code in networkx's argmap machinery.
    Reasoning

    The exec runs the compiled wrapper into local namespaces and stores its source on the function. This is the same legitimate library mechanism, not an attacker-controlled payload.

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/networkx/networkx networkx && cd networkx
git checkout networkx-3.7
disclude scan --severity info --diff networkx-3.6.1 .