Repository navigation
fix(#59): harden ext.* surface, gate chmod, log volume substitution, consolidate parse - #72
Merged
Merged
Conversation
…consolidate parse Closes the remaining 2026-06 audit items for nf-spawn: - SECURITY (M): validate the constrained ext.* directives (instanceType/region/ az/ttl/ami) before launch via validateExtDirectives — fail fast on malformed values. ext.setup/command/packages/container/runOptions are intentionally NOT validated (arbitrary root-run input by design, same trust as ext.args/script); documented in-code as a root-RCE surface. - SECURITY (L): chmod 0777 on the work dir is now gated behind the container branch — bare-OS tasks (run as the dir owner) no longer get a world-writable work dir. - CORRECTNESS (M): the ext.volumes basename-match zero-copy symlink now logs each substitution to stderr, so a coincidental basename collision (wrong DB served) is diagnosable instead of silent. - HEALTH (L): ext.volumes is parsed once into a typed VolumeSpec list that all three views derive from, replacing three divergent traversals. New tests: validateExtDirectives (well-formed/empty/8 malformed cases), container-gated chmod, and substitution logging. Full Spock suite green. submit() synchronous-launch (L corr) is out of scope — tracked by #70. Closes #59.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the remaining 2026-06 audit items for nf-spawn (#59). The rest were already fixed; these are the 4 that were still open (submit() async is separately tracked by #70).
Security
ext.*directives before launch (M).ext.instanceType/region/az/ttl/amifail fast on malformed values via a newvalidateExtDirectives.ext.setup/command/packages/container/runOptionsare intentionally not validated — arbitrary strings that run as root by design (same trust model asext.args/scripton any Nextflow executor); documented in-code as a root-RCE surface rather than given false-security sanitization.chmod 0777gated behind the container branch (L). Bare-OS tasks run as the dir owner and no longer get a world-writable work dir; the relaxation stays only for non-root container images.Correctness
ext.volumeszero-copy symlink substitution is now logged (M). The match is by basename, so a coincidental collision would symlink an unrelated input onto the reference volume and skip its copy — each substitution is now announced to stderr so a wrong match is diagnosable instead of silently serving wrong data.Health
ext.volumesparsed once into a typedVolumeSpeclist that the three views (attach-volume args, docker-v, mount paths) derive from — replacing three divergent traversals.Tests
New:
validateExtDirectives(well-formed / empty / 8 malformed cases), container-gated chmod, substitution logging. Full Spock suite green (JDK 17).Closes #59.