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 for updating existing vulnerabilities #3316

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ connector:
cisa:
catalog_url: 'https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json'
create_infrastructures: false
tlp: 'TLP:CLEAR'
tlp: 'TLP:CLEAR'
update_existing: true
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def __init__(self):
self.cisa_interval = get_config_variable(
"CISA_INTERVAL", ["cisa", "interval"], config, default=7
)

self.update_exisiting = get_config_variable(
"CISA_UPDATE_EXISTING", ["cisa", "update_exisiting"], config, default=True
)
self.created_by_stix = None
self.tlp_marking = None
self.org = "Cybersecurity and Infrastructure Security Agency"
Expand Down Expand Up @@ -156,7 +158,7 @@ def build_bundle(self, data):
description=f"{description}",
created_by_ref=self.created_by_stix["id"],
created=f"{created}",
confidence=80 if description is not None and len(description) > 0 else 50,
confidence=100 if description is not None and len(description) > 0 else 50,
object_marking_refs=[f"{marking_id}"],
custom_properties={"x_opencti_cisa_kev": True},
)
Expand Down Expand Up @@ -318,8 +320,7 @@ def run(self):
def send_bundle(self, work_id: str, serialized_bundle: str) -> None:
try:
self.helper.send_stix2_bundle(
serialized_bundle,
work_id=work_id,
serialized_bundle, work_id=work_id, update=self.update_exisiting
)
except Exception as e:
self.helper.log_error(f"Error while sending bundle: {e}")
Expand Down