-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CPP: Add query for CWE-783 Operator Precedence Logic Error When Use Bitwise Or Logical Operations #6083
Conversation
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.
Hi @ihsinme,
Thanks for another contribution! Sorry for not getting back to you with a review before now. Here is my first round of comments.
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Outdated
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Outdated
Show resolved
Hide resolved
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-783/semmle/tests/test.cpp
Outdated
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Outdated
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Outdated
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Outdated
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Show resolved
Hide resolved
...mental/Security/CWE/CWE-783/OperatorPrecedenceLogicErrorWhenUseBitwiseOrLogicalOperations.ql
Show resolved
Hide resolved
Co-authored-by: Mathias Vorreiter Pedersen <[email protected]>
I will definitely see how to strengthen the test file for all your suggestions. |
…eLogicErrorWhenUseBitwiseOrLogicalOperations.ql Co-authored-by: Mathias Vorreiter Pedersen <[email protected]>
Good afternoon @MathiasVP. |
Everything looks good! The only change needed now is to autoformat the QL file to make our CI check happy. |
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.
LGTM!
Good day.
in this request I am looking for possible priority errors when using logical and bit operations.
I would like to draw your attention to the
isRealRange
predicate, unfortunately, the restriction onint
did not allow usingbitShiftRight
and make it more elegant.search results in real software.
Andarix/simutrans#2
rui314/chibicc#54