OrenGitHub / dhscanner

free as in speech container scanner
https://orengithub.github.io/
1 stars 0 forks source link

Missing call in CVE dataflow path #45

Closed OrenGitHub closed 1 month ago

OrenGitHub commented 1 month ago

missing:

@tool ||= Tool.join_tool_slot_and_find_by_id(params[:id])

see:

grep -rn "kb_call( startloc_36" kb.pl | wc -l
0 # <--- should at least contain the relevant call
OrenGitHub commented 1 month ago

For some reason the body is missing from the method in the AST:

236                             {
237                                 "decMethodBody": [], # <--- this should NOT be empty ...
238                                 "decMethodLocation": {
239                                     "colEnd": 708,
240                                     "colStart": 623,
241                                     "filename": "workdir/ff02e93b830fa88e2161cd152eb22fc316e2baea969bc0c4803ba477e120b531/farmbot/app/controllers/api/tools_controller.rb",
242                                     "lineEnd": 37,
243                                     "lineStart": 35
244                                 },
245                                 "decMethodName": {
246                                     "content": "tool",
247                                     "location": {
248                                         "colEnd": 631,
249                                         "colStart": 627,
250                                         "filename": "workdir/ff02e93b830fa88e2161cd152eb22fc316e2baea969bc0c4803ba477e120b531/farmbot/app/controllers/api/tools_controller.rb",
251                                         "lineEnd": 35,
252                                         "lineStart": 35
253                                     }
254                                 },
OrenGitHub commented 1 month ago

FIXED !

$ grep -rn "kb_call( startloc_36" kb.pl
114:kb_call( startloc_36_648_endloc_36_700 ).