Ejemplo n.º 1
0
 def __init__(self, id_=None, idref=None, title=None, description=None, short_description=None):
     super(Infrastructure, self).__init__()
     self.id_ = id_
     self.idref = idref
     self.title = title
     self.description = StructuredTextList(description)
     self.short_description = StructuredTextList(short_description)
Ejemplo n.º 2
0
    def __init__(self, package_intents=None, description=None, handling=None,
                 information_source=None, title=None, short_description=None):

        super(STIXHeader, self).__init__()

        self.package_intents = package_intents
        self.title = title
        self.description = StructuredTextList(description)
        self.short_description = StructuredTextList(short_description)
        self.handling = handling
        self.information_source = information_source
        self.profiles = None
Ejemplo n.º 3
0
    def add_description(self, description):
        """Adds a description to the ``descriptions`` collection.

        This is the same as calling "foo.descriptions.add(bar)".
        """
        if self.descriptions is None:
            self.descriptions = StructuredTextList()
        self.descriptions.add(description)
Ejemplo n.º 4
0
    def __init__(self,
                 id_=None,
                 idref=None,
                 timestamp=None,
                 title=None,
                 description=None,
                 short_description=None):
        from stix.common import StructuredTextList

        super(BaseCoreComponent, self).__init__()

        self.id_ = id_ or idgen.create_id(self._ID_PREFIX)
        self.idref = idref
        self.title = title
        self.descriptions = StructuredTextList(description)
        self.short_descriptions = StructuredTextList(short_description)

        if timestamp:
            self.timestamp = timestamp
        else:
            self.timestamp = utils.dates.now() if not idref else None
    def description(self):
        """A single description about the contents or purpose of this object.

        Default Value: ``None``

        Note:
            If this object has more than one description set, this will return
            the description with the lowest ordinality value.

        Returns:
            An instance of :class:`.StructuredText`
        """
        if self.descriptions is None:
            self.descriptions = StructuredTextList()
        return next(iter(self.descriptions), None)
Ejemplo n.º 6
0
 def descriptions(self, value):
     self._description = StructuredTextList(value)
Ejemplo n.º 7
0
 def __init__(self, title=None, description=None, short_description=None):
     super(Vulnerability, self).__init__()
     self.title = title
     self.descriptions = StructuredTextList(description)
     self.short_descriptions = StructuredTextList(short_description)
Ejemplo n.º 8
0
    def __init__(self, description=None, short_description=None):
        super(Objective, self).__init__()

        self.description = StructuredTextList(description)
        self.short_description = StructuredTextList(short_description)
Ejemplo n.º 9
0
 def description(self, value):
     self.descriptions = StructuredTextList(value)
Ejemplo n.º 10
0
 def __init__(self, id_=None, idref=None):
     super(GenericTestMechanism, self).__init__(id_=id_, idref=idref)
     self.descriptions = StructuredTextList()
Ejemplo n.º 11
0
 def __init__(self, description=None, short_description=None, cce_id=None):
     super(Configuration, self).__init__()
     self.description = StructuredTextList(description)
     self.short_description = StructuredTextList(short_description)
     self.cce_id = cce_id
Ejemplo n.º 12
0
 def short_descriptions(self, value):
     deprecated(value)
     self._short_description = StructuredTextList(value)
Ejemplo n.º 13
0
 def short_descriptions(self, value):
     from stix.common import StructuredTextList
     self._short_description = StructuredTextList(value)
Ejemplo n.º 14
0
 def descriptions_of_effect(self, value):
     self._description_of_effect = StructuredTextList(value)
Ejemplo n.º 15
0
 def __init__(self):
     super(PropertyAffected, self).__init__()
     self.descriptions_of_effect = StructuredTextList()
Ejemplo n.º 16
0
 def __init__(self):
     super(AffectedAsset, self).__init__()
     self.description = StructuredTextList()
     self.business_function_or_role = StructuredTextList()
Ejemplo n.º 17
0
 def short_description(self, value):
     self.short_descriptions = StructuredTextList(value)
Ejemplo n.º 18
0
 def __init__(self, description=None, cwe_id=None):
     super(Weakness, self).__init__()
     self.description = StructuredTextList(description)
     self.cwe_id = cwe_id
Ejemplo n.º 19
0
 def business_functions_or_roles(self, value):
     self._business_function_or_role = StructuredTextList(value)