Skip to content
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

C#: update cs/assembly-path-injection cs/hardcoded-key to path-problems #11203

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erik-krogh
Copy link
Contributor

@erik-krogh erik-krogh commented Nov 10, 2022

Something I randomly stumbled upon a while ago.

The two queries look very much like @kind path-problems queries, and can easily be converted to that format, but they were @kind problem queries for some reason?

This blackbird search helped me find them.

from
SymmetricKeyTaintTrackingConfiguration keyFlow, DataFlow::PathNode source,
DataFlow::PathNode sink, KeySource srcNode, SymmetricEncryptionKeySink sinkNode
where
keyFlow.hasFlowPath(source, sink) and
source.getNode() = srcNode and
sink.getNode() = sinkNode
select sink.getNode(), source, sink, "This hard-coded $@ is used in symmetric algorithm in " + sinkNode.getDescription(),
srcNode, "symmetric key"

Check warning

Code scanning / CodeQL

Consistent alert message Warning

The cs/hardcoded-key query does not have the same alert message as swift.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant