benoit@0: {# benoit@0: # Description: benoit@0: # Web Template used in Farol Design benoit@0: # benoit@0: # Authors: benoit@0: # BenoƮt Allard benoit@0: # benoit@0: # Copyright: benoit@0: # Copyright (C) 2014 Greenbone Networks GmbH benoit@0: # benoit@0: # This program is free software; you can redistribute it and/or benoit@0: # modify it under the terms of the GNU General Public License benoit@0: # as published by the Free Software Foundation; either version 2 benoit@0: # of the License, or (at your option) any later version. benoit@0: # benoit@0: # This program is distributed in the hope that it will be useful, benoit@0: # but WITHOUT ANY WARRANTY; without even the implied warranty of benoit@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the benoit@0: # GNU General Public License for more details. benoit@0: # benoit@0: # You should have received a copy of the GNU General Public License benoit@0: # along with this program; if not, write to the Free Software benoit@0: # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. benoit@0: -#} benoit@0: benoit@0: {% extends "base.j2" %} benoit@105: {% from "macros.j2" import panel, modal, add_button, edit_button, delete_button %} benoit@45: {% block title %}Product Tree{% endblock %} benoit@0: benoit@45: {% set active = 'product' %} benoit@7: benoit@0: {% block content %} benoit@45: benoit@45: {% call modal('prodtree_modal', "Product Tree") %} benoit@45:

The Product Tree container contains all the fully qualified product names that can be referenced elsewhere in the document (specifically when describing the products that are affected by a vulnerability using the Product Statuses, Threats, CVSS Score Sets, and Remediation containers). The Product Tree can have as many branches as needed, but each endpoint of the tree must be terminated with a Full Product Name element, which represents a product that can be referenced elsewhere.

benoit@45:

The Product Tree can be kept simple (flat) or made more detailed (branched out). It also supports concatenating products to describe relationships, such as components contained in a product or products installed on other products.

benoit@45:
benoit@45:
Flat:
benoit@45:

In the simplest case, a flat Product TreeM would contain one or more Full Product Name elements at the root level, one for each product that needs to be described.

benoit@45:
Branched:
benoit@45:

In a more detailed Product Tree, the root element would contain one or more Branch elements at the root level, one for each class/type/category of product, each of which again contains one or more Branch elements until all desired categories and subcategories are described to the satisfaction of the document issuer. Then each open Branch element is terminated with the actual product item in the form of a Full Product Name element.

benoit@45:
Concatenated:
benoit@45:

No matter whether a flat or branched structure is chosen, you may need to be able to describe the combination of two Full Product Name elements, such as when a product is only vulnerable when installed together with another, or to describe operating system components. To do that, a Relationship element is inserted at the root of the Product Tree, with attributes establishing a link between two existing Full Product Name elements, allowing the document producer to define a combination of two products that form a new Full Product Name entry.

benoit@45:
Grouped:
benoit@45:

Once Full Product Name elements are defined, they may be freely added to logical groups, which may then be used to refer to a group of products. Given that it is possible for a product to be a member of more than one logical group, some areas of the CVRF document may not allow references to product groups to avoid ambiguity.

benoit@45:
benoit@0: {% endcall %} benoit@45: {% call panel(heading="Branches", badge=producttree._branches | length, title=4, extended=True) %} benoit@45: {% for branch in producttree._branches recursive %} benoit@45: {% call panel() %} benoit@105:
benoit@105: {{ branch._type}}: {{ branch._name }} benoit@105: {{ edit_button(url_for('.edit_branch', path=branch.getPath() | join('/'))) }} benoit@105: {% if branch.isOrphaned() %} benoit@105: {{ delete_button(url_for('.del_branch', path=branch.getPath() | join('/'))) }} benoit@105: {% endif %} benoit@105:
benoit@45: {% if branch._product %} benoit@76:

{{ branch._product._name }}

benoit@0: {% else %} benoit@45: {{ loop(branch._childs) }} benoit@45: {% endif %} benoit@45: {% if branch.isOrphaned() %} benoit@76:

This branch is orphaned. A product or a new branch should be created as child of this one.

benoit@0: {% endif %} benoit@0: {% endcall %} benoit@45: {% endfor %} benoit@105:
{{ add_button(url_for('.add_branch')) }}
benoit@45: {% endcall %} benoit@45: {% call panel(heading="Products", badge=producttree.nbProducts(), title=4) %} benoit@45: {% for product in producttree._products if product._parent is sameas producttree %} benoit@76:

{{ product._name }}

benoit@45: {% endfor %} benoit@105:
{{ add_button(url_for('.add_product')) }}
benoit@45: {% endcall %} benoit@45: {% call panel(heading="Relationships", badge=producttree._relationships | length, title=4) %} benoit@45: {% for relationship in producttree._relationships %} benoit@45: {% call panel() %} benoit@105:
benoit@105: {{ cvrf.getProductForID(relationship._productreference)._name }} as {{ relationship._relationtype | lower }} {{ cvrf.getProductForID(relationship._relatestoproductreference)._name }} benoit@105: {{ edit_button(url_for('.edit_relationship', index=loop.index0)) }} benoit@105: {% if relationship.isOrphaned() %} benoit@105: {{ delete_button(url_for('.del_relationship', index=loop.index0)) }} benoit@105: {% endif %} benoit@105:
benoit@105: {% if relationship._product %} benoit@105:

{{ relationship._product._name }}

benoit@105: {% endif %} benoit@45: {% if relationship.isOrphaned() %} benoit@76:

This relationship is orphaned. A product should be created as child of this one.

benoit@45: {% endif %} benoit@0: {% endcall %} benoit@45: {% endfor %} benoit@105:
{{ add_button(url_for('.add_relationship')) }}
benoit@45: {% endcall %} benoit@45: {% call panel(heading="Groups", badge=producttree._groups | length, title=4) %} benoit@45: {% for group in producttree._groups %} benoit@45: {% call panel() %} benoit@88:
benoit@105: {{ edit_button(url_for('.edit_group', groupid=group._groupid)) }} benoit@112: {%if cvrf.isGroupOrphan(group._groupid) %} benoit@112: {{ delete_button(url_for('.del_group', groupid=group._groupid)) }} benoit@112: {% endif %} benoit@88:
benoit@112: {% if group._description %}

{{ group._description }}

{% endif %} benoit@45: benoit@45: {% endcall %} benoit@45: {% endfor %} benoit@105:
{{ add_button(url_for('.add_group')) }}
benoit@45: {% endcall %} benoit@110:
benoit@110: {% if cvrf.isProductTreeOrphan() %} benoit@110: {{ delete_button(url_for('.delete'), text="delete whole Product Tree") }} benoit@110: {% else %} benoit@138:

The Product Tree cannot be deleted as some of its elements are referenced in the Document

benoit@110: {% endif %} benoit@110:
benoit@0: {% endblock %}