mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
experimental "local fuzzing" support (#405)
This PR adds an experimental "local" mode for the agent, starting with `libfuzzer`. For tasks that poll a queue, in local mode, they just monitor a directory for new files. Supported commands: * libfuzzer-fuzz (models the `libfuzzer-fuzz` task) * libfuzzer-coverage (models the `libfuzzer-coverage` task) * libfuzzer-crash-report (models the `libfuzzer-crash-report` task) * libfuzzer (models the `libfuzzer basic` job template, running libfuzzer-fuzz and libfuzzer-crash-report tasks concurrently, where any files that show up in `crashes_dir` are automatically turned into reports, and optionally runs the coverage task which runs the coverage data exporter for each file that shows up in `inputs_dir`). Under the hood, there are a handful of changes required to the rest of the system to enable this feature. 1. `SyncedDir` URLs are now optional. In local mode, these no longer make sense. (We've discussed moving management of `SyncedDirs` to the Supervisor. This is tangential to that effort.) 2. `InputPoller` uses a `tempdir` rather than abusing `task_id` for temporary directory naming. 3. Moved the `agent` to only use a single tokio runtime, rather than one for each of the subcommands. 4. Sets the default log level to `info`. (RUST_LOG can still be used as is). Note, this removes the `onefuzz-agent debug` commands for the tasks that are now exposed via `onefuzz-agent local`, as these provide a more featureful version of the debug tasks.
This commit is contained in:
@ -154,7 +154,7 @@ def build_work_unit(task: Task) -> Optional[Tuple[BucketConfig, WorkUnit]]:
|
||||
job_id=task_config.job_id,
|
||||
task_id=task_config.task_id,
|
||||
task_type=task_config.task_type,
|
||||
config=task_config.json(),
|
||||
config=task_config.json(exclude_none=True, exclude_unset=True),
|
||||
)
|
||||
|
||||
bucket_config = BucketConfig(
|
||||
|
Reference in New Issue
Block a user