Giter Club home page Giter Club logo

Comments (4)

skontar avatar skontar commented on June 26, 2024

I think I do not understand correctly how modified env metric is supposed to be used.
Is either or both assumptions below true?

  1. If modified metric is set, then treat non-modified one to be equal to modified for computation purposes.
  2. If modified metric is not set, treat the modified one to be equal to non-modified for computation purposes.

from cvss-v4-calculator.

ViperGeek avatar ViperGeek commented on June 26, 2024

This may be overly simplistic, but the way I think of it is:

AV=$VALUE
if (MAV != X) AV=MAV

etc.

In other words, Modified versions of the Base Metrics completely override the value set for that Base Metric.

And as Jono said, MSI and MSA may have to be handled differently (although conceptually the same way) because there are additional values (S) that do not exist in the SI and SA base metrics.

from cvss-v4-calculator.

skontar avatar skontar commented on June 26, 2024

I think I understand now. I used the following code instead:

// All other environmental metrics just overwrite base score values,
// so if they’re not defined just use the base score value.
if(Object.keys(this.selectedValues).includes("M" + metric)) {
    modified_selected = this.selectedValues["M" + metric]
    if(modified_selected != "X" && modified_selected != "S") {
        return value == modified_selected
    }
}

from cvss-v4-calculator.

skontar avatar skontar commented on June 26, 2024

I hope this issues is fixed by 5aa9724 . In case it is not, please let me know.

from cvss-v4-calculator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.