-
-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Rule G401 split into two different rules #1159
Conversation
The corresponding CWE from G401 rule was changed from CWE-326 -> CWE-328. In my opinion, this CWE suits better the rule.
Now the G401 rule is split into hashing and encryption algorithms. G401 is responsible for checking the usage of MD5 and SHA1, with corresponding CWE of 328. And G405(New rule) is responsible for checking the usege of DES and RC4, with corresponding CWE of 327.
* Renamed the file responsible for rule G401 * Removed copyright of HP from the new rule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for splitting this up.
@expp121 There seems to be some lint warnings, please could you fix them. I think the test file needs to be formatted. Thanks |
The CI workflow wasn't able to complete succesfully. * Formatted the call_list_test.go file
Thank you for the advice @ccojocar! I hope I've fixed (quite new to github actions) the issue with the most recent commit. I would also like to ask whether the analyzer_test.go file, should contain a license of some sort? |
* Renamed file(removed space) * Changed the expected issues ( 1 -> 2)
@expp121 Yeah, it should have the same Apache license header file like the other files with an updated year. Please could you add it? Thanks a lot |
@expp121 I'll merge this. You can add the license header in a separate PR. Thanks |
Currently, rule G401 is used both for encryption and hashing algorithms, this might result in wrong categorization of a weakness.
This pull request aims to solve that problem, by splitting the rule into two separate ones(G401, G405).
Rule G401 is now responsible for only checking hashing algorithms such as MD5 and SHA1. Code containing those algorithms is flagged with CWE-328.
And the new rule G405 is responsible for checking encryption algorithms such as DES and RC4. And it flags code containing them with CWE-327.
closes #1158