MCPcopy Create free account
hub / github.com/STIXProject/python-stix / Indicator

Class Indicator

stix/indicator/indicator.py:156–740  ·  view source on GitHub ↗

Implementation of the STIX Indicator. Args: id_ (optional): An identifier. If ``None``, a value will be generated via ``mixbox.idgen.create_id()``. If set, this will unset the ``idref`` property. idref (optional): An identifier reference. If set this will

Source from the content-addressed store, hash-verified

154
155
156class Indicator(stix.BaseCoreComponent):
157 """Implementation of the STIX Indicator.
158
159 Args:
160 id_ (optional): An identifier. If ``None``, a value will be generated
161 via ``mixbox.idgen.create_id()``. If set, this will unset the
162 ``idref`` property.
163 idref (optional): An identifier reference. If set this will unset the
164 ``id_`` property.
165 title (optional): A string title.
166 timestamp (optional): A timestamp value. Can be an instance of
167 ``datetime.datetime`` or ``str``.
168 description (optional): A string description.
169 short_description (optional): A string short description.
170
171 """
172 _binding = indicator_binding
173 _binding_class = indicator_binding.IndicatorType
174 _namespace = 'http://docs.oasis-open.org/cti/ns/stix/indicator-1'
175 _version = "2.2"
176 _ALL_VERSIONS = ("2.0", "2.0.1", "2.1", "2.1.1", "2.2")
177 _ALLOWED_COMPOSITION_OPERATORS = ('AND', 'OR')
178 _ID_PREFIX = "indicator"
179 _try_cast = False
180
181 producer = fields.TypedField("Producer", InformationSource)
182 observable = fields.TypedField("Observable", Observable)
183 indicator_types = VocabField("Type", IndicatorType, multiple=True, key_name="indicator_types")
184 confidence = fields.TypedField("Confidence", Confidence)
185 indicated_ttps = fields.TypedField("Indicated_TTP", RelatedTTP, multiple=True, key_name="indicated_ttps")
186 test_mechanisms = fields.TypedField("Test_Mechanisms", TestMechanisms)
187 alternative_id = fields.TypedField("Alternative_ID", multiple=True)
188 suggested_coas = fields.TypedField("Suggested_COAs", SuggestedCOAs)
189 sightings = fields.TypedField("Sightings", Sightings)
190 composite_indicator_expression = fields.TypedField("Composite_Indicator_Expression", "stix.indicator.CompositeIndicatorExpression")
191 kill_chain_phases = fields.TypedField("Kill_Chain_Phases", KillChainPhasesReference)
192 valid_time_positions = fields.TypedField("Valid_Time_Position", ValidTime, multiple=True, key_name="valid_time_positions")
193 related_indicators = fields.TypedField("Related_Indicators", RelatedIndicators)
194 related_campaigns = fields.TypedField("Related_Campaigns", type_="stix.indicator.RelatedCampaignRefs")
195 likely_impact = fields.TypedField("Likely_Impact", Statement)
196 negate = fields.TypedField("negate")
197 related_packages = fields.TypedField("Related_Packages", RelatedPackageRefs)
198
199 def __init__(self, id_=None, idref=None, timestamp=None, title=None,
200 description=None, short_description=None):
201
202 super(Indicator, self).__init__(
203 id_=id_,
204 idref=idref,
205 timestamp=timestamp,
206 title=title,
207 description=description,
208 short_description=short_description
209 )
210
211 self.observable = None
212 self.indicator_types = IndicatorTypes()
213 self.test_mechanisms = TestMechanisms()

Calls 1

VocabFieldClass · 0.90