Skip to content
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

CLI shows disabled thresholds as enabled #287

Open
kylewillmon opened this issue Apr 22, 2022 · 2 comments
Open

CLI shows disabled thresholds as enabled #287

kylewillmon opened this issue Apr 22, 2022 · 2 comments
Labels
bug Something isn't working medium priority Should be handled as soon as possible

Comments

@kylewillmon
Copy link
Contributor

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 kylewillmon added bug Something isn't working needs triage Needs to be reviewed or assigned labels Apr 22, 2022
@cd-work
Copy link
Contributor

cd-work commented Apr 22, 2022

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.

@louislang louislang added medium priority Should be handled as soon as possible and removed needs triage Needs to be reviewed or assigned labels Apr 25, 2022
@louislang
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium priority Should be handled as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants