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]: latestSupportingAssetId is incorrect in migrated ISRA resulting in incorrect new supporting asset ID #289

Open Alvin-JohnPagente opened 3 months ago

Alvin-JohnPagente commented 3 months ago

Issue Description

The issue is from an sra that was saved from an xml. There are 4 supporting assets and when you add a new supporting asset, the ID is still 4.

Duplicate Steps

  1. Add a supporting asset when the asset ID order in the table is 4, 1, 2, 3
  2. Notice that the new ID is 4 image

Looking at the sra file, "latestSupportingAssetId": 3. The issue is when the file was saved from xml, the latestSupportingAssetID may have been based on the last asset ID on the table.

Expected Results

The supporting asset ID cannot be a duplicate of an existing asset ID

Version Detected

1.1.0 (Default)

Attachments

No response

CarlatThales commented 3 months ago

Workaround is set to set latestSupportingAssetId manually in the SRA file.

Alvin-JohnPagente commented 3 months ago

Set the latestSupportingAssetId in the SRA file before adding the supporting asset. It's better to re-open the file after editing manually. Example: If the highest ID is 4 then set latestSupportingAssetId to 4