ThalesGroup / security-risk-assessment-tool

The ISRA security-risk-assessment-tool project is an Electron based application used to do security risk assessments at a technical level
BSD 4-Clause "Original" or "Old" License
22 stars 7 forks source link

[Issue]: Refactor similar functions in a common JavaScript file #281

Open ThomasDThales opened 3 months ago

ThomasDThales commented 3 months ago

Issue Description

Some functions like the validity checks (checkRiskAttackPaths, checkVulnerabilityRef, checkSupportingAssetRefArray, checkSupportingAssetRef, coherentSupportingAsset, existSupportingAsset, checkBusinessAssetRefArray, checkBusinessAssetRef, existBusinessAsset) are duplicated in several files.

Duplicate Steps

No response

Expected Results

The similar functions and especially the checks should be common to every file. That would also make sure every check conditions are the same. Proposal: moving them to common.js.

Version Detected

1.2.0

Attachments

No response