tuhh-softsec / code2DFD

Tool for the automatic extraction of dataflow diagrams from source code of microservices
Other
4 stars 4 forks source link

Crashes when analyzing `FudanSELab/train-ticket` #16

Open bakhtos opened 1 week ago

bakhtos commented 1 week ago

        Start extraction of DFD for FudanSELab/train-ticket at 14:21:32
Extracted services from build- and IaC-files
Traceback (most recent call last):
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/code2DFD.py", line 107, in <module>
    main()
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/code2DFD.py", line 97, in main
    dfd_extraction.perform_analysis()
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/core/dfd_extraction.py", line 84, in perform_analysis
    new_information_flows = tech_sw.get_information_flows(dfd)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/core/technology_switch.py", line 43, in get_information_flows
    eval(com_tech[1]).set_information_flows(dfd)
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/technology_specific_extractors/resttemplate/rst_entry.py", line 24, in set_information_flows
    outgoing_endpoints, information_flows = get_outgoing_endpoints(information_flows, dfd)
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/technology_specific_extractors/resttemplate/rst_entry.py", line 177, in get_outgoing_endpoints
    new_outgoing_endpoint, information_flows = find_rst_variable(new_outgoing_endpoint, f, line_nr, information_flows, microservice, dfd)
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/technology_specific_extractors/resttemplate/rst_entry.py", line 260, in find_rst_variable
    parameters[p], x = find_rst_variable(parameters[p], file, line)      # recursive step
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: find_rst_variable() missing 3 required positional arguments: 'information_flows', 'microservice', and 'dfd'
bakhtos commented 1 week ago

Ateempting to fix the recursive calls to find_rst_variable by adding the missing parameters:

parameters[p], x = find_rst_variable(parameters[p], fc, linec, information_flows, microservice, dfd)     # recursive step

On lines 246 and 260 results in RecursionError: maximum recursion depth exceeded