Skip to content

Mask fusion mount and s3 bucket names#200

Open
heuermh wants to merge 3 commits intonextflow-io:masterfrom
heuermh:mask-paths
Open

Mask fusion mount and s3 bucket names#200
heuermh wants to merge 3 commits intonextflow-io:masterfrom
heuermh:mask-paths

Conversation

@heuermh
Copy link

@heuermh heuermh commented Feb 4, 2026

Mask /fusion, /s3/bucket/, s3://bucket/ and arbitrary subpaths from path values in summary messages.

For our use case, we want to distribute multiqc_report.html files without leaking details of our infrastructure.

nextflow.config:

validation {
    summary {
        maskBucketNames = true
    }
}
$ nextflow run -profile test,docker main.nf --outdir test

 N E X T F L O W   ~  version 25.10.3

Launching `main.nf` [grave_gutenberg] DSL2 - revision: 338ee9742e


------------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
      ____
    .´ _  `.
   /  |\`-_ \      __        __   ___
  |   | \  `-|    |__`  /\  |__) |__  |__/
   \ |   \  /     .__| /¯¯\ |  \ |___ |  \
    `|____

  nf-core/sarek 3.8.0
------------------------------------------------------

...
Reference genome options
  sentieon_dnascope_model   : [** masked **]/igenomes/Homo_sapiens/GATK/GRCh38/Annotation/Sentieon/SentieonDNAscopeModel1.1.model


@ConfigOption
@Description('A list of subpaths to mask from path values.')
final public List<CharSequence> maskFromPaths
Copy link
Author

Choose a reason for hiding this comment

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

maskSubpaths instead?


private CharSequence maybeMaskBucketNames(CharSequence value) {
if(config.summary.maskBucketNames) {
value = value.replaceAll(S3_BUCKET_PATH_PREFIX, '/[** masked **]/')
Copy link
Author

Choose a reason for hiding this comment

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

Worth making [** masked **] a separate parameter?

@heuermh heuermh changed the title wip: mask fusion mount and s3 bucket names Mask fusion mount and s3 bucket names Feb 24, 2026
@heuermh heuermh marked this pull request as ready for review February 24, 2026 19:35
Copy link
Collaborator

@nvnieuwk nvnieuwk left a comment

Choose a reason for hiding this comment

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

I think it would make more sense to make this one global config option that contains a list of String prefixes to mask from paths. This would make this function more portable to other systems.

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

Successfully merging this pull request may close these issues.

2 participants