Ruby: Only generate models for public methods

This commit is contained in:
Koen Vlaswinkel
2024-01-30 16:07:34 +01:00
parent c265c15f3f
commit 0442631c68

View File

@@ -43,6 +43,7 @@ string getArgumentPath(DataFlow::ParameterNode paramNode) {
*/
predicate pathToMethod(DataFlow::MethodNode method, string type, string path) {
method.getLocation().getFile() instanceof RelevantFile and
method.isPublic() and // only public methods are modeled
exists(DataFlow::ModuleNode mod, string methodName |
method = mod.getOwnInstanceMethod(methodName) and
if methodName = "initialize"