Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Verinice ISM report format and update version (9.0) #962

Merged
merged 2 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix get_system_reports for GMP scanners [#949](https://github.com/greenbone/gvmd/pull/949)
- Use stop_osp_task for SCANNER_TYPE_OSP_SENSOR [#955](https://github.com/greenbone/gvmd/pull/955)
- Setup target's reverse_lookup_* settings to launch an osp openvas task (9.0) [#958](https://github.com/greenbone/gvmd/pull/958)
- Fix Verinice ISM report format and update version [#962](https://github.com/greenbone/gvmd/pull/962)

### Removed
- Remove 1.3.6.1.4.1.25623.1.0.90011 from Discovery config (9.0) [#847](https://github.com/greenbone/gvmd/pull/847)
Expand Down
22 changes: 12 additions & 10 deletions src/report_formats/Verinice_ISM/Verinice_ISM.xsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2011-2019 Greenbone Networks GmbH
Copyright (C) 2011-2020 Greenbone Networks GmbH

SPDX-License-Identifier: GPL-2.0-or-later

Expand Down Expand Up @@ -93,8 +93,8 @@ Parameters:
<xsl:value-of select="@id"/>
</xsl:template>

<xsl:key name="scenarios" match="/report/results/result/nvt/@oid" use="." />
<xsl:key name="vulnerabilities" match="/report/results/result/nvt/@oid" use="." />
<xsl:key name="scenarios" match="/report/results/result[count(notes/note) &gt; 0 and threat != 'False Positive']/nvt/@oid" use="." />
<xsl:key name="vulnerabilities" match="/report/results/result[count(notes/note) &gt; 0 and threat != 'False Positive']/nvt/@oid" use="." />
<xsl:key name="controls" match="/report/results/result/notes/note/@id" use="." />

<xsl:template name="extract_organization">
Expand Down Expand Up @@ -469,7 +469,7 @@ CIS</value>
<xsl:template match="report/host">
<xsl:param name="task_id"/>
<xsl:variable name="addr">
<xsl:value-of select="host"/>
<xsl:value-of select="ip"/>
</xsl:variable>
<xsl:variable name="extid">
<xsl:choose>
Expand Down Expand Up @@ -839,15 +839,17 @@ CIS</value>
</xsl:call-template>

<xsl:for-each select="/report/results/result[nvt/@oid = $cur_oid]">
<syncLink>
<dependant><xsl:value-of select="$task_id"/>-<xsl:value-of select="$cur_oid"/>-scenario</dependant>
<dependency><xsl:value-of select="$task_id"/>-<xsl:value-of select="$cur_oid"/>-vulnerability</dependency>
<relationId>rel_incscen_vulnerability</relationId>
</syncLink>
<xsl:if test="generate-id(nvt/@oid) = generate-id(key('vulnerabilities', nvt/@oid)[1])">
<syncLink>
<dependant><xsl:value-of select="$task_id"/>-<xsl:value-of select="$cur_oid"/>-scenario</dependant>
<dependency><xsl:value-of select="$task_id"/>-<xsl:value-of select="$cur_oid"/>-vulnerability</dependency>
<relationId>rel_incscen_vulnerability</relationId>
</syncLink>
</xsl:if>
<syncLink>
<dependant><xsl:value-of select="$task_id"/>-<xsl:value-of select="$cur_oid"/>-scenario</dependant>
<xsl:variable name="addr">
<xsl:value-of select="host"/>
<xsl:value-of select="host/text()"/>
</xsl:variable>
<xsl:variable name="extid">
<xsl:choose>
Expand Down
4 changes: 2 additions & 2 deletions src/report_formats/Verinice_ISM/report_format.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<report_format id="c15ad349-bd8d-457a-880a-c7056532ee15">
<name>Verinice ISM</name>
<summary>Greenbone Verinice ISM Report, v3.0.0.</summary>
<summary>Greenbone Verinice ISM Report, v3.2.0.</summary>
<description>
Information Security Management Report for Verinice import, version 3.0.0.
Information Security Management Report for Verinice import, version 3.2.0.
</description>
<extension>vna</extension>
<content_type>application/zip</content_type>
Expand Down