OWASP / threat-dragon

An open source threat modeling tool from OWASP
https://owasp.org/www-project-threat-dragon/
Apache License 2.0
874 stars 231 forks source link

Allow user to select multiple threat types #620

Open jospurvis opened 1 year ago

jospurvis commented 1 year ago

Describe what problem your feature request solves At the moment when selecting a threat type, I can only select one of the available options. For example, I can indicate a threat covers Confidentiality or Integrity or Availability, but cannot indicate it affects multiple of them. This creates a problem when discussing threats that legitimately affect multiple areas—for instance, a service crash that creates Availability issues and may disclose information while crashing that threatens Confidentiality.

Describe the solution you'd like Threat types should be multi-select, perhaps with check-boxes or the Option-key-to-select-multiple solution. This enables users to select one or multiple depending on the context of the threat.

jgadsden commented 1 year ago

This would be nice to have, and may come out of the 'vue box', so targeting for version 2.1

jgadsden commented 6 months ago

should be able to do this in bootstrap-vue: https://bootstrap-vue.org/docs/components/form-select/#multiple-select-support

asad0206 commented 5 months ago

I was trying to work on this, and i tried using both with multiple. This works but to select multiple i need to press ctrl key or the shift key. I tried to remove that with some JS function but was unable to do so. Then i tried using the which requests to send the data in an array. So i tried to extract data from threathTypes() computed property to another variable. I am able to push this data to the checkbox but then the multiple select feature wont work. Just to test if i am wrong or not i used another library which on someone's github repo and it was working perfectly fine. I am new to vue can you please guide what i am doing wrong and what i should do.

jgadsden commented 5 months ago

@asad0206 are you following https://bootstrap-vue.org/docs/components/form-select/#multiple-select-support ?

asad0206 commented 5 months ago

I did that but but as i mentioned i need to hold ctrl or shift key. To eliminate this issue i tried to use some js function but then it wont work. 😢 If you have some other example or resource that would be helpful

jgadsden commented 5 months ago

@asad0206 I misunderstood - selecting multiple items from a drop list should always requires a shift or control key being pressed?

asad0206 commented 5 months ago

Yes , you are correct !