scancode.io icon indicating copy to clipboard operation
scancode.io copied to clipboard

`run` command does not support all scancode.io outputs

Open AyanSinhaMahapatra opened this issue 1 year ago • 2 comments

Discussed in https://github.com/aboutcode-org/scancode.io/discussions/1979

Originally posted by FabianRolfMatthiasNoll December 4, 2025 I was trying to use ORT also for our container image scanning when someone pointed out i could use scancode directly and then import that into ORT. But im not getting really smart from the documentation. I want to use the docker container that is provided from scancode because that makes it easier for me.

docker run --rm         
--user root         
-v "$PWD":/codedrop         
-v "/etc/ssl/certs/ca-certificates.crt":/etc/ssl/certs/ca-certificates.crt 
<artifactory-proxy>/enterprise-docker-dev/aboutcode-org/scancode.io:latest 
run analyse_docker_image docker:<image-name> --project test --format ort-package-list

But if i do that its not detected as a valid option: run run: error: argument --format: invalid choice: 'ort-package-list' (choose from json, spdx, cyclonedx, attribution).

What am i doing wrong.

See https://github.com/aboutcode-org/scancode.io/blob/main/scanpipe/management/commands/run.py#L62 here we do not support all scancode.io output formats (like ort-package-list).

AyanSinhaMahapatra avatar Dec 04 '25 19:12 AyanSinhaMahapatra

@AyanSinhaMahapatra Thanks for starting this. The current implementation will need a bit more though as it introduce problematic scenarios, such as adding csv and xlsx are valid format options in the run while not supported by the --print output option enforced in run.

run scan_codebase dir/ --format csv
CommandError: --print is not compatible with xlsx and csv formats.

For now, I'm merging a minimal fix in https://github.com/aboutcode-org/scancode.io/pull/1982

tdruez avatar Dec 05 '25 04:12 tdruez

is this issue still open

gyanranjanpanda avatar Feb 11 '26 22:02 gyanranjanpanda