Skip to content

Remove weaknesses from view which are not in DB - #1256

Merged
TG1999 merged 3 commits into
aboutcode-org:mainfrom
TG1999:fix_cwe_view_problem
Aug 3, 2023
Merged

Remove weaknesses from view which are not in DB#1256
TG1999 merged 3 commits into
aboutcode-org:mainfrom
TG1999:fix_cwe_view_problem

Conversation

@TG1999

@TG1999 TG1999 commented Aug 2, 2023

Copy link
Copy Markdown
Contributor

The problem with the CWE data is that there is no error handling when we try to access weakness using this weakness = self.db.get(self.cwe_id). For say CWE-189 which is a weakness associated with CVE-2009-3389 is not present in cwe2.database.

@TG1999
TG1999 requested a review from pombredanne August 2, 2023 18:54
TG1999 added 2 commits August 3, 2023 00:29
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
@TG1999
TG1999 force-pushed the fix_cwe_view_problem branch from 50f82a3 to 3dab859 Compare August 2, 2023 19:01
@TG1999
TG1999 requested a review from tdruez August 3, 2023 05:21
Comment thread vulnerabilities/models.py Outdated
Comment thread vulnerabilities/models.py
Comment thread vulnerabilities/views.py Outdated
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants