)
        return attack_patterns

    def _create_vulnerability(self, name) -> Vulnerability:
        vulnerability_external_references = create_vulnerability_external_reference(
            name
        )
        return create_vulnerability(
            name,
            self.pulse_author,
            vulnerability_external_references,
            self.object_marking_refs,
        )

    def _create_vulnerabilities(self) -> List[Vulnerability]:
        vulnerabilities = []
        cve_pulse_indicators = list(
            filter(lambda x: x.type == self._INDICATOR_TYPE_CVE, self.pulse.indicators)
        )
        for cve_pulse_indicator in cve_pulse_indicators:
            vulnerability = self._create_vulnerability(cve_pulse_indicator.indicator)
            vulnerabilities.append(vulnerability)
        return vulnerabilities

    def _create_indicator(
        self,
        name: str,
        description: str,
        valid_from: datetime,
        observable_type: str,
        observable_value: str,
        pattern_type: str,
        pattern_value: str,
        indicator_pattern: str,
    ) -> Indicator:
        return create_indicator(
            name,
            self.pulse_author,
            description,
            valid_from,
            observable_type,
            observable_value,
            pattern_type,
            pattern_value,
            indicator_pattern,
            self.object_marking_refs,
        )

    @staticmethod
    def _create_indicator_description(pulse_indicator: PulseIndicator) -> str:
        indicator_description = f"{pulse_indicator.title}"
        if pulse_indicator.description:
            if indicator_description:
                indicator_description = (
                    f"{indicator_description}\n{pulse_indicator.description}"
                )
            else:
                indicator_description = f"{pulse_indicator.description}"
        return indicator_description

    def _create_yara_indicators(self) -> List[Indicator]:
        yara_indicators = []
        yara_pulse_indicators = list(
            filter(lambda x: x.type == self._INDICATOR_TYPE_YARA, self.pulse.indicators)
        )
        for yara_pulse_indicator in yara_pulse_indicators:
            yara_rule_str = yara_pulse_indicator.content
            if yara_rule_str is None or not yara_rule_str:
                continue

            name = yara_pulse_indicator.title
            if not name:
                name = yara_pulse_indicator.indicator

            observable_type = self._PATTERN_TYPE_YARA_OBSERVABLE_TYPE
            observable_value = yara_rule_str

            pattern_type = self._PATTERN_TYPE_YARA

            # Dummy pattern value.
            pattern_value = "[file:hashes.md5 = 'd41d8cd98f00b204e9800998ecf8427e']"

            # YARA rule as indicator pattern.
            indicator_pattern = yara_rule_str

            yara_indicator = self._create_indicator(
                name,
                self._create_indicator_description(yara_pulse_indicator),
                yara_pulse_indicator.created,
                observable_type,
                observable_value,
                pattern_type,
                pattern_value,
                indicator_pattern,
            )
            yara_indicators.append(yara_indicator)
        return yara_indicators

    def _create_common_indicators(self) -> List[Indicator]:
        common_indicators = []
        pulse_indicators = list(
            filter(
                lambda x: x.type not in self._INDICATOR_TYPES_WITH_SPECIAL_HANDLING,
                self.pulse.indicators,
            )
        )
        for pulse_indicator in pulse_indicators:
            pulse_indicator_type = pulse_indicator.type

            observable_type = self._INDICATOR_TYPE_TO_OPENCTI_TYPE.get(
                pulse_indicator_type
            )
            if observable_type is None:
                self.logger.error(
                    "Unsupported pulse indicator type: %s", pulse_indicator_type
                )
                continue

            observable_value = pulse_indicator.indicator

            pattern_type = self._PATTERN_TYPE_STIX
            pattern_value = create_equality_observation_expression_str(
                self._OPENCTI_TO_STIX2[observable_type], observable_value
            )
            indicator_pattern = pattern_value

            indicator = self._create_indicator(
                pulse_indicator.indicator,
                self._create_indicator_description(pulse_indicator),
                pulse_indicator.created,
                str(observable_type.value),
                observable_value,
                pattern_type,
                pattern_value,
                indicator_pattern,
            )

            common_indicators.append(indicator)
        return common_indicators

    def _create_indicators(self) -> List[Indicator]:
        indicators = []
        indicators.extend(self._create_common_indicators())
        indicators.extend(self._create_yara_indicators())
        return indicators

    def _create_indicates_relationships(
        self, sources: List[_DomainObject], targets: List[_DomainObject]
    ) -> List[Relationship]:
        return create_indicates_relationships(
            self.pulse_author,
            sources,
            targets,
            self.object_marking_refs,
            self.first_seen,
            self.last_seen,
            self.confidence_level,
        )

    def _create_report(self, object_refs: List[_DomainObject]) -> Report:
        external_references = self._create_report_external_references()
        tags = self._create_report_tags()

        return Report(
            created_by_ref=self.pulse_author,
            created=self.pulse.created,
            modified=self.pulse.modified,
            name=self.pulse.name,
            description=self.pulse.description,
            published=self.pulse.created,
            object_refs=object_refs,
            labels=["threat-report"],
            external_references=external_references,
            object_marking_refs=self.object_marking_refs,
            custom_properties={
                CustomProperties.REPORT_CLASS: self.report_type,
                CustomProperties.OBJECT_STATUS: self.report_status,
                CustomProperties.SRC_CONF_LEVEL: self.confidence_level,
                CustomProperties.TAG_TYPE: tags,
            },
        )

    def _create_report_external_references(self) -> List[ExternalReference]:
        external_references = [self._create_pulse_external_reference()]

        for reference in self.pulse.references:
            if not reference:
                continue
            external_reference = create_external_reference(self.source_name, reference)
            external_references.append(external_reference)

        return external_references

    def _create_pulse_external_reference(self) -> ExternalReference:
        pulse_id = self.pulse.id
        pulse_url = self.pulse.url
        return create_external_reference(self.source_name, pulse_url, pulse_id)

    def _create_report_tags(self) -> List[Mapping[str, str]]:
        tags = []
        for pulse_tag in self.pulse.tags:
            if not pulse_tag:
                continue
            tag = create_tag(self.source_name, pulse_tag, self._TAG_COLOR)
            tags.append(tag)
        return tags

    def _create_reports(self, object_refs: List[_DomainObject]) -> List[Report]:
        return [self._create_report(object_refs)]

    def build(self) -> Bundle:
        """Build pulse bundle."""
        # Prepare STIX2 bundle.
        bundle_objects = []

        #