Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
Signed-off-by: David Korczynski <david@adalogics.com>
  • Loading branch information
DavidKorczynski committed Jul 15, 2024
1 parent aa59a04 commit 19fc62e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion experiment/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def extend_build_with_corpus(self, ai_binary, target_path,
generated_project_path = os.path.join(oss_fuzz_checkout.OSS_FUZZ_DIR,
'projects',
generated_oss_fuzz_project)
generated_corp = corpus_generator.generate_corpus(
generated_corp = corpus_generator.get_corpus_generator_script(
ai_binary, self.builder_runner.fixer_model_name, target_path,
self.benchmark)

Expand Down
9 changes: 7 additions & 2 deletions llm_toolkit/corpus_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@
from llm_toolkit import prompt_builder


def generate_corpus(
def get_corpus_generator_script(
ai_binary: str,
fixer_model_name: str,
target_harness_path: str,
benchmark: Benchmark,
) -> str:
"""Uses LLMs to generate a python script that will create a seed corpus for a
harness."""
harness.
The script generated is purely generated and should be considered untrusted
in the general sense. OSS-Fuzz-gen already executes arbitrary code since
OSS-Fuzz-gen executes arbitrary open source projects with no checking on
what code is committed to the given projects."""
corpus_model = models.LLM.setup(
ai_binary=ai_binary,
name=fixer_model_name,
Expand Down

0 comments on commit 19fc62e

Please sign in to comment.