Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bayonasam opened this issue Nov 8, 2023 · 1 comment
Closed

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

bayonasam opened this issue Nov 8, 2023 · 1 comment

Comments

@bayonasam
Copy link

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.

  • Param "Company" established from the --param parameter in the command line. Works well.
  • Param "LegacyParams", which is a concat of different legacy variables in the "params" section established by osmedeus. Works well.
  • Param "NewParam", which is a new variable within the "params" section calling "Company". Does not work.

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
Copy link
Owner

j3ssie commented Nov 18, 2023

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

@j3ssie j3ssie closed this as completed Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants