Fixes #8
Fixes #23
Following changes are implemented:
Both services and external components now store a field name, instead of services having servicename, which simplifies parsing of the output/allows to reuse code for service on external components and vice versa
Merging functions now accept one collection at a time and are called several times in perform_analysis() to reduce code duplication (e.g. merge_service was called with both services and external components at the same time, but the processing code for each was almost identical and could be reused)
Merging functions are simplified, using itertools to create all possible pairs for comparison
Issue #23 : name, sender and receiver fields now have str.casefold() applied to them in the merging functions, which removes duplicate services as described in the issue
clean_database_connections() is now applied after merging, since it compares receiver to name
As issue #24 shows, there is a chance that a port is something like 3306/tcp, this is taken into account when merging annotations
Fixes #8 Fixes #23 Following changes are implemented:
name
, instead of services havingservicename
, which simplifies parsing of the output/allows to reuse code for service on external components and vice versaperform_analysis()
to reduce code duplication (e.g.merge_service
was called with both services and external components at the same time, but the processing code for each was almost identical and could be reused)external_component
was duplicated was because this block was concatenating thetype
property; now it skips it https://github.com/tuhh-softsec/code2DFD/blob/f0959c61a649cc3b2de0b6614b0cf8ff88bdeb13/core/dfd_extraction.py#L474-L478itertools
to create all possible pairs for comparisonname
,sender
andreceiver
fields now havestr.casefold()
applied to them in the merging functions, which removes duplicate services as described in the issueclean_database_connections()
is now applied after merging, since it comparesreceiver
toname
3306/tcp
, this is taken into account when merging annotations