OrenGitHub / dhscanner

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

Incorrect ( dummy ) fqns for method calls #44

Closed OrenGitHub closed 1 month ago

OrenGitHub commented 1 month ago
 kb_has_fqn( startloc_26_992_endloc_26_1033, 'P55').
 kb_has_fqn( startloc_32_1216_endloc_32_1249, 'P55').
 kb_has_fqn( startloc_32_1259_endloc_32_1272, 'P55').
OrenGitHub commented 1 month ago

Some improvement:

kb_has_fqn( startloc_26_992_endloc_26_1033, 'int.find_by_sql'). % should be: Tool.find_by_sql
kb_has_fqn( startloc_32_1216_endloc_32_1249, 'int.find_by_sql'). % should be: Tool.find_by_sql
OrenGitHub commented 1 month ago
kb_has_fqn( startloc_26_992_endloc_26_1033, 'Tool.find_by_sql'). % <--- good !
kb_has_fqn( startloc_32_1216_endloc_32_1249, 'Tool.find_by_sql'). % <--- good !
OrenGitHub commented 1 month ago

missing param callable relation:

$ grep -rn "kb_callable_has_param( " kb.pl
61:kb_callable_has_param( startloc_25_959_endloc_25_976, startloc_25_977_endloc_25_986 ).
62:kb_callable_has_param( startloc_29_1052_endloc_29_1081, startloc_29_1082_endloc_29_1084 ).
63:kb_callable_has_param( startloc_70_1672_endloc_70_1689, startloc_70_1690_endloc_70_1695 ).
64:kb_callable_has_param( startloc_8_222_endloc_8_230, startloc_8_231_endloc_8_234 ).
# missing: startloc_29_1043_endloc_33_1278
OrenGitHub commented 1 month ago
$ grep -rn "kb_callable_has_param( " kb.pl
61:kb_callable_has_param( startloc_25_950_endloc_27_1039, startloc_25_977_endloc_25_986 ).
62:kb_callable_has_param( startloc_29_1043_endloc_33_1278, startloc_29_1082_endloc_29_1084 ).
63:kb_callable_has_param( startloc_70_1668_endloc_72_1761, startloc_70_1690_endloc_70_1695 ).
64:kb_callable_has_param( startloc_8_218_endloc_10_275, startloc_8_231_endloc_8_234 ).
OrenGitHub commented 1 month ago
$ grep -rn "startloc_32_1233_endloc_32_1248" kb.pl
5:kb_arg_for_call( startloc_32_1233_endloc_32_1248, startloc_32_1216_endloc_32_1249 ).
94:kb_dataflow_edge( startloc_32_1233_endloc_32_1248, startloc_32_1216_endloc_32_1249 ).
# there should also be an incoming dataflow edge ( from the input parameter 'id')
OrenGitHub commented 1 month ago

fixed !

$ grep -rn "startloc_32_1233_endloc_32_1248" kb.pl
5:kb_arg_for_call( startloc_32_1233_endloc_32_1248, startloc_32_1216_endloc_32_1249 ).
94:kb_dataflow_edge( startloc_29_1082_endloc_29_1084, startloc_32_1233_endloc_32_1248 ). # yes !
100:kb_dataflow_edge( startloc_32_1233_endloc_32_1243, startloc_32_1233_endloc_32_1248 ).
101:kb_dataflow_edge( startloc_32_1233_endloc_32_1248, startloc_32_1216_endloc_32_1249 ).
OrenGitHub commented 1 month ago
$ grep -rn startloc_29_1043_endloc_33_1278 kb.pl
31:kb_callable( startloc_29_1043_endloc_33_1278 ).
62:kb_callable_has_param( startloc_29_1043_endloc_33_1278, startloc_29_1082_endloc_29_1084 ).
# the fqn of the callable is missing !
OrenGitHub commented 1 month ago
$ grep -rn startloc_29_1043_endloc_33_1278 kb.pl
31:kb_callable( startloc_29_1043_endloc_33_1278 ).
62:kb_callable_has_param( startloc_29_1043_endloc_33_1278, startloc_29_1082_endloc_29_1084 ).
182:kb_has_fqn( startloc_29_1043_endloc_33_1278, 'Tool.join_tool_slot_and_find_by_id' ).
OrenGitHub commented 1 month ago

The fqns seem fine - so this ticket is closed.

kb_has_fqn( startloc_35_623_endloc_37_708, 'ToolsController.tool' ).