The following example will only print unique steps to reproduce / proof of concept (PoC) for every affected asset on a vulnerability:
{#vulnerabilities}
{$declare[PrintedPOCs][[]]}
Vulnerability: {title}
{#affected_assets | sort:[“proof_of_concept:asc”]}
Affected Asset: {asset}
{#$includes[PrintedPOCs][“%(proof_of_concept_raw)”]}
Steps to Reproduce / Proof of Concept same as above.
{/}
{^$includes[PrintedPOCs][“%(proof_of_concept_raw)”]}
Steps to Reproduce / Proof of Concept:
{@proof_of_concept_styled}
{$push[PrintedPOCs][“%(proof_of_concept_raw)”]}
{/}
{/}{/}
The logic works as follows:
{#vulnerabilities} - for every vulnerability
{$declare[PrintedPOCs][[]]} - declare a new variable to hold the already used/displayed POCs
Vulnerability: {title} - print title of vulnerability
{#affected_assets | sort:[“proof_of_concept:asc”]} - sort every affected asset by the POC
Affected Asset: {asset} - print the asset name
{#$includes[PrintedPOCs][“%(proof_of_concept_raw)”]} - check if POC has already been shown, and if so, show message
Steps to Reproduce / Proof of Concept same as above.
{/}
{^$includes[PrintedPOCs][“%(proof_of_concept_raw)”]} - check if POC has already been shown, and if not, show POC
Steps to Reproduce / Proof of Concept:
{@proof_of_concept_styled}
{$push[PrintedPOCs][“%(proof_of_concept_raw)”]} - push the POC into the variable so it can be detected on the next loop of the affected assets
{/}
{/}{/}
The following example will only print unique steps to reproduce / proof of concept (PoC) for every affected asset on a vulnerability:
The logic works as follows: