microsoft / onefuzz

A self-hosted Fuzzing-As-A-Service platform
MIT License
2.82k stars 199 forks source link

Capture required args and make it match cli #3429

Closed tevoinea closed 1 year ago

tevoinea commented 1 year ago

Summary of the Pull Request

What is this about?

Closes #3427

The libfuzzer-fuzz local task has the following required arguments:

execute a local-only libfuzzer fuzzing task

Usage: onefuzz-task local libfuzzer-fuzz [OPTIONS] --target_exe <target_exe> --inputs_dir <inputs_dir> --crashes_dir <crashes_dir> --crashdumps_dir <crashdumps_dir>

This PR updates our libfuzzer-fuzz basic yaml template to those required arguments. It also adds one more, coverage argument.

codecov-commenter commented 1 year ago

Codecov Report

Merging #3429 (558d555) into main (98e986e) will decrease coverage by 0.01%. Report is 1 commits behind head on main. The diff coverage is 22.22%.

@@            Coverage Diff             @@
##             main    #3429      +/-   ##
==========================================
- Coverage   33.91%   33.90%   -0.01%     
==========================================
  Files         297      297              
  Lines       36770    36770              
==========================================
- Hits        12470    12467       -3     
- Misses      24300    24303       +3     
Files Changed Coverage Δ
...c/agent/onefuzz-task/src/local/generic_analysis.rs 0.66% <0.00%> (-0.01%) :arrow_down:
src/agent/onefuzz-task/src/local/template.rs 11.80% <40.00%> (-1.99%) :arrow_down:
chkeita commented 1 year ago

My initial comment was about matching the onefuzz cli template command. So, we also need the regression and analysis tasks in the template.

tevoinea commented 1 year ago

My initial comment was about matching the onefuzz cli template command. So, we also need the regression and analysis tasks in the template.

Ah I misunderstood, updated to match the libfuzzer_basic cli template. I added the regression task and since the analysis task is optional, I included it but commented out. I also found a bug in a mismatch of the required args (tools was supposed to be optional so I fixed that).