Giter Club home page Giter Club logo

security-risk-assessment-tool's Introduction

OpenSSF Scorecard

Security Risk Assessment tool

The ISRA or Security risk assessment tool project is an Electron based application used internally in Thales Digital Identity and Security Business Unit (Thales DIS) to evaluate security risks of engineering projects.

It permits to define the primary assets, called the business assets, the associated supporting assets, the threat agents, the vulnerabilities and calculate associated risks and potential risk treatment options. This process is fully compliant with the ISO 27005 risk management standard.

Usage

Creating a security risk assessment of engineering projects involves several steps, which are quickly summarized below (you can refer to ISO 27005 for more information):

  1. Identify and define the scope of the risk assessment including assumptions and trusted boundaries.
  2. Identify the business, also called primary assets, (what has value and is important from a business perspective) according to their required quality security sub-characteristics (see ISO 25010 for the definition of the security characteristics of products). The consequences for the loss of these security characteristics are rated here for each security quality sub-characterstic. This is equivalent to the Identification of assets and identification of consequences activities in ISO 27005. Examples of business assets: a payment service, user personal information, intellectual property or algorithm.
  3. Identify the supporting assets, where the actual business assets will flow through or be managed. This is usually technical in nature, these assets may have vulnerabilities that are exploitable by threat agents. Example of supporting assets: volatile memory, storage location, data processing equipment, cryptograpgic keys, network, operating system, software application. The selection of supporting assets depends on the level of granularity required. These supporting assets should be linked to the business assets in the tool. For example, if a business asset is stored then it should be linked to a storage location. This is equivalent to the Identification of assets activities in ISO 27005.
  4. Identify threats, and threat scenarios in the risk tab. This involves identifying the threat agents, what may be attacked and likelihood scenarios. Each threat should be defined as separate risk in the risk tab. This is the Identification of threats activity in ISO 27005.
  5. Identify vulnerabilities that could be exploited for each threat scenario. This is done in the vulnerabilities tab, which should be linked to supporting assets. Each vulnerability should be scored with a score of 0 to 10. This is the identification of Vulnerabilities activity in ISO 27005.
  6. In the risks tab, create an attack path of vulnerabilities for each threat. This will create incident scenarios. Complete the attack path with AND and OR combinations can be used. This is the Assessment of incident likelihood and Level of risk determination in ISO 27005. Once this step is completed, the risk level should be available for each incident scenario.
  7. Determine level of acceptance of risks. For each evaluated risk, determine if risk is acceptable or not. This is equivalent to the Risk Evaluation activity in ISO 27005.
  8. For those risks that need to be treated determine how they will be treated:
  • Mitigate or Modify: propose the security controls to put into place in the risks tab for each treatment decision, with the expected benefit of the security control (in % on risk level).
  • Retain: Risk is accepted as is.
  • Avoid: Avoid the risk by stopping the activity, feature, project or by changing the architecture.
  • Share: Share or transfer the risk with the customer or another third-party.

In some cases, vulnerabilities may be found before the risks are actually defined, such as through security testing, then the steps above may be modified accordingly.

How to run

Just download the zip file for your platform and unzip it and execute sratool or SRATool, depending on your platform. It is generic enough to be used by any organization, but some of the items may be more related to Thales DIS, in that case the json-schema.js should be adapted accordingly to your organization needs.

Development information

Prerequisites

To install and use the tool, the following prerequisites are required:

  1. Node.js (required for Electron, recommended to download the latest LTS version available)

Configurating the defaults

For developers that wish to configure the tool for their specific needs, the defaults for the application can be configured as shown and described below:

Usage

    const config = {
    appVersion: '1.0.0',
    classification: '',
    organizations: ''
};

Examples

Override default security classification for project
  const config = {
    appVersion: '1.0.0',
    classification: 'COMPANY CONFIDENTIAL {PROJECT}'
};
Override default organization options for project
  const config = {
    appVersion: '1.0.0',
    organizations: ['Governance division','IT division', 'FinTech division']
};

Developer installation

  1. Clone repository
git clone [email protected]:ThalesGroup/software-risk-assessment-tool.git
cd software-risk-assessment-tool
  1. Install dependencies for both app & lib folders and run application
app & lib:
npm install
npm update

app:
npm start

Test

Executes all test files within test folder in lib

npm run test

API documentation

Generate api documentation for lib

npm run jsdoc

Packaging and distribution

The packaging for distribution uses electron-builder.

Prerequisites

You need to have prepared your development environment beforehand by following the developer installation steps. You also need to ensure that the directory dist under app does not exist.

You then need to run in the app directory the following command:

npm install electron-builder

To create packages for linux, MacOS and Windows, you must create the packages on an Apple Mac machine, otherwise only the host platform target will be created.

Packaging

To create the packages for the host platform, you can run from the app directory:

npm run dist

For all platform packaging, from the app directory, run :

npm run dist-all

The output files should find themselves in the dist directory.

Documentation

Documentation for lib is available at lib/doc/index.html.

Contact

  • Carl Eric Codere and Sebastien Petit are currently overseeing the project in Thales DIS

Credits

  • Frederic Paillart who managed the initial version of the tool using Infopath
  • Megan Liow for the initial port to Electron.
  • Alvin Siah for the major improvements to the Electron version.
  • Sun Fang who reviewed and helped us improve the JSON Schema
  • All other people including Philippe Biton, Frank Converset, Antoine Galland, Patrick George, Karen Lu, Sebastien Petit, Petr Skripal, who improved, commented and/or worked on the ISRA methodology throughout the years.

Since this methodology has been around for several years internally, we may have missed some names who contributed to it, our apologies if its the case.

Contributing

If you are interested in contributing to the ISRA software-risk-assesssment-tool project, start by reading the Contributing guide.

License

The chosen license in accordance with legal department must be defined into an explicit LICENSE file at the root of the repository You can also link this file in this README section.

security-risk-assessment-tool's People

Contributors

alvinatthales avatar apkunpacker avatar carlatthales avatar dependabot[bot] avatar gcalmettes avatar meganliow avatar sebastienlejeune avatar sebatthales avatar thomasdthales avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

security-risk-assessment-tool's Issues

Copying text from Infopath ISRA in project descrption for example also copied the background color of the box.

In 1.0.0-alpha03:

When copying some normal text from a textbox in the Infopath version of the tool, and it is pasted back into the tool, the background color of the text instead of being default, becomes another background color.

Steps to reproduce:

  1. In MS Infopath tool write some text in Project description textbox and copy it to the clipboard
  2. Paste the copied text into the Project Description textbox of the ISRA Web app, the background color will be wrong.

On Risks screen, enter some text in order will make the risk screen become abnormal

Version to be tested: 1.0.0-alpha02

On Risks screen, enter some text in order will make the risk screen become abnormal.

Steps to reproduce:

  1. On filter search box, enter "a" + ENTER
  2. enter "z" + ENTER
  3. delete the text manually and ENTER
  4. expect all rows in table, Risk description, Risk evaluation, Risk mitigation, and Risk management can be seen

Actual result:
Only can see the table, others cannot be seen, until click the "X" button on the filter search box

Network Security Level drop down missing value "3"

Version to be tested: 1.1.0-alpha02

In Supporting assets, under list of supporting assets, Network Security Level drop down missing value "3".
Compare to the ISRA which is opened by using InfoPath, it has -2, -1, 1, 2, 3
But in the ISRA app, it only has -2, -1, 1, 2

Always get "Invalid Project Descriptive Document" when trying to attach Project Descriptive Document from an existing ISRA xml which has attachment before

Version to be tested: 1.0.0-alpha02

Steps to reproduce

  1. Opening an existing ISRA xml which has file attached on Project Descriptive Document
  2. Navigate to Project Context, get error message pop up "Invalid Project Descriptive Document"
  3. Click on the attachment link and click Remove
  4. Save as to a json file
  5. Close this app and open the json file which is saved on step 4
  6. Navigate to Project Context, and attach a file in Project Descriptive Document
  7. Navigate to Welcome tab and then navigate back to Project Context again
  8. Expect to see the file is attached correctly in Project Descriptive Document, but no file is attached and get error message pop up "Invalid Project Descriptive Document"

Unicity of IDs are not enforced between sessions

Version: 1.0.0-alpha03
Platform: win64

Example based on Risks ID (same issue observed on Supporting Asset IDs, not tested on others).

How to reproduce:

  • Delete Risk with max ID.
  • Save the file and close it.
  • Open the file
  • Add a new Risk: the deleted ID is reused.

This is a behavior change from previous tool, in which IDs are unique even across sessions, to avoid ambiguous ID values between different assessment iteration. Be able to have different Risks with same ID in different assessment version may lead to ambiguous risk tracking in products.

Running multiple instances of the tool causes performance issues on each instance

Version: 1.0.0
Platform: win64

When multiple instances of the SRATool are concurrently run, the performance becomes extremely slow on each of the instances.

How to reproduce:

  1. Start one instance of the SRATool and load a risk assessment file.
  2. Start a second instance of the SRATool and load a risk assessment file
  3. Performance will be very bad in each instance when changing tabs for example

Application not able to handle large file attachments

Version 1.0.0 3813418

Platform: win64

When importing XML or JSON data with large files stored as base 64 strings or uploading large files to the application,
JSON validation will fail due to stack overflow as the string is too large for the regex function used in the AJV package's validate function

How to reproduce:

  1. Upload Case
  • Upload any large files at Project Descriptive Document in the Project Context Tab (Rich text fields would work also but the uploaded image needs to be about 2MB)
  • An invalid attachment error would pop up
  1. Opening XML Case
  • Open any XML generated by ISRA containing large attachments in the application
  • An invalid xml file error would pop up and the file cannot be opened

Add a "processing" dialog box when processing data for a very long time.

When loading a very complex Risk assessment recalculating and repopulating the data in each tab may take some time but its not clear that the backend is processing data. It may be interesting to popup a "processing/waiting" dialog box or other visual clue if after a certain amount of time has been reached and the backend has not responded yet. Other proposals are also good.

The objective is for the user to know that processing is still going on and that the application has simply not crashed / finished. The threshold when this appears on the screen is if the processing for the tab has not completed in X seconds, then display the popup until the task is completed.

Requirements:

  • The value X, in seconds, can be configured through the configuration file. A value of 0 means always displayed.

Not enough space in business asset tab for the actual business asset name

It seems that the name of the business asset space is very small compared to the other elements in the table on the Business asset tab. Would it be possible to slightly make the fonts smaller of the other columns for Asset Values so as to make more space for the asset name, so asset names becomes wider.

Missing supporting asset selected checkbox enabled when vulnerability item original xml has it enabled

Version: 1.0.1-alpha01

Steps to reproduce:

  1. Open ISRA xml which has vulnerability item which is linked to a supporting asset (checkbox is ticked)
  2. Navigate the Vulnerability
  3. click on the vulnerability item and scroll to supporting asset, check if the specific checkbox is ticked for the supporting asset

Actual result:
the checkbox is not ticked, but opening the same ISRA xml with InfoPath, the checkbox is ticked.

The "AND" text position is incorrect when there are multiple items in the same attack path

Version to be tested: 1.1.0-alpha02

The "AND" text position is incorrect when there are multiple items in the same attack path. It should be some kind like "item1 AND item2", but now is "item1 item2 AND"

Steps to reproduce:

  1. On the attack path which only have 1 item, it is expected that don't have "AND" text.
  2. Click on add button, 2nd item is added, it is expected to have "AND" text beside the 1st item.

Actual result
The "AND" text is beside the 2nd item.

Implement digital signature to protect against tampering and indicate approval

Version: 1.0.0

Use-case:

We need to make sure that either the final PDF report or the ISRA itself can be digitally signed to indicate that is has been approved and finalized for a specific version and not modified after review.

Technical requirements:

  • It should support signing with hardware tokens such as smartcards as well as standard signing keys such as PGP.
  • If it is decided that digital signature is going to protect the actual risk data assessment file and not the PDF report:
    • When a data risk assessment file is opened if there is a digital signature:
      • It is verified to check for tampering and if tampered an error is shown in a dialog box, but data can still be viewed.
      • The digital signature should be displayed with who signed and date (in welcome page?), otherwise indicate not signed.
      • If data is modified then a dialog box indicating that signature will be lost, and it should be cleared and user can continue working on it (maybe do it on export)
    • There should be a menu option to 'export' (To be discussed) the risk data assessment file and this would prompt the actual signature.

Additional requirements

  • Try to base digital signature on standard way for signing JSON files if they exist.

Add Add and Delete row buttons at bottom of table

Supporting asset, risks and vulnerabilities add/delete buttons should be at bottom of table, not at beginning of table. This permits to make it easier to delete and add rows especially in very big tables. This is a UX improvement.

It should be possible to import data from other risk assessments which are used as generic data templates

Version: 1.0.0

Use-case: I wish to pre-populate datasets for supporting vulnerabilities, risks or supporting assets for example which can be reused by other users. Today the only way to do this is to open an existing risk assessment data file, which is not very clean. Instead it would be interesting to have an import option that imports datasets from selected tabs into an existing risk assessment data file.

Exact steps for a possible use-case:

  1. User create a new risk assessment and populates the welcome, project context and business assets fields.
  2. User imports existing known supporting assets and vulnerabilities for this technology by opening the import menu item in File and selecting an existing JSON data file and then a dialog both appears permitting to select tabs to import: he selects supporting assets and vulnerabilities to be imported and all of these are imported into current JSON data file.

Some extra information that needs to be discussed for the design for each tab:

  • Welcome tab should either not be able to be imported, or if imported, it should overwrite everything after a warning to user through a dialog box if data is already present and that it will be overwritten.
  • Project tab should either not be able to be imported, or if imported, it should overwrite everything after a warning to user through a dialog box if data is already present and that it will be overwritten.
  • Business assets tab: It should append to existing data but not append data that is equal to existing data.
  • Supporting assets tab: It should append to existing supporting assets definition table and ignore the rest? Only append data that do not already exist
  • Risks tab: It should append to existing risks, Only append risks that do not already exist
  • Vulnerabilities tab: It should append to existing vulnerabilities, Only append vulnerabilities that do not already exist

The issue here is how to compare data for equality such as risks, vulnerabilities and supporting assets, do we need to create a special range of ID's that is reserved or create a UUID to define equality?

ISRA Report, risk decision text is not match with the decition details in the risk

Revision to be tested : 3f8077a

Use case 1:

  1. There is a risk which decision details is like

Transfer:
It is highly recommended for the application layer to protect all the xxx API that is used with anti hooking.

  1. Navigate to ISRA Report tab and find the same risk
  2. Expect to see the same decision text, but it is shown as

It is highly recommended for the application layer to protect all the XXX API Transfer:
that is used with anti hooking.

Use case 2:

  1. There is a risk which decision details is like

Mitigation:
xxx will only delay attacker to understand the program flow and critical function.
Transfer:
It is highly recommended for the application layer to protect all the xxx that is used with anti hooking.

  1. Navigate to ISRA Report tab and find the same risk
  2. Expect to see the same decision text, but it is shown as

xxx will only delay attacker to understand the program flow Mitigation:
and critical function.
It is highly recommended for the application layer to protect all the xxx Transfer:
is used with anti hooking.

Unable to correctly open ISRA xml when it has empty risk Id

Version to be tested : 1.0.0-alpha02

There are some projects which ISRA xml for the 1st risk Id is empty Id
<my:riskId xsi:nil="true"></my:riskId>
Opening this kind of ISRA xml file will not show correctly.

Steps to reproduce:

  1. Open ISRA xml which 1st risk is empty Id
  2. Expect this xml is opened correctly, able to see all risks in this file.

Actual result:
Only see the 1st risk in table, others are not shown.

Cannot switch tabs / unresponsive menu in certain instances

From master:

This issue may difficult to reproduce, when running the executable, i did print to PDF then switched to the PDF and opened it in windows and then came back to the SRA and could not switch tabs anymore, and no dialog box occurred. See attached image for more information. I am running Windows 10 with Electron Windows executable electron-v21.3.3-win32-x64

bug_report

Only solution is to restart the application.

Unable to set CVSS Score to 10

Version: 1.0.1-alpha01

Steps to reproduce:

  • Go to Vulnerabilities tab and go to CVE Official CVSS Score
  • Set the Score to 10 either manually or via the arrows
  • Vulnerability Scoring would not update to 10 when CVSS Score reaches 10
  • Reload the tab, CVSS Score will be at 9 instead of 10

Talking about TLOT in project context may be unknown to some users

In the project context in the threat modeling there is this text and may not be known to users:

"the result of the TLOT assessment: if the TLOT is low it may not be necessary to use a threat modeling tool"

It is proposed to replace it by:
"the result of the Targeted level of trust assessment (as defined in ISO 27034): if the TLOT falls within a certain minimum threshold it may not be necessary to use a threat modeling tool." which is clearer and defines what is TLOT

@sebptt : In agreement with this?

Empty supporting assets should not be displayed in other locations

When supporting assets have empty labels, they can still be selected in the vulnerabilities tab as well as in the table where they are linked with the business assets.

  1. Create a supporting asset
    1a.. They are displayed and linked to vulnerabilities in the vulnerability tab.
    1b. They are displayed in the supporting assets when they must be linked to business assets

Vulnerability scoring precision

Version: 1.0.0-alpha03
Platform: win64

When importing a file from a previous format (XML), vulnerability scoring are displayed with 11 digits precision after comma.
We should limit to one digit precision after the comma.

JSON Schema comments and issues

The JSON Schema contains some data that should not be present or seems wrong:

From 1.0.0-alpha03:

  • 'description' element should be renamed to 'classification' as it represents the security classification of the document. Also in our implementation it should contain our organization name at the beginning.
  • appVersion: Should this not be hard-coded in the application? I am unsure this should probably be discussed
  • what is the useNewDecode usage? It is found in 2 places in the Schema
  • what is the isAutomaticRiskName usage?
  • vulnerabilityCVE: Probably the default value should be a CVSS3.0 string, not a CVSS2.0 string, or it should simply be left empty.
  • cveScore: Why is the default 4.37, should it not be 0?

CVE Official CVSS Score is 0 when opening ISRA xml file

Version: 1.0.1-alpha01

Steps to reproduce:

  1. open an existing project ISRA xml file
  2. navigate to Vulnerabilities
  3. click on any item in the table
  4. expect to get CVSS score to be same as opening the same file with same item by using InfoPath

Actual result:
The value of CVSS is 0

Text fields for certain tabs resets when tab is clicked while reloading

Version 1.0.0 3813418

Platform: win64

The text fields for Project Context, Business Assets, Supporting Assets will become empty if the user clicks on the respective tab while it is reloading

How to reproduce:

  • Key in some text in the rich text fields for any of the three tabs
  • Click on the tab to reload and click on it again while it is reloading
  • The text fields will become empty

Split data schema validation from actual tool configuration

Version: 1.0.0

Use-case:

We should be able to configure the User Interface elements without modifying the schema used to validate the JSON risk assessment data format. For example some typical elements that should be configurable by organizations are the following:

  • Organization in Welcome tab
  • Document classification label

Technical proposals

  • The configuration data elements should be required for packaging? If not present a warning is displayed to user when packaging and default values are used. Default values for organization in welcome tab could be an edit box instead of a listbox. And for label, it would be CONFIDENTIAL {Project} like it is now.

Attack path automatically sets itself to the longer vulnerability name if another vulnerability that is a substring of it is selected

Version: 1.0.1-alpha01

Steps to reproduce:

  • Create a vulnerability with a long name such as "Replacement of the device"
  • Create another vulnerability with a shorter name that is a substring of the first vulnerability such as "Replacement"
  • In the attack path in the risks tab, select the vulnerability with the shorter name

Actual result:
The longer vulnerability name, "Replacement of the device" is being set instead.

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.