Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve endpoint detection #29

Open
SimonAdrian opened this issue Oct 20, 2024 · 3 comments
Open

Improve endpoint detection #29

SimonAdrian opened this issue Oct 20, 2024 · 3 comments

Comments

@SimonAdrian
Copy link
Collaborator

Function extract_endpoint_part() in rst_entry.py only gets as input the single line in which keyword @RequestMapping was found. Specification of endpoint can span over multiple lines, see https://github.com/geonetwork/geonetwork-microservices/blob/main/modules/services/searching/src/main/java/org/fao/geonet/searching/controller/MainSearchController.java

@bakhtos
Copy link
Contributor

bakhtos commented Oct 21, 2024

Chiichen/springcloud-lab crashes due to this:

Traceback (most recent call last):
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/code2DFD.py", line 115, in <module>
    cli_invocation()
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/code2DFD.py", line 111, in cli_invocation
    perform_analysis()
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/core/dfd_extraction.py", line 74, in perform_analysis
    codeable_models, traceability_content = DFD_extraction()
                                            ^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/core/dfd_extraction.py", line 111, in DFD_extraction
    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 22, in set_information_flows
    incoming_endpoints = get_incoming_endpoints(dfd)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/technology_specific_extractors/resttemplate/rst_entry.py", line 72, in get_incoming_endpoints
    endpoint_part = extract_endpoint_part(line)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/abakhtin22/Documents/TempNet/code2DFD/technology_specific_extractors/resttemplate/rst_entry.py", line 105, in extract_endpoint_part
    endpoint_part = line.split('\"')[1]
                    ~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

@bakhtos
Copy link
Contributor

bakhtos commented Oct 21, 2024

Same error for Microservice-API-Patterns/LakesideMutual

@bakhtos
Copy link
Contributor

bakhtos commented Oct 21, 2024

Same error SasanLabs/VulnerableApp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants