Skip to content

feat(user-agent): rename the client to socket-python-cli - #320

Open
John-David Dalton (jdalton) wants to merge 1 commit into
mainfrom
ua/lowercase-client-name
Open

feat(user-agent): rename the client to socket-python-cli#320
John-David Dalton (jdalton) wants to merge 1 commit into
mainfrom
ua/lowercase-client-name

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Aug 27, 2026

Copy link
Copy Markdown

Socket's public APIs read the User-Agent to attribute a request, and every other Socket client names itself in lowercase-hyphen form. This renames SocketPythonCLI/ to socket-python-cli/ and collapses the two copies of the name into one constant.

Why one constant

The name was a literal in two places: socketsecurity/__init__.py built USER_AGENT from it, and build_socket_sdk in socketsecurity/socketcli.py rebuilt the same string by hand for the SDK's user_agent override. A rename could half-apply and leave the CLI reporting two different names depending on the call path.

Both now read USER_AGENT_NAME from socketsecurity/__init__.py. config.version already defaults to __version__, so the SDK override keeps reporting exactly what it did before.

Rollout

There is no coordination needed. Socket's API-side attribution already accepts the old and the new name both, so the rename carries across with no gap and nothing breaks whether this ships first or second.

Both changed files parse (python3 -m ast), and no occurrence of the old name remains in the repo.


Note

Low Risk
Metadata-only User-Agent string change with no auth or scan logic touched; API attribution is described as accepting both old and new names.

Overview
Renames the Python CLI’s User-Agent client identifier from SocketPythonCLI/ to socket-python-cli/, matching Socket’s lowercase-hyphen convention for API attribution.

Introduces USER_AGENT_NAME in socketsecurity/__init__.py and builds USER_AGENT from it, so the SDK setup in build_socket_sdk no longer duplicates a hardcoded name and stays consistent with CliClient headers that already read USER_AGENT.

Reviewed by Cursor Bugbot for commit d79c264. Configure here.

Socket's public APIs read the User-Agent to attribute a request, and
every other Socket client names itself in lowercase-hyphen form. The
camel-case name was the odd one out.

The name lived as a literal in two places, so a rename could half-apply.
Both now read USER_AGENT_NAME from socketsecurity/__init__.py.

depscan accepts SocketPythonCLI/ and socket-python-cli/ both, so
attribution carries across the rename with no gap. Nothing breaks if
this ships before or after that change.
@jdalton
John-David Dalton (jdalton) requested a review from a team as a code owner August 27, 2026 20:04
@github-actions

Copy link
Copy Markdown

Version Check Failed

Please increment...

@lelia lelia self-assigned this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants