nctl scan dockerfile
nctl scan dockerfile
scan dockerfile resources
nctl scan dockerfile [flags]
Examples
# Scan a Dockerfile with a specific policy file and resource directory
nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/
# Scan and output a JSON report
nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --scan-report /path/to/scan-report.json
# Scan and add a custom report source ID
nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --report-sourceid sample-source-id
# Scan with violations in audit mode reported as warnings instead of failures
nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --audit-as-warn
# Scan and display remediation suggestions
nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --remediate display
# Scan and overwrite files with remediation
nctl scan dockerfile --policies /path/to/sample-policy.yaml -r /path/to/sample-resources/ --remediate overwrite
Options
--audit-as-warn Report violations from policies in audit mode as warnings instead of failures
--details Show result details for violating resources
--file string Output file
-h, --help help for dockerfile
--no-color disable the colors for the stdout reports
-o, --output string Output format (text, json, yaml, scan-report) (default "text")
-p, --policies strings Path to policy files (local path, github URL, helm URL)
--publish Publish reports
--publish-token string scan reports publish token
--remediate string Remediate resources ('show', 'patch')
--report-sourceid string Add source id for report created for local scan
-r, --resources strings Path to resource files (local path, github URL)
--scan-report string Output scan report file (in JSON format)
Options inherited from parent commands
-v, --v Level log level for V logs
SEE ALSO
- nctl scan - Scan resources