praetorian-inc / chariot-ui

Chariot Offensive Security Platform
https://preview.chariot.praetorian.com
MIT License
15 stars 6 forks source link

Risks Created Through CLI Ignoring State #191

Open Ameston opened 3 days ago

Ameston commented 3 days ago

Bug Description The following command creates a new risk in the triage informational state instead of open informational on the latest version of the CLI.

Steps to Reproduce praetorian --account "REDACTED" chariot add risk --key '#asset#REDACTED#REDACTED' --status 'OI' hello-world

Expected Behavior Open a new risk in the open informational state.

noah-tutt-praetorian commented 3 days ago

It’s not possible to create a risk in any state other than Triage. This keeps state management for notifications simple.

We can modify the CLI to make this clear, or alternatively, we can issue an update request after the create request to set the status.

Ameston commented 3 days ago

we can issue an update request after the create request to set the status.

Roger! Yeah, currently, the CLI lists all of the available states. My workaround was going to just issue a follow-up request, so I think the latter is the ideal solution.

noah-tutt-praetorian commented 3 days ago

cc @Ayushi-12