Information
- Onefuzz version: 6.4.0
- OS: Ubuntu
Provide detailed reproduction steps (if any)
- When performing a
onefuzz template libfuzzer merge ... command, the task will fail with the following error:
ERROR:cli:command failed: request did not succeed (400: INVALID_REQUEST): container type UniqueReports: expected Equal 1, got 0
- This error is generated from the CheckContainer function:
https://github.com/microsoft/onefuzz/blob/main/src/ApiService/ApiService/onefuzzlib/Config.cs#L526
CheckContainer is a child of CheckContainers:
https://github.com/microsoft/onefuzz/blob/main/src/ApiService/ApiService/onefuzzlib/Config.cs#L478
This code path is attempting to validate that all of the required container types for the task are present before beginning the task.
- The definition of the required containers for a libfuzzer merge task is located here:
https://github.com/microsoft/onefuzz/blob/main/src/ApiService/ApiService/onefuzzlib/Defs.cs#L402
Within that list of required containers is the ContainerType.UniqueReports which has an expected value of 1. This matches the error that is being produced.
- In the
onefuzz template libfuzzer merge ... command, the parameter --output_container is specified. In the libfuzzer template, that container will be specified as a UniqueInputs ContainerType.
https://github.com/microsoft/onefuzz/blob/main/src/cli/onefuzz/templates/libfuzzer.py#L556
I believe that the source of this bug is that the libfuzzer template code is specifying the output_container as a UniqueInputs container type and that the Defs file is expecting a UniqueReports container type.
Expected result
The merge command should successfully produce a new set of files based on the two provided containers.
Actual result
An error regarding the need for a UniqueReports container.
Other Notes
I have not confirmed that changing UniqueReports to UniqueInputs fixes the problem. This analysis is solely based on code review.
The libfuzzer container requirement for a general inputs container should be satisfied by the --existing_inputs parameter in the OneFuzz merge command.
AB#45414