Skip to content

Commit a2e8bc6

Browse files
committed
feat(user-agent): rename client to socket-python-cli
1 parent 4b775eb commit a2e8bc6

5 files changed

Lines changed: 16 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 2.10.11
4+
5+
### Changed: use lowercase hyphenated Python CLI User-Agent
6+
7+
- Use `socket-python-cli/` consistently for CLI and SDK requests so API
8+
attribution matches the Socket client naming convention.
9+
310
## 2.10.10
411

512
### Changed: bump pinned @coana-tech/cli to 15.12.3

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.10.10"
9+
version = "2.10.11"
1010
requires-python = ">= 3.11"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [

‎socketsecurity/__init__.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.10.10'
3-
USER_AGENT = f'SocketPythonCLI/{__version__}'
2+
__version__ = '2.10.11'
3+
# The name Socket's API attributes this client by. Callers that build their
4+
# own User-Agent read it from here, so a rename lands in one place.
5+
USER_AGENT_NAME = 'socket-python-cli'
6+
USER_AGENT = f'{USER_AGENT_NAME}/{__version__}'

‎socketsecurity/socketcli.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from socketdev import socketdev
1313
from socketdev.fullscans import FullScanParams
1414

15+
from socketsecurity import USER_AGENT_NAME
1516
from socketsecurity.config import CliConfig, truncate_commit_message
1617
from socketsecurity.core import Core
1718
from socketsecurity.core.classes import Diff
@@ -240,7 +241,7 @@ def apply_git_context(config: CliConfig) -> Tuple[bool, Optional[Git]]:
240241

241242

242243
def build_socket_sdk(config: CliConfig) -> socketdev:
243-
cli_user_agent_string = f"SocketPythonCLI/{config.version}"
244+
cli_user_agent_string = f"{USER_AGENT_NAME}/{config.version}"
244245
return socketdev(
245246
token=config.api_token,
246247
timeout=get_api_request_timeout(config),

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)