I'm using the ISO21434 Best Practice template and I want to report details of all security:Attack nodes, but only those that are actually used in an attack tree which traces up to a threat scenario. I want to be able to do so even if the attack is referenced in an attack tree which traces to a threat scenario via a transfer node. For example:
Threat Scenario Node --child--> transfer node --child--> transfer node --child--> attack node
I can get a collection of all attack trees which have a threat scenario as the root node. From that I can get a list of attacks referenced _directly_ in that tree's diagram. I can also get a collection of transfer nodes in the diagram. However, I don't see how I could iterate down all transfer nodes to find other attacks.
I don't want to use a for loop as at the end I want a single collection of the attacks that I can sort on the attack ID before printing.
Is there a way to do this?
Thank you.