Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

else statements/ complex if #246

Closed
Dionka opened this issue Jan 10, 2017 · 4 comments
Closed

else statements/ complex if #246

Dionka opened this issue Jan 10, 2017 · 4 comments

Comments

@Dionka
Copy link

Dionka commented Jan 10, 2017

Please fill out the Bug Form or Feature Request Below

Feature Request

Describe the feature and give an example use case

How do i create complex if like below:
† cvss_exploitability > 3 AND cvss_exploitability <6 †
do something
¥

or

† cvss_exploitability > 3 AND cvss_impact <6 †
do something
ELSE
do something else
¥

Additionally how I write IF in a row?
this doesn't seems to work in a row...

For every finding in a table I want to print the cvss impact and exploitation but not the values. The description.
For example if the cvss impact is >0 and <4 --> low e.t.c This is filled in a row.

Thank you very much!

@Petessss
Copy link
Collaborator

Petessss commented Jan 10, 2017

Did you look at the findings section of the default template? (Page5) It shows how to create a table based on conditional statements. Just swap out the DREAD Score and Remediation effort with cvss impact and exploitation.

Also take a look at the Meta Language wiki: https://github.com/SerpicoProject/Serpico/wiki/Serpico-Meta-Language-In-Depth

@Dionka
Copy link
Author

Dionka commented Jan 11, 2017

@hi,

Thank you very much for the answer but this is not what I meant.

I have a loop like this:
"For every finding create a table with the details for this finding"

¬report/findings_list/findings:::CVSS_TOTAL>-1¬

IMPACT:IF cvss_impact is >0 and <4 then write Low else if cvvss_impact is >4 and <7 then write medium else write high enf_if

Additionally, regarding the counting, I can't find any part in default reports template, that actually counts and displays the number of findings.

Thank you very much again for your response.

@Petessss
Copy link
Collaborator

@Dionka,
Thank you for the additional detail. Ya, the current markup language does not support control structures like your describing.

@Dionka
Copy link
Author

Dionka commented Jan 13, 2017

I was able to do the following work around:

† cvss_impact > -1 †
† cvss_impact < 4 †
† cvss_exploitability > -1 †
† cvss_exploitability < 4 †

Technical ImpactExploitability LowLow
¥ ¥ ¥ ¥

For all nine possible combinations (Low-Low, Low-Medium, Low-High, etc...)

The table created is split, and at the end several empty lines created must be deleted in order to merge the table.
But that's for sure acceptable!
Thank you very much for your time and support on this one. Great work!

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

No branches or pull requests

2 participants