Skip to content

Commit 5511a5c

Browse files
committed
♻️ refactor(settings): remove all Chronicle mentions from docstrings and descriptions
1 parent 11cb85f commit 5511a5c

4 files changed

Lines changed: 17 additions & 19 deletions

File tree

external-import/google-secops-siem-incidents/src/google_secops_siem_incidents/client_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Google SecOps Chronicle API client with Google OAuth2 service-account auth."""
1+
"""Google SecOps API client with Google OAuth2 service-account auth."""
22

33
from collections.abc import AsyncIterator
44
from typing import Any
@@ -56,7 +56,7 @@ async def after(self, request: BaseRequestModel, response: Any) -> None:
5656

5757

5858
class GoogleSecOpsApiClient:
59-
"""Chronicle API client for fetching rule alerts via Legacy Search endpoint."""
59+
"""API client for fetching rule alerts via Legacy Search endpoint."""
6060

6161
_SCOPES = ["https://www.googleapis.com/auth/cloud-platform"]
6262
_API_VERSION = "v1alpha"
@@ -87,7 +87,7 @@ def _build_service_account_info(config: GoogleSecOpsConfig) -> dict[str, str]:
8787
"""Map GoogleSecOpsConfig fields to the service-account info dict expected by google-auth.
8888
8989
Args:
90-
config: Connector configuration with Chronicle credentials.
90+
config: Connector configuration with credentials.
9191
9292
Returns:
9393
Dict suitable for ``Credentials.from_service_account_info``.
@@ -106,7 +106,7 @@ def _build_service_account_info(config: GoogleSecOpsConfig) -> dict[str, str]:
106106
}
107107

108108
def _regionalized_url(self) -> str:
109-
"""Build the Chronicle API base URL with the region prefix.
109+
"""Build the API base URL with the region prefix.
110110
111111
Returns:
112112
Regionalized base URL string.
@@ -117,7 +117,7 @@ def _regionalized_url(self) -> str:
117117
return f"https://{region}-{host}"
118118

119119
def _instance_path(self) -> str:
120-
"""Build the Chronicle resource instance path.
120+
"""Build the resource instance path.
121121
122122
Returns:
123123
Resource path string for the configured project/region/instance.
@@ -167,7 +167,7 @@ async def fetch_rule_alerts(
167167
end_time: str,
168168
max_alerts: int = 1000,
169169
) -> AsyncIterator[RuleAlertResponse]:
170-
"""Fetch rule alerts from Chronicle using backward-sliding pagination.
170+
"""Fetch rule alerts from using backward-sliding pagination.
171171
172172
Args:
173173
start_time: ISO-8601 start of the query window.

external-import/google-secops-siem-incidents/src/google_secops_siem_incidents/connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(self, config: ConnectorSettings, helper: OpenCTIConnectorHelper):
8585

8686
@property
8787
def client(self) -> GoogleSecOpsApiClient:
88-
"""Lazy-initialize and return the Chronicle API client.
88+
"""Lazy-initialize and return the API client.
8989
9090
Returns:
9191
Initialised GoogleSecOpsApiClient instance.
@@ -117,7 +117,7 @@ def _collect_intelligence(self, state: GoogleSecOpsSIEMState | None = None) -> N
117117
asyncio.run(self._async_process_message(state))
118118

119119
async def _async_process_message(self, state: GoogleSecOpsSIEMState) -> None:
120-
"""Fetch Chronicle rule alerts, convert to STIX bundles, and persist state.
120+
"""Fetch rule alerts, convert to STIX bundles, and persist state.
121121
122122
Args:
123123
state: Current connector state with timestamp and pagination fields.

external-import/google-secops-siem-incidents/src/google_secops_siem_incidents/models/rule_alert_response.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Pydantic v2 models for Chronicle Legacy Search Rules Alerts response."""
1+
"""Pydantic v2 models for Legacy Search Rules Alerts response."""
22

33
from pydantic import BaseModel, ConfigDict, Field
44

@@ -12,7 +12,7 @@ class StringSeq(BaseModel):
1212

1313

1414
class Outcome(BaseModel):
15-
"""A named outcome produced by a Chronicle detection rule."""
15+
"""A named outcome produced by a detection rule."""
1616

1717
model_config = ConfigDict(populate_by_name=True)
1818

@@ -43,7 +43,7 @@ class TimeWindow(BaseModel):
4343

4444

4545
class Alert(BaseModel):
46-
"""A single detection alert raised by a Chronicle rule."""
46+
"""A single detection alert raised by a rule."""
4747

4848
model_config = ConfigDict(populate_by_name=True)
4949

@@ -60,7 +60,7 @@ class Alert(BaseModel):
6060

6161

6262
class RuleProperties(BaseModel):
63-
"""Static properties of a Chronicle detection rule."""
63+
"""Static properties of a detection rule."""
6464

6565
model_config = ConfigDict(populate_by_name=True)
6666

@@ -88,7 +88,7 @@ class RuleAlert(BaseModel):
8888

8989

9090
class RuleAlertResponse(BaseModel):
91-
"""Top-level response from the Chronicle Legacy Search Rules Alerts endpoint."""
91+
"""Top-level response from the Legacy Search Rules Alerts endpoint."""
9292

9393
model_config = ConfigDict(populate_by_name=True)
9494

external-import/google-secops-siem-incidents/src/google_secops_siem_incidents/settings.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,15 @@ class ExternalImportConnectorConfig(BaseExternalImportConnectorConfig):
3030

3131

3232
class GoogleSecOpsConfig(BaseConfigModel):
33-
"""Configuration specific to the Google SecOps Chronicle connector."""
33+
"""Configuration specific to the Google SecOps connector."""
3434

3535
base_url: str = Field(
3636
"https://chronicle.googleapis.com",
37-
description="Chronicle API base URL (region prefix added at runtime).",
37+
description="API base URL (region prefix added at runtime).",
3838
)
3939
project_id: str = Field(description="GCP project ID.")
40-
project_region: str = Field(
41-
description="Chronicle region (e.g. 'us', 'eu', 'asia')."
42-
)
43-
project_instance: str = Field(description="Chronicle instance UUID.")
40+
project_region: str = Field(description="Region (e.g. 'us', 'eu', 'asia').")
41+
project_instance: str = Field(description="Instance UUID.")
4442
private_key: str = Field(description="Service account private key (PEM).")
4543
private_key_id: str = Field(description="Service account private key ID.")
4644
client_email: str = Field(description="Service account client email.")

0 commit comments

Comments
 (0)