j3ssie / osmedeus

A Workflow Engine for Offensive Security
https://osmedeus.org/
MIT License
5.25k stars 873 forks source link

Custom Params Not Working in yaml section 'params' #267

Closed bayonasam closed 9 months ago

bayonasam commented 9 months ago

The issue:

When we add custom parameters with the "--params" parameter, they can then be called from any yaml, however, they cannot be used within the "params" section inside the module:

If we execute the following command, we are assigning a custom variable called "Company" which can be used within the yaml:

osmedeus scan -m /root/osmedeus-base/workflow/test/validate.yaml -t company.com --params 'Company=COMPANY.DOT.COM'

However, if this custom variable is called within another variable set in the "params" section of the module, the variable is empty, unlike inherited variables such as "Workspace" and "Workspaces", which can be concatenated together.

In the following screenshot, it shows how I call the following variables/params with the "ExecCmdWithOutput" Script.

imagen

imagen

In summary, if a new parameter is set from the command line, it can be called from the yaml, but it cannot be used within the "params" section to concatenate values and work with it.

Thanks for helping in advance <3

j3ssie commented 9 months ago

Thanks for raising the issue. I've pushed an updated version that addresses the problem you mentioned.