nf-core / nf-core/modules

Sentieon modules expose the license key in the command script

Open
#10,344 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Nextflow
Stars
429
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
153

Description

Have you checked the docs?
Description of the bug

Noticed this when debugging another module that uses secrets.

Sentieon modules have this in the script block:

    def sentieonLicense = secrets.SENTIEON_LICENSE_BASE64
            ? "export SENTIEON_LICENSE=\$(mktemp);echo -e \"${secrets.SENTIEON_LICENSE_BASE64}\" | base64 -d > \$SENTIEON_LICENSE; "
            : ""
    """
    ${sentieonLicense}

This will write the value of secrets.SENTIEON_LICENSE_BASE64 in plaintext into the .command.sh file.

I don't know the tool so I can't say for sure what a good fix is, but perhaps this would be a good temp fix - letting Nextflow load the secret if it exists, which makes it available as an environment variable. Then echo the environment variable into the tempfile instead of the raw string?

process SENTIEON_THING {
    secret secrets.SENTIEON_LICENSE_BASE64 ? "SENTIEON_LICENSE_BASE64" : "" 

    script:
    def sentieonLicense = secrets.SENTIEON_LICENSE_BASE64
                ? "export SENTIEON_LICENSE=\$(mktemp);echo -e \"\${SENTIEON_LICENSE_BASE64}\" | base64 -d > \$SENTIEON_LICENSE; "
                : ""

https://nextflow.slack.com/archives/C02T98A23U7/p1772718409863709

Command used and terminal output

Relevant files

No response

System information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Sentieon module script blocks containing the secrets.SENTIEON_LICENSE_BASE64 interpolation and inspect how their secret handling is generated. Verify the proposed approach against the Nextflow secret behavior referenced in the issue. Done means the license value is no longer written in plaintext to .command.sh while the Sentieon modules still receive the license.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.