maltek
maltek
@DavidBakerEffendi sorry, fixed the linked line now. (`cpg.call.name(Operators.alloc).codeExact("params[:type].constantize.new(path)").receiver.l` gives an identifier for the expression `params[:type].constantize`)
@AndreiDreyer I've observed it with the `Foo::Bar` syntax. I haven't verified that the other case is fine, though.
@AndreiDreyer sorry, it seems that was on an outdated branch or something. I can't reproduce the missing AST edges anymore. There's still something wrong with https://github.com/OWASP/railsgoat/blob/c1e8ff1e3b24a1c48fcfc9fbee0f65dc296b49d9/app/controllers/api/v1/mobile_controller.rb though: `cpg.namespaceBlock.fullNameExact("Api.V1").typeDecl` returns typedecls...
> @maltek could you re-test the classes defined within namespace are not linked to their methods? It might have been fixed when I fixed the namespace inconsistencies. @AndreiDreyer that point...
I'm still missing a lot of .erb files. E.g. for https://github.com/chatwoot/chatwoot: ``` ocular> cpg.file.name(".*.html.erb").size val res18: Int = 40 ocular> cpg.configFile.name(".*.html.erb").size val res19: Int = 88 ``` The frontend spits...
all the ruby code in https://github.com/forem/forem/blob/0772f2d49b18d94f3b982b39420ea31235c1c8aa/app/views/layouts/application.html.erb#L88-L92 exists in the CPG only as `Literal` nodes, instead of the actual calls and control structures. Also the lines are off-by-one (code from line...
for the `raw` call here I'm getting the wrong line number (8 instead of 12): https://github.com/OWASP/railsgoat/blob/c1e8ff1e3b24a1c48fcfc9fbee0f65dc296b49d9/app/views/layouts/application.html.erb#L12 and the `render` call here has line 35 instead of 56: https://github.com/forem/forem/blob/0772f2d49b18d94f3b982b39420ea31235c1c8aa/app/views/admin/badge_achievements/index.html.erb#L56
the `rails_lambda_0` calls are also problematic: - ~~the `joern__inner_buffer` variable is missing a closure capture binding from the outer scope~~ I missed that the lambda call is inside of a...
current problem: ```ruby class UsersController < ActionController::Base def show respond_to do |format| format.json { render partial: "foo" } end end end ``` some `self` identifiers refer to multiple locals: ```scala...
@TNSelahle the problem with the `self` variable is fixed with your last change. But there is still a related problem: the `format` identifiers are not referencing the `format` `MethodParameterIn` node.