-
Notifications
You must be signed in to change notification settings - Fork 530
[ShadowTrackr] Refactor connector with configuration and API integration #5294
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
base: feat/5170-Shadowtrackr-verify
Are you sure you want to change the base?
[ShadowTrackr] Refactor connector with configuration and API integration #5294
Conversation
4a99b08 to
d21917a
Compare
6365d58 to
23baf0d
Compare
|
fb04181 to
fdaed6e
Compare
046ffcc to
00e2eb5
Compare
fdaed6e to
623930a
Compare
623930a to
8607336
Compare
| if marking_definition["definition_type"] == "TLP": | ||
| tlp = marking_definition["definition"] | ||
|
|
||
| valid_max_tlp = self.helper.check_max_tlp(tlp, self.max_tlp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if len(opencti_entity["objectMarking"]) = 0, tlp is not defined and this line leads to an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes, as is, from the template (
| if len(opencti_entity["objectMarking"]) != 0: |
|
|
||
| text = self._get_ip_info_msg(ip_info, score_lowered, date_shortened) | ||
| if text: | ||
| description += f"\n[ShadowTrackr] {text}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got a case where description was None and this leads to an error.
| description += f"\n[ShadowTrackr] {text}" | |
| description = (description or "") + f"\n[ShadowTrackr] {text}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, but let's keep using f-string fully ;) :
description = f"{description or ''}\n[ShadowTrackr] {text}"8607336 to
7850b64
Compare
4a57c86 to
db83500
Compare
| score_lowered = False | ||
| for threshold, decrement in SCORE_STEPS: | ||
| if false_positive_estimate > threshold: | ||
| score -= decrement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got a case where score was None and this leads to an error.
You can check for score and return if empty.
…egration - Added new ShadowTrackr connector with capabilities for enriching observables. - Introduced configuration settings for API integration, including base URL and API key. - Implemented core functionality for processing IP addresses and adjusting scores based on false positive estimates. - Created necessary classes and methods for STIX object conversion and relationship management. - Updated Docker and sample configuration files to reflect new connector settings.
This change could be breaking with existing setup. Better to keep setting name as it is.
41f3c38 to
80e1986
Compare
db83500 to
27a4744
Compare
Proposed changes
Changes:
Related issues
Checklist
Further comments