CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-atheris

A coverage-guided fuzzer for Python and Python extensions based on libFuzzer

91

1.28x
Overview
Eval results
Files

task.mdevals/scenario-6/

JSON Parser Fuzzer

A fuzzing harness for testing JSON parsing functionality with selective module instrumentation.

Capabilities

Implements selective module instrumentation

  • The fuzzer uses a context manager to automatically instrument imported modules before they are loaded @test
  • The fuzzer excludes the json module from instrumentation to avoid affecting the standard library @test
  • The fuzzer includes application-specific modules for instrumentation @test

Parses JSON inputs with error handling

  • The fuzzer accepts byte inputs and attempts to parse them as JSON @test
  • The fuzzer handles invalid JSON inputs gracefully without crashing @test
  • The fuzzer processes valid JSON inputs successfully @test

Implementation

@generates

The fuzzer must instrument imported application modules while excluding standard library modules. All imports that need instrumentation must occur after instrumentation is configured.

API

def TestOneInput(data: bytes) -> None:
    """
    Fuzzing entry point that tests JSON parsing.

    Args:
        data: Raw bytes from the fuzzer to be tested
    """
    pass

Dependencies { .dependencies }

atheris { .dependency }

Provides Python fuzzing capabilities with import instrumentation support.

Install with Tessl CLI

npx tessl i tessl/pypi-atheris

tile.json