Skip to content

Commit

Permalink
Fix: severity values of '0' have not been passed to gvmd
Browse files Browse the repository at this point in the history
  • Loading branch information
y0urself committed Jun 16, 2022
1 parent 1245a30 commit cd4e0b4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions gvm/protocols/gmpv208/entities/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def create_note(
if result_id:
cmd.add_element("result", attrs={"id": result_id})

if severity:
if severity is not None:
cmd.add_element("severity", str(severity))

if task_id:
Expand Down Expand Up @@ -259,7 +259,7 @@ def modify_note(
if result_id:
cmd.add_element("result", attrs={"id": result_id})

if severity:
if severity is not None:
cmd.add_element("severity", str(severity))

if task_id:
Expand Down
8 changes: 4 additions & 4 deletions gvm/protocols/gmpv208/entities/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ def create_override(
if result_id:
cmd.add_element("result", attrs={"id": result_id})

if severity:
if severity is not None:
cmd.add_element("severity", str(severity))

if new_severity:
if new_severity is not None:
cmd.add_element("new_severity", str(new_severity))

if task_id:
Expand Down Expand Up @@ -281,10 +281,10 @@ def modify_override(
if result_id:
cmd.add_element("result", attrs={"id": result_id})

if severity:
if severity is not None:
cmd.add_element("severity", str(severity))

if new_severity:
if new_severity is not None:
cmd.add_element("new_severity", str(new_severity))

if task_id:
Expand Down
4 changes: 2 additions & 2 deletions gvm/protocols/gmpv214/entities/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def create_note(
if result_id:
cmd.add_element("result", attrs={"id": result_id})

if severity:
if severity is not None:
cmd.add_element("severity", str(severity))

if task_id:
Expand Down Expand Up @@ -165,7 +165,7 @@ def modify_note(
if result_id:
cmd.add_element("result", attrs={"id": result_id})

if severity:
if severity is not None:
cmd.add_element("severity", str(severity))

if task_id:
Expand Down
8 changes: 4 additions & 4 deletions gvm/protocols/gmpv214/entities/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ def create_override(
if result_id:
cmd.add_element("result", attrs={"id": result_id})

if severity:
if severity is not None:
cmd.add_element("severity", str(severity))

if new_severity:
if new_severity is not None:
cmd.add_element("new_severity", str(new_severity))

if task_id:
Expand Down Expand Up @@ -184,10 +184,10 @@ def modify_override(
if result_id:
cmd.add_element("result", attrs={"id": result_id})

if severity:
if severity is not None:
cmd.add_element("severity", str(severity))

if new_severity:
if new_severity is not None:
cmd.add_element("new_severity", str(new_severity))

if task_id:
Expand Down

0 comments on commit cd4e0b4

Please sign in to comment.