-
Notifications
You must be signed in to change notification settings - Fork 3
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
New CodeQL queries for ML libraries #2
base: main
Are you sure you want to change the base?
Conversation
This analysis is used to detect false positives in the `LocalMemoryLeak.ql` query.
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.
The queries look to be generic, not ML-focused? So what if we move them from src/ml
to src/security
?
Then we can keep the queries in the generic security
and has ML specific libraries, and in the future can add more libraries (not necessarily ML) for the queries
where | ||
leak.reaches(source, var, sink) | ||
select | ||
source.getLocation(), toMessage(source, sink, var) |
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.
I suggest making selects like this:
select
source, "The variable `" + var + "` is allocated on line $@ and may leak on line $@",
source, toLine(source), sink, toLine(sink)
first arg doesn't need getLocation
(or does it?).
Using $@
makes the line clickable (easier to triage results)
This PR adds a number of CodeQL queries for the GGML library used by e.g. llama.cpp and whisper.cpp.