Skip to content

fix(user-agent): identify Basics API requests - #133

Draft
lelia wants to merge 1 commit into
mainfrom
codex/basics-user-agent
Draft

lelia wants to merge 1 commit into
mainfrom
codex/basics-user-agent

Conversation

@lelia

@lelia lelia commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Basics currently inherits SocketSDKPython/<SDK version> for Socket API requests, so request attribution cannot distinguish it from standalone SDK consumers. Send socket-basics/<Basics version> from both dashboard configuration reads and scan uploads, using one shared constant.

Blocked on backend deployment. Keep this PR in draft and do not merge or release it until depscan recognizes socket-basics/ as basics. Backend dependency: https://github.com/SocketDev/depscan/pull/29622. Client releases must follow deployment, not merely backend PR merge.

Changes

  • Override the SDK User-Agent on both Basics API clients without requiring an SDK upgrade.
  • Derive the identity from the existing Basics version module and record the change under Unreleased.
  • Keep this work separate from fix(scanner): preserve option values #125, which fixes Tier 1 argument parsing.

Testing

  • 487 Python tests passed using the installed SDK 3.5.0; isolated test Git configuration disables local signing and hooks for temporary fixture repos.
  • The Java/OpenGrep module was excluded because the installed OpenGrep scanner fails to start locally. The initial broader run exposed that environment issue; CI retains its normal scanner coverage.
  • Both new request tests also passed against the proposed SDK changes in fix(user-agent): identify the Python SDK consistently socket-sdk-python#127.
  • New tests exercise the real SDK and inspect prepared HTTP headers for organization discovery, Basics settings, and multipart scan upload. Only the HTTP transport boundary is replaced.
  • Black and Flake8 passed for the new module and tests; git diff --check passed. Added code contains no comments requiring revision in the fourth-wall audit.

Rollout and reviewer context

Prior art: SocketDev/socket-python-cli#320 by jdalton. Basics follows the same application override pattern and uses its own version rather than the SDK version. Select the unpublished patch version during release preparation after backend deployment; this draft leaves release metadata unchanged.

This branch has not been deployed

No deployments
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.

1 participant