Skip to content

Print only unique steps to reproduce / proof of concept (PoC) #9

@attackforge-support

Description

@attackforge-support

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
{/}
{/}{/}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions