RedHatProductSecurity / cvss-v4-calculator

CVSS v4.0 calculator
https://redhatproductsecurity.github.io/cvss-v4-calculator/
BSD 2-Clause "Simplified" License
32 stars 22 forks source link

#51 Refactor score logic outside the Vue app #52

Closed gscottwilson closed 5 months ago

gscottwilson commented 6 months ago

Hello, I work with Chris Turner and our team would like to use your calculator scoring logic for V4 scoring. In the PR you'll see I've moved the scoring logic outside of the Vue app methods section in order to make it more easily available for 3rd party use (when a full web application is not required). This works for us.

I've attempted to leave the structure of the Vue app the same with no build steps introduced and minimal refactoring.

I've done limited testing comparing several different vector selections to the production V4 calculator and am seeing matching scores and no error messages.

gscottwilson commented 5 months ago

I think we should also change line 172 in index.html to force loading new app.js version and not the cached one on some browsers.

Good catch! done