PyPI / jsonpath-ng / 1.9.1

jsonpath-ng 1.9.1

Source
https://github.com/jsonpath-ng/jsonpath-ng
Tag scanned
v1.9.1
Compared with
v1.9.0 (0 signals introduced since)
Files
37 scanned, 8 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 7 info
Scan time
5.9 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 7 of 7 warn and critical signals; 7 demoted to info.
Disclude version
4.0.0
Scanned (UTC)
2026-10-21 14:56

Signals

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

  1. info warn → info by review dynamic-execution src/jsonpath_ng/_ply/lex.py:215:13

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

            else:
                exec('import %s' % tabfile)
                lextab = sys.modules[tabfile]
    likely benign LLM, confidence 0.85 PLY lexer dynamically imports its generated lextab module via exec.
    Reasoning

    This is the PLY lexer's table-loading fallback: exec('import %s' % tabfile) imports a parser table module by name. The tabfile is a module name configured by the library developer, not attacker-controlled input, and the pattern is a known legacy idiom in PLY. Benign, though exec is a poor practice.

  2. info critical → info by review frame-introspection src/jsonpath_ng/_ply/lex.py:450:9

    `sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)

    def get_caller_module_dict(levels):
        f = sys._getframe(levels)
        ldict = f.f_globals.copy()
        if f.f_globals != f.f_locals:
    likely benign LLM, confidence 0.80 PLY helper that uses sys._getframe to read the caller's module namespace when building lexers.
    Reasoning

    get_caller_module_dict is the standard PLY helper that reads caller globals/locals to find lexer rules. sys._getframe is used for legitimate namespace capture; the anti-analysis label comes from the file containing exec/eval, which PLY itself needs for its tooling. No evidence of evasion or exfiltration.

  3. info warn → info by review dynamic-execution src/jsonpath_ng/_ply/lex.py:1036:21

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

                        pkgname = '.'.join(parts[:-1])
                        exec('import %s' % pkgname)
                        srcfile = getattr(sys.modules[pkgname], '__file__', '')
                outputdir = os.path.dirname(srcfile)
    likely benign LLM, confidence 0.85 PLY imports the caller's package via exec to determine an output directory.
    Reasoning

    This is PLY's lexer code-generation path that imports the package of the source file to locate its output directory. The package name comes from the module's own __name__ parts, not external input. Benign library behaviour.

  4. info warn → info by review dynamic-execution src/jsonpath_ng/_ply/yacc.py:1562:25

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

                    try:
                        c = eval(s)
                        if (len(c) > 1):
                            raise GrammarError('%s:%d: Literal token %s in rule %r may only be a single character' %
    likely benign LLM, confidence 0.85 PLY evaluates a grammar literal token string to validate its length.
    Reasoning

    eval(s) evaluates a literal token string from the grammar specification, used to validate single-character literals in PLY. The input comes from grammar definitions authored by the developer, not from untrusted runtime data. Standard PLY pattern.

  5. info warn → info by review dynamic-execution src/jsonpath_ng/_ply/yacc.py:1982:13

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

            else:
                exec('import %s' % module)
                parsetab = sys.modules[module]
    likely benign LLM, confidence 0.85 PLY yacc dynamically imports its generated parsetab module via exec.
    Reasoning

    Same PLY parse-table loading fallback: exec('import %s' % module) loads a generated parsetab module by a configured name. Not attacker-controlled; benign library code.

  6. info critical → info by review frame-introspection src/jsonpath_ng/_ply/yacc.py:2831:9

    `sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)

    def get_caller_module_dict(levels):
        f = sys._getframe(levels)
        ldict = f.f_globals.copy()
        if f.f_globals != f.f_locals:
    likely benign LLM, confidence 0.80 PLY helper that reads caller frame globals to build the parser's symbol namespace.
    Reasoning

    Identical PLY get_caller_module_dict helper using sys._getframe to capture the caller's namespace for grammar construction. The anti-analysis tag is driven by co-location of exec/eval in a parser library. No malicious indicators.

  7. info warn → info by review dynamic-execution src/jsonpath_ng/_ply/yacc.py:3201:17

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

                    pkgname = '.'.join(parts[:-1])
                    exec('import %s' % pkgname)
                    srcfile = getattr(sys.modules[pkgname], '__file__', '')
            outputdir = os.path.dirname(srcfile)
    likely benign LLM, confidence 0.85 PLY imports the grammar's package via exec to locate an output directory.
    Reasoning

    PLY's output-directory detection imports the package of the grammar source file via exec. Package name derives from the module's own name, so there is no untrusted input. Benign.

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.0.0
git clone https://github.com/jsonpath-ng/jsonpath-ng jsonpath-ng && cd jsonpath-ng
git checkout v1.9.1
disclude scan --severity info --diff v1.9.0 .