Skip to content

Commit 623930a

Browse files
committed
fix: Revert change of setting max_tlp into max_tlp_level
This change could be breaking with existing setup. Better to keep setting name as it is.
1 parent 3a21f6d commit 623930a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

internal-enrichment/shadowtrackr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ file of OpenCTI.
4040
| `replace_with_lower_score` | `SHADOWTRACKR_REPLACE_WITH_LOWER_SCORE` | Yes | Lower the score based on the ShadowTrackr false positive estimate value |
4141
| `api_key` | `SHADOWTRACKR_API_KEY` | Yes | Get one here: https://shadowtrackr.com/usr/ | |
4242
| `replace_valid_to_date` | `SHADOWTRACKR_REPLACE_VALID_TO_DATE` | Yes | Set the valid to date to tomorrow for CDNs, Clouds and VPNs |
43-
| `max_tlp_level | `SHADOWTRACKR_MAX_TLP` | No | Don't send anything above this TLP to ShadowTrackr |
43+
| `max_tlp` | `SHADOWTRACKR_MAX_TLP` | No | Don't send anything above this TLP to ShadowTrackr |
4444

4545
## Behavior
4646

internal-enrichment/shadowtrackr/src/config.yml.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ connector:
1212

1313
shadowtrackr:
1414
api_key: 'ChangeMe'
15-
max_tlp_level: "TLP:AMBER"
15+
max_tlp: "TLP:AMBER"
1616
replace_with_lower_score: true
1717
replace_valid_to_date: true
1818

internal-enrichment/shadowtrackr/src/connector/connector.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __init__(self, config: ConnectorSettings, helper: OpenCTIConnectorHelper):
6161
)
6262

6363
# Define variables
64-
self.max_tlp_level = self.config.shadowtrackr.max_tlp_level
64+
self.max_tlp = self.config.shadowtrackr.max_tlp
6565
self.replace_with_lower_score = (
6666
self.config.shadowtrackr.replace_with_lower_score
6767
)
@@ -108,11 +108,11 @@ def extract_and_check_markings(self, opencti_entity: dict) -> None:
108108
if marking_definition["definition_type"] == "TLP":
109109
tlp = marking_definition["definition"]
110110

111-
valid_max_tlp = self.helper.check_max_tlp(tlp, self.max_tlp_level)
111+
valid_max_tlp = self.helper.check_max_tlp(tlp, self.max_tlp)
112112

113113
if not valid_max_tlp:
114114
msg = (
115-
f"[ShadowTrackr] Do not send any data, TLP of the observable '{tlp}' is greater than MAX TLP '{self.max_tlp_level}',"
115+
f"[ShadowTrackr] Do not send any data, TLP of the observable '{tlp}' is greater than MAX TLP '{self.max_tlp}',"
116116
"the connector does not has access to this observable, please check the group of the connector user"
117117
)
118118
raise ValueError(msg)

internal-enrichment/shadowtrackr/src/connector/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ShadowTrackrConfig(BaseConfigModel):
3030
default="https://shadowtrackr.com/api/v3",
3131
)
3232
api_key: str = Field(description="API key for authentication.")
33-
max_tlp_level: Literal[
33+
max_tlp: Literal[
3434
"TLP:WHITE",
3535
"TLP:CLEAR",
3636
"TLP:GREEN",

0 commit comments

Comments
 (0)