microsoft / onefuzz

A self-hosted Fuzzing-As-A-Service platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Expand` parameters should be passed to tasks via the config rather than function arguments

kananb opened this issue · comments

Most tasks initialize an Expand object for expanding variables in target_options. The values for these parameters mostly come from the config that the task is created with, with the exception of a few which are passed directly to the function that initializes the expander.

In some cases, it's clear why these variables need to be passed as arguments to the function. But in others, it's less clear:
-supervisor.rs (TODO: link to updated code after merging #3553) ; the primary, and somewhat outlying case. The concerning function is passed a config and several additional arguments that are used as expander values.

In general, we should take a closer look at what variables need to be passed later on in the task's lifetime (as an argument) and which can be refactored to be given as a config value instead.

AB#167691