trailofbits / trailofbits/buttercup

patcher: Split find_tests step into separate component

Open
#356 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

patcher
Dominant language
Python
Stars
1.7k
Forks
185
Avg merge
51m
Merged PRs (30d)
1

Description

Right now every time there is a new PoV for a project, the patcher tries to find out the build+test instructions for the project, so that it can later validate the patch. If it finds those instructions, it save them in redis, but if it doesn't, the next time it will try again, and again...

As this operation does not require a PoV at all and it can be done before the project has been even fuzzed, we should split this operation out of the patcher and do this as soon as possible. The patcher can use the test instructions, if present, when they are actually needed in the run_tests step.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the patcher's find_tests and run_tests steps and inspect where test instructions are saved in Redis. Separate instruction discovery from PoV processing so it can run before fuzzing, then confirm that run_tests reuses saved instructions when available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
testing, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.