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

Score expressions without layer variables in the "creating layers from other layers" interface #49

Closed
isaisabel opened this issue Jul 5, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@isaisabel
Copy link
Contributor

What doesn't work

Using a score expression without any layer variables does not assign any scores to the resulting layer.

According to the tip on the help page section for the feature, "if you wanted a new layer where all techniques are scored 50, you could simply type 50 into the score expression input." This does not work in practice: writing a score expression as a constant (e.g 50) or an expression using only constants (e.g 25 + 25) yields a layer with no assigned scores.

Steps to reproduce

  1. Open the "Creating layers from other layers" interface on a new tab.
  2. Write an expression using only constants for the score expression, e.g 50 or 25+25.
  3. The expected output should be that constant, or the result of the expression evaluated, for every technique.
  4. Instead no techniques have scores in the output layer.

How to fix

The code for this feature is located in the layerLayerOperation method of viewmodels.service.
Presumably score expressions without variables can be found using regex or some other sort of check, and this edge case handled accordingly. There is already code to catch this edge case however it is apparently no longer working.

@isaisabel isaisabel added the bug Something isn't working label Jul 5, 2018
@isaisabel isaisabel self-assigned this Jul 9, 2018
@isaisabel
Copy link
Contributor Author

This bug has been fixed and merged into develop. It will be included in the v2.1 release.

cvantine pushed a commit to cvantine/attack-navigator that referenced this issue Aug 7, 2018
yugoslavskiy pushed a commit to atc-project/react-navigator that referenced this issue Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant