Skip to content

sylph wrapper doesn't sanitize file names appropriately #1899

Description

@scottcain

Summary

The Galaxy sylph_profile wrapper can generate an invalid shell command when the input FASTQ dataset name contains parentheses. The job fails before sylph runs with a shell syntax error near (.

Tool/version

  • Tool: sylph profile
  • Tool ID: toolshed.g2.bx.psu.edu/repos/bgruening/sylph_profile/sylph_profile/0.8.1+galaxy0
  • Galaxy: usegalaxy.org, Galaxy 26.1

Reproducer

Run sylph profile on a FASTQ dataset with a name like:

ERR15660424 Sequel II WGS reads (PRJEB97182).fastq.gz

Using cached GTDB database settings.

Observed behavior

The job fails immediately with:

tool_script.sh: line 23: syntax error near unexpected token `('

The generated command includes a symlink target derived from the dataset name:

ln -s '.../dataset_....dat' 'ERR15660424_Sequel_II_WGS_reads_(PRJEB97182).fastq.gz' && \
sylph sketch ERR15660424_Sequel_II_WGS_reads_(PRJEB97182).fastq.gz ...

The ln -s target is quoted, but the later sylph sketch argument is not, so the shell parses the parenthesis and fails.

Expected behavior

The wrapper should either quote the dataset-derived filename everywhere it is used, or use a sanitized internal filename that avoids shell-special characters.

Workaround

Renaming the dataset to remove spaces and parentheses, e.g.

ERR15660424_SequelII_PRJEB97182.fastq.gz

allowed the rerun to progress past the previous syntax error and reach running state.

Suggested fix

Quote the generated input filename in the sylph sketch command, or avoid dataset-derived filenames in shell commands entirely by using a fixed safe symlink name such as input.fastq.gz.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions