or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/atheris@2.3.x
tile.json

tessl/pypi-atheris

tessl install tessl/pypi-atheris@2.3.0

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

Agent Success

Agent success rate when using this tile

91%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.28x

Baseline

Agent success rate without this tile

71%

task.mdevals/scenario-2/

HTTP Request Parser Fuzzer

A fuzzing test harness for an HTTP request parser that validates parsing of HTTP request lines and headers.

Problem Statement

You need to create a fuzzing harness to test a simple HTTP request parser. The parser should accept raw HTTP request bytes and extract the method, path, and a single header. Your fuzzer should use structured input generation to create various HTTP request formats.

Requirements

Parser Implementation

Implement a parse_http_request function that:

  • Takes raw bytes as input
  • Extracts the HTTP method, request path, and one header
  • Returns a dictionary with keys: method, path, header_name, header_value
  • Raises ValueError for invalid input

Example valid input:

GET /index.html HTTP/1.1
Host: example.com

Fuzzer Implementation

Your fuzzer must:

  1. Use structured data consumption to generate HTTP request components
  2. Construct a valid HTTP request from these components
  3. Call the parser with the generated request
  4. Handle any exceptions gracefully

Generate the following components:

  • HTTP Method: A short ASCII string (3-10 bytes)
  • Request Path: A Unicode string (5-20 characters)
  • Header Name: An ASCII string (5-15 bytes)
  • Header Value: A Unicode string (5-30 characters)

Test Cases

  • Fuzzer generates valid GET request and parser extracts method, path, and header @test
  • Fuzzer generates request with Unicode path and parser handles it correctly @test
  • Fuzzer handles insufficient input data gracefully @test

Implementation

@generates

API

import atheris

def TestOneInput(data: bytes) -> None:
    """
    Fuzzing entry point that tests the HTTP request parser.

    Args:
        data: Raw fuzzing input bytes
    """
    pass

Dependencies { .dependencies }

atheris { .dependency }

Provides coverage-guided fuzzing capabilities and structured input generation.