| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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.
|
❌ Version Check Failed Please increment... |
Sorry, something went wrong.
There was a problem hiding this comment.
John-David Dalton (@jdalton) thanks for adding this, but I think we need to implement backend changes first before we rename on the client side.
I confirmed that backend attribution currently matches user-agents on exact, case sensitive prefixes, and currently only SocketPythonCLI/ is registered, meaning that this rename will cause us to silently lose Python CLI attribution as users upgrade.
By the way, the same class of change needs to take place on the SDK side, too - in fact, the SocketSDKPython/ user-agent appears to have never been registered on the backend. We may as well fix the gap everywhere in one go, if you're up for it.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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 constantThe 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.
RolloutThere 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.