Skip to content

Conversation

@RZ9082
Copy link
Collaborator

@RZ9082 RZ9082 commented Jan 21, 2026

FOR CONTRIBUTOR:

  • I have read the CONTRIBUTING.md document and this tool is appropriate for the tools-iuc repo.
  • License permits unrestricted use (educational + commercial)
  • This PR adds a new tool or tool collection
  • This PR updates an existing tool or tool collection
  • This PR does something else (explain below)

@RZ9082 RZ9082 self-assigned this Jan 21, 2026
@RZ9082 RZ9082 moved this from In progress to Ready in Galaxy Tool Developers SIG Board Jan 21, 2026

## Invoke Webin-CLI with computed flags.
ena-webin-cli -context genome -manifest "\$manifest" -userName "\$webin_id" -password "\$password" -centerName "\$center_name" -inputDir "./fasta" $test_flag $action_flag -outputDir $outputs_dir >> '$webin_cli_log' 2>&1 || true;
ena-webin-cli -context genome -manifest "\$manifest" -userName "$webin_id" -password "$password" -centerName "\$center_name" -inputDir "./fasta" $test_flag $action_flag -outputDir $outputs_dir >> '$webin_cli_log' 2>&1 || true;
Copy link
Contributor

@bernt-matthias bernt-matthias Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use "$webin_id" and "$password" on the command line the values are visible to other users. Since this seems to be the only way to provide username and password to the program my suggestion would be to ask upstream to allow input via a file (e.g. json or whatever they prefer) or environment variables.

Also this might be a possible attack vector (since username and password are not sanitized) in particular if double quotes are used.

However, for now the PR provides an improvement and we may proceed (a bump would be required).

Wondering if || true is the right thing to do here? Intuitively I would remove it...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing the env variables directly into the ena-webin-cli command would also solve the problem for now, right? Then the values will not be visible

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but does ena-webin-cli support this already?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

      -userName, -username=USER
                           Webin submission account name or e-mail address.
      -password=PASSWORD   Webin submission account password.
      -passwordFile=FILE   File containing the Webin submission account
                             password.
      -passwordEnv=VAR     Environment variable containing the Webin submission
                             account password.

For the password yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then lets take this for now and ask for the same for user. We can then add this as soon as it is possible.

echo "Submitting manifest \$manifest" >> "$webin_cli_log" 2>&1;

## Invoke Webin-CLI with computed flags.
ena-webin-cli -context genome -manifest "\$manifest" -userName "\$webin_id" -password "\$password" -centerName "\$center_name" -inputDir "./fasta" $test_flag $action_flag -outputDir $outputs_dir >> '$webin_cli_log' 2>&1 || true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The\ in "$webin_id" and "$password" was done to make it work for both Conda and Singularity installations. #7340 it was quite a debugging to get it working.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for mentioning this, I will have a look!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The \ just makes $webin_id" a bash variable. Otherwise the cheetah interpreter would try to replace it with the value of a Galaxy parameter (or output) named webin_id`.

Independent of this, the problem with bash variables in commands is the the content of the variables will be exposed in the process list (to all users of the system where the tool is running),

@RZ9082 RZ9082 marked this pull request as draft January 22, 2026 16:56
@bedroesb
Copy link
Contributor

Great work and thanks a lot for the pro active approach! I think this was very much needed from a security standpoint.
I have a general question. As far as I know is this new way of secret handling is a 25.1 feature. I there a way of enforcing that this tool version can only get installed on 25.1 instances? Should for example the profile version be bumped to 25.1? Or does this not prevent installation on older Galaxy instances?

@bernt-matthias
Copy link
Contributor

Yes profile 25.1 will prevent intsallation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants