-
Notifications
You must be signed in to change notification settings - Fork 9
COMP-469 Unified Security Scanner for Containers and Plugins #916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
munishchouhan
merged 5 commits into
WV-228-Add-nf-plugin-security-scan
from
WV-228-Add-nf-plugin-security-scan-v2
Oct 15, 2025
Merged
COMP-469 Unified Security Scanner for Containers and Plugins #916
munishchouhan
merged 5 commits into
WV-228-Add-nf-plugin-security-scan
from
WV-228-Add-nf-plugin-security-scan-v2
Oct 15, 2025
Conversation
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
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
Member
Author
Signed-off-by: munishchouhan <hrma017@gmail.com>
jordeu
reviewed
Oct 10, 2025
Signed-off-by: munishchouhan <hrma017@gmail.com>
Member
Author
jordeu
approved these changes
Oct 10, 2025
stefanoboriero
approved these changes
Oct 13, 2025
Member
Author
|
@pditommaso please review |
pditommaso
approved these changes
Oct 15, 2025
Collaborator
|
Let's merge to see the overall impact |
4d637bf
into
WV-228-Add-nf-plugin-security-scan
7 checks passed
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.




Unified Security Scanner for Containers and Plugins
Summary
This PR consolidates container image scanning and Nextflow plugin scanning into a single unified scanner container, eliminating the need for separate images and simplifying the scanning infrastructure.
Motivation
Previously, Wave used two separate Docker images for security scanning:
wave.scan.image.name- for scanning container images with Trivywave.scan.plugin.image.name- for scanning Nextflow plugins (trivy + oras + unzip)This approach had several drawbacks:
Changes
1. Unified Scanner Container (
scanner/)New:
scanner/scan.shscan.sh container <image> <workdir> <platform> <timeout> <severity> <format>scan.sh plugin <plugin> <workdir> <timeout> <severity> <format>oras, extracts withunzip, scans withtrivy rootfs--platformflag when actually provided (not for plugins)Updated:
scanner/Dockerfileaquasec/trivywith addedbash,oras, andunzipscan.shas entrypointNew:
scanner/README.md2. Wave Application Changes
ScanStrategy.groovybuildScanCommand()method for unified command generationnextflow/pluginpattern)scanCommand,trivyCommand,scanPluginCommand) for backward compatibilityKubeScanStrategy.groovybuildScanCommand()methodscanConfig.scanImagefor all scan typesDockerScanStrategy.groovybuildScanCommand()methodScanConfig.groovyscanPluginImageconfiguration propertyscanImageifscanPluginImagenot specified3. Test Coverage
New:
BuildScanCommandTest.groovyTechnical Details
Parameter Handling
The implementation uses different parameter counts based on scan type:
Container Scan (7 parameters):
Plugin Scan (6 parameters - no platform):
The
scan.shscript detects the scan type and adjusts parameter positions accordingly, ensuring correct parsing without ambiguity.Backward Compatibility
wave.scan.plugin.image.nameconfiguration still works (deprecated)@Deprecatedbut remain functionalConfiguration Changes
Before:
After:
Benefits
Testing
BuildScanCommandTest- all passingMigration Guide
For existing deployments:
Build the unified scanner image from
scanner/directory:Update Wave configuration:
(Optional) Remove the deprecated
plugin.image.nameconfigurationRestart Wave application to pick up changes
Example Usage
Container Scan:
docker run wave-scanner:latest \ container \ alpine:latest \ /scan \ linux/amd64 \ 15 \ "CRITICAL,HIGH" \ defaultPlugin Scan:
docker run wave-scanner:latest \ plugin \ public.cr.seqera.io/nextflow/plugin/nf-amazon:1.0.0 \ /scan \ 15 \ "CRITICAL,HIGH" \ defaultFiles Changed
scanner/scan.sh(new) - Unified orchestration scriptscanner/Dockerfile(modified) - Added bash, new entrypointscanner/README.md(new) - Comprehensive documentationsrc/main/groovy/io/seqera/wave/service/scan/ScanStrategy.groovy- Added unified command buildersrc/main/groovy/io/seqera/wave/service/scan/KubeScanStrategy.groovy- Simplified implementationsrc/main/groovy/io/seqera/wave/service/scan/DockerScanStrategy.groovy- Simplified implementationsrc/main/groovy/io/seqera/wave/configuration/ScanConfig.groovy- Deprecated plugin configsrc/test/groovy/io/seqera/wave/service/scan/BuildScanCommandTest.groovy(new) - Comprehensive testsBreaking Changes
None. The implementation maintains full backward compatibility.
Future Work
Checklist
🤖 Generated with Claude Code