Skip to content

Update GCC CWE mappings#67

Closed
stevegrubb wants to merge 3 commits into
csutils:mainfrom
stevegrubb:gcc-cwe-update
Closed

Update GCC CWE mappings#67
stevegrubb wants to merge 3 commits into
csutils:mainfrom
stevegrubb:gcc-cwe-update

Conversation

@stevegrubb
Copy link
Copy Markdown
Contributor

This update adds most of the common GCC warnings with their CWE mapping.
With this addition, this CSV file covers more than 95% of what you find
in large scale scanning.

This update adds most of the common GCC warnings with their CWE mapping.
With this addition, this CSV file covers more than 95% of what you find
in large scale wscanning.
Copy link
Copy Markdown
Member

@kdudka kdudka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. A few minor suggestions inline...

Comment thread cwe-map.csv
"COMPILER_WARNING","warning[-Wreorder]","CWE-665"
"COMPILER_WARNING","warning[-Wrestrict]","CWE-9001"
"COMPILER_WARNING","warning[-Wreturn-local-addr]","CWE-562"
"COMPILER_WARNING","warning[-Wreturn-type]","CWE-393"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CWE-393 seems accurate. Should we use it also for the MISSING_RETURN checker of Coverity, which overlaps with this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that both are correct and related. 393->684->710. If you want to, we can use 393 for Coverity since it's more specific.

Comment thread cwe-map.csv Outdated
Comment thread cwe-map.csv Outdated
Comment thread cwe-map.csv Outdated
Comment thread cwe-map.csv Outdated
Comment thread cwe-map.csv
@stevegrubb
Copy link
Copy Markdown
Contributor Author

A new commit was added to this pull request. It updates a couple values based on the feedback.

@stevegrubb
Copy link
Copy Markdown
Contributor Author

OK, the merge request was updated to map Wignored-qualifiers to 1164.

@kdudka
Copy link
Copy Markdown
Member

kdudka commented Jun 9, 2022

Thanks for the update! Merging now, will deploy it next week hopefully.

@kdudka kdudka closed this in cdd94d1 Jun 9, 2022
kdudka pushed a commit that referenced this pull request Jun 9, 2022
kdudka pushed a commit that referenced this pull request Jun 9, 2022
kdudka added a commit that referenced this pull request Jun 9, 2022
... which is more specific than CWE-710

Closes: #67
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