cli icon indicating copy to clipboard operation
cli copied to clipboard

CLI shows disabled thresholds as enabled

Open kylewillmon opened this issue 3 years ago • 2 comments

When a threshold is disabled in the UI, but not also set to 0, the CLI shows this threshold as enabled. For example:

disabled

❯ phylum history project test-project       
  Project Name: test-project                                       Project ID: b2370c8c-2b8e-4f3e-9a67-83c39c3beb28
     Ecosystem: unknown

    Thresholds: Score requirements to PASS or FAIL a run. Runs that have a score below the threshold value will FAIL.
           Project Score: Not Set
 Malicious Code Risk MAL: 95
  Vulnerability Risk VLN: Not Set
    Engineering Risk ENG: Not Set
         Author Risk AUT: Not Set
        License Risk LIC: Not Set

[ -- SNIP --]

Conversely, if the threshold is enable in the UI, but set to a value of 0, the CLI shows this as Not Set.

Expected Behavior

The CLI should show Not Set if and only if the threshold is actually disabled

kylewillmon avatar Apr 22 '22 15:04 kylewillmon

It seems like this might need changes to the API? The thresholds are not optional, but always set. So there's no way from the CLI to know if a threshold is disabled or not.

cd-work avatar Apr 22 '22 18:04 cd-work

Yes, I think that's true @cd-work. You can disable the thresholds from the API, but perhaps they aren't sending back any sort of indication that they are disabled.

louislang avatar Apr 25 '22 15:04 louislang