AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend): Rename LINEAR_API_KEY to COPILOT_LINEAR_API_KEY to prevent global access (#12143)
Swifty05aaf7a85e3d
diff --git a/autogpt_platform/backend/backend/api/features/chat/tools/feature_requests.py b/autogpt_platform/backend/backend/api/features/chat/tools/feature_requests.pyindex 95f1eb1fbe..8346df1177 100644--- a/autogpt_platform/backend/backend/api/features/chat/tools/feature_requests.py+++ b/autogpt_platform/backend/backend/api/features/chat/tools/feature_requests.py@@ -104,8 +104,8 @@ def _get_linear_config() -> tuple[LinearClient, str, str]:Raises RuntimeError if any required setting is missing."""secrets = _get_settings().secrets- if not secrets.linear_api_key:- raise RuntimeError("LINEAR_API_KEY is not configured")+ if not secrets.copilot_linear_api_key:+ raise RuntimeError("COPILOT_LINEAR_API_KEY is not configured")if not secrets.linear_feature_request_project_id:raise RuntimeError("LINEAR_FEATURE_REQUEST_PROJECT_ID is not configured")if not secrets.linear_feature_request_team_id:@@ -114,7 +114,7 @@ def _get_linear_config() -> tuple[LinearClient, str, str]:credentials = APIKeyCredentials(id="system-linear",provider="linear",- api_key=SecretStr(secrets.linear_api_key),+ api_key=SecretStr(secrets.copilot_linear_api_key),title="System Linear API Key",)client = LinearClient(credentials=credentials)diff --git a/autogpt_platform/backend/backend/util/settings.py b/autogpt_platform/backend/backend/util/settings.pyindex c5cca87b6e..20ee10f0c3 100644--- a/autogpt_platform/backend/backend/util/settings.py+++ b/autogpt_platform/backend/backend/util/settings.py@@ -662,7 +662,7 @@ class Secrets(UpdateTrackingModel["Secrets"], BaseSettings):mem0_api_key: str = Field(default="", description="Mem0 API key")elevenlabs_api_key: str = Field(default="", description="ElevenLabs API key")- linear_api_key: str = Field(+ copilot_linear_api_key: str = Field(default="", description="Linear API key for system-level operations")linear_feature_request_project_id: str = Field(