Skip to content

CVE: adapt IDEasy to consider security.json files to warn user #1144

Open
0 of 1 issue completed
Open
@hohwille

Description

@hohwille

IDEasy needs to be adapted such that it considers security.json files.
If a tool is installed (installTool method called including the case that it is already installed in the configured version), such security.json file is read.
It will then be used to find all CVEs the version to install (or already installed).
If the resulting list is empty (no CVEs), all is fine and a info message is logged (unless silent is true):

No CVEs found for tool {} in version {}

e.g.

No CVEs found for tool intellij/ultimate in version 2023.3.4.1

(please note that we omit the edition if identical to the tool so print java instead of java/java)

Otherwise we will filter the list of CVEs according to their severity by a potential configured CVE_MIN_SEVERITY variable so CVEs with a severity lower than this configured threshold are filtered (removed/ignored).
This variable will be added to IdeVariables with a default value of 1.0.

For each remaining CVE we log a warning message (regardless of silent flag):

Found https://nvd.nist.gov/vuln/detail/{} for tool {} in version {}

Where the first placeholder is the CVE ID.

An optional add-on to this story will be #1145

Dependencies

Somehow this story depends on #1143.
However, it is not blocked by it.
If this story is to be implemented before #1143 ever produced any security.json file, an example of such a file can be produced manually and if needed PR can be created to ide-urls to add it and be merged in order to test this story implementation before #1143 is finished or even started.

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions