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-7/

String Comparison Fuzzer

Build a fuzzing harness that tests a validation function capable of discovering magic string prefixes and suffixes through enhanced coverage guidance.

Problem Description

You need to create a fuzzing harness for a simple validation function that checks whether input strings start with specific prefixes or end with specific suffixes. The function should return True if the input satisfies the validation criteria, and False otherwise.

Your fuzzing harness must effectively discover the specific magic strings used in the validation through coverage-guided feedback. The harness should be capable of identifying both prefix and suffix patterns within a reasonable number of fuzzing iterations.

Requirements

Validation Function

Implement a function validate_input(data: str) -> bool that:

  • Returns True if the input starts with "AUTH:" and ends with ":VALID"
  • Returns False for all other inputs
  • Handles empty strings and edge cases appropriately

Fuzzing Harness

Implement a fuzzing harness that:

  • Uses structured data generation to produce string inputs from raw fuzzing bytes
  • Enables enhanced string comparison tracking to help the fuzzer discover magic strings
  • Runs the validation function with generated inputs
  • Properly initializes and starts the fuzzing engine

Test Cases

The following test cases verify your implementation works correctly:

  • The validation function returns True for the string "AUTH:secret:VALID" @test
  • The validation function returns False for the string "NOAUTH:secret:VALID" @test
  • The validation function returns False for the string "AUTH:secret:INVALID" @test
  • When fuzzing runs with the string hook enabled, the fuzzer discovers inputs that make validate_input return True within 10000 iterations @test

Implementation

@generates

API

def validate_input(data: str) -> bool:
    """
    Validates whether the input string has the correct prefix and suffix.

    Args:
        data: Input string to validate

    Returns:
        True if the string starts with "AUTH:" and ends with ":VALID", False otherwise
    """
    pass

def TestOneInput(data: bytes) -> None:
    """
    Fuzzing entry point that tests the validation function.

    Args:
        data: Raw bytes from the fuzzer
    """
    pass

Dependencies { .dependencies }

atheris { .dependency }

Provides coverage-guided fuzzing capabilities with string comparison tracking.

@satisfied-by