Skip to content

Allow exporting scan payload even without --include-metadata

Anže Luzar requested to merge inlcude-metadata-export-warning into main

We have to allow the user to export metadata even when --include-metadata flag was not used. This way the user will always be able to see what the payload looks like. Still, it won't be possible to import the payload properly without --include-metadata, but we can just show a warning instead of exiting (this was implemented in !240 (merged)).

Before:

(.venv) user@ubuntu:~/spotter-cli$ spotter scan playbook.yml -e payload.json
Error: exporting without the metadata won't allow you to properly import payload. Please use the --include-metadata optional argument.

After:

(.venv) user@ubuntu:~/spotter-cli$ spotter scan playbook.yml -e payload.json
Warning: exporting without the metadata will not allow you to properly import payload. Consider using the --include-metadata optional argument.
Scan data saved to payload.json.
Note: this operation is fully offline. No actual scan was executed.
Edited by Anže Luzar

Merge request reports