Skip to content

Conversation

@jabesq
Copy link
Member

@jabesq jabesq commented Nov 28, 2025

Proposed changes

Changes:

  • 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.

Related issues

Checklist

  • I consider the submitted work as finished
  • I have signed my commits using GPG key.
  • I tested the code for its functionality using different use cases
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@github-actions github-actions bot added the filigran team use to identify PR from the Filigran team label Nov 28, 2025
@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-refactor branch from 4a99b08 to d21917a Compare December 1, 2025 14:32
@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-verify branch from 6365d58 to 23baf0d Compare December 1, 2025 14:32
@jabesq jabesq marked this pull request as ready for review December 1, 2025 14:43
@jabesq
Copy link
Member Author

jabesq commented Dec 1, 2025

Check Status Notes
Use self.helper.connector_logger.() instead of deprecated self.helper.log_() ✅ Pass  
Remove CONFIDENCE_LEVEL ✅ Pass  
Remove UPDATE_EXISTING_DATA ✅ Pass  
Proper use of traceback.print_exc() in main ✅ Pass  
no bare 'try: ... except: ...' ✅ Pass  
Verify coherence of README.md ✅ Pass Update to reflect new defaults for connector configurations.
Ensure requirements.txt lists all sub-dependencies explicitly ✖️ Improvement stix2 is missing and is currently imported via pycti sub-dependencies.
Review configuration files (config.yml.sample, docker-compose.yml, .env) ✅ Pass  
Validate error handling (avoid bare try/except) ✅ Pass  
Remove x_opencti_report_status ✅ Pass  
Confirm proper use of TLP values ✅ Pass  
Verify author metadata ✅ Pass  
Pydantic used to build and validate setting ✅ Pass  
Define CONNECTOR_TYPE directly in the application ✅ Pass  
connector is composer supported ✅ Pass  Verification done by running generate_connector_config_json_schema.sh locally
Ensure helper.listen is used ✅ Pass  
Ensure if not in scope → return original bundle ✅ Pass  
No use of variable helper.api… ?? Still use of helper.api to create labels with color
Config file samples ✅ Pass .env.sample is missing
Dockerfile ✅ Pass 

@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-refactor branch from fb04181 to fdaed6e Compare December 1, 2025 16:27
@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-verify branch 2 times, most recently from 046ffcc to 00e2eb5 Compare December 4, 2025 15:48
@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-refactor branch from fdaed6e to 623930a Compare December 4, 2025 15:48
@jabesq jabesq linked an issue Dec 5, 2025 that may be closed by this pull request
@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-refactor branch from 623930a to 8607336 Compare December 5, 2025 11:10
if marking_definition["definition_type"] == "TLP":
tlp = marking_definition["definition"]

valid_max_tlp = self.helper.check_max_tlp(tlp, self.max_tlp)
Copy link
Member

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.

Copy link
Member Author

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:
), to be checked with someone with more seniority (@Powlinett, @Kakudou, @helene-nguyen)


text = self._get_ip_info_msg(ip_info, score_lowered, date_shortened)
if text:
description += f"\n[ShadowTrackr] {text}"
Copy link
Member

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.

Suggested change
description += f"\n[ShadowTrackr] {text}"
description = (description or "") + f"\n[ShadowTrackr] {text}"

Copy link
Member Author

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}"

@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-refactor branch from 8607336 to 7850b64 Compare December 5, 2025 13:46
@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-verify branch from 4a57c86 to db83500 Compare December 5, 2025 13:46
score_lowered = False
for threshold, decrement in SCORE_STEPS:
if false_positive_estimate > threshold:
score -= decrement
Copy link
Member

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.
@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-refactor branch from 41f3c38 to 80e1986 Compare December 8, 2025 14:45
@jabesq jabesq force-pushed the feat/5170-Shadowtrackr-verify branch from db83500 to 27a4744 Compare December 8, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Shadowtrackr] Verify + add connector in the catalog

3 participants