-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Threat generation does not work - results.map is not a function #258
Comments
Thank you for the report! Interestingly, I found that a couple of unit tests are failing with this same issue, but only when run on windows, not on linux. |
ah, yes, thankyou @uncatchable-de , I have just tested it and indeed it does not work. Demerit for me I think @lreading this is pretty serious, we have a loss of functionality that I have introduced with all the rearranging of desktop + core files |
hmmm, yes, I updated json-rules-engine and at the same time I broke the unit tests so did not spot this json-rules-engine has gone from 3.1.0 to 6.1.2 and I have not tested this breaking change properly - will look for a fix |
I find it interesting that it was passing on linux though... It makes me wonder about some of the tests. I've been digging into them a bit and we're using at least one or two extremely out of date and/or unmaintained libraries for testing. Probably due for an overhaul at some point in the near future. :) Let me know what I can do to help, @jgadsden ! |
Well, the fix is really easy. Line 34 in threatengine.js changes from However json-rules-engine has also changed the |
Thank you for the fast fix @jgadsden. Will there be a new release of 1.5.0 with that fix included? I think it is an essential feature for creating threat models. |
We have the fixes in place, and we expect a new version 1.5.1 to be released in the next few days. |
@uncatchable-de - Version 1.5.3 has been released, which contains the fix for this issue., Thanks again for reporting this! |
Describe the bug
Clicking on "+ STRIDE per element..." in the manage threat section does not generate any threat. Happens on Windows and MacOS with version 1.5.0.
Expected behaviour
Expected to have some threats automatically generated.
Environment
To Reproduce
Any additional context, screenshots, etc
Error message from the developer tools console on MacOS (same error also occurs on Windows):
/Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/core/services/threatengine.js:34 Uncaught (in promise) TypeError: results.map is not a function
at onCompleted (/Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/core/services/threatengine.js:34)
onCompleted @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/core/services/threatengine.js:34
Promise.then (async)
generateThreats @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/core/diagrams/diagram.js:235
scope.onSuggestThreats @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/core/diagrams/elementpropdirectives.js:88
(anonymous) @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/node_modules/angular/angular.js:17073
callback @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/node_modules/angular/angular.js:29123
$eval @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/node_modules/angular/angular.js:19523
$apply @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/node_modules/angular/angular.js:19622
(anonymous) @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/node_modules/angular/angular.js:29127
defaultHandlerWrapper @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/node_modules/angular/angular.js:3891
eventHandler @ /Applications/OWASP-Threat-Dragon.app/Contents/Resources/app.asar/node_modules/angular/angular.js:3879
The text was updated successfully, but these errors were encountered: