GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reject retired API credentials before use by jdalton · Pull Request #113 · SocketDev/socket-sdk-python

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Oct 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Reject the retired shared API credential before the Python SDK stores or encodes it. The error tells users to configure a replacement; valid credentials keep their existing selection order and encoded bytes.

Implementation and validation

Checks SDK construction and Basic-auth username encoding, including explicit arguments and all four environment sources. Compares a SHA-256 fingerprint; source and errors contain no credential value.

Validation: 12 focused tests passed. New helper and test files passed Ruff. Tests use synthetic credentials and make no Socket API calls.

Links and PR checklist

Reject a retired shared API credential with instructions to configure a replacement.

Automated review notes

[!NOTE]
Medium Risk
Changes credential validation on every client init and encode_key path; misconfigured digest or matching logic could block legitimate tokens or miss the retired one.

Overview
Blocks a retired shared API credential before the Python SDK stores or Base64-encodes it, with a fixed user-facing error telling customers to create a new token.

Token resolution moves into select_token, keeping the same behavior: explicit token wins (including empty string), otherwise the first set of the four SOCKET_* env vars. After resolution, reject_retired_token compares a trimmed SHA-256 digest to a baked-in fingerprint (no raw secret in repo or errors). API.encode_key also runs reject_retired_basic_auth_token, checking only the Basic-auth username segment before the first :.

Unit tests cover rejection messaging/redaction, env precedence, whitespace trimming, and non-retired tokens without network calls.

Reviewed by Cursor Bugbot for commit 6ebd180. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jdalton
John-David Dalton (jdalton) requested a review from a team as a code owner October 13, 2026 12:42
github-advanced-security[bot]
github-advanced-security Bot found potential problems Oct 13, 2026
View reviewed changes
Comment thread socketdev/core/retired_token.py Dismissed

Uh oh!

There was an error while loading. Please reload this page.

@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/retired-credential-recovery branch 3 times, most recently from a59fb21 to ebc9146 Compare October 13, 2026 12:52
@jdalton
John-David Dalton (jdalton) requested a review from Joseph Werle (jwerle) October 26, 2026 15:49
jwerle
Joseph Werle (jwerle) approved these changes Oct 26, 2026
View reviewed changes
@jdalton
John-David Dalton (jdalton) enabled auto-merge (squash) October 29, 2026 14:32
@jdalton
Reject retired API credentials before use
4fa5424
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/retired-credential-recovery branch from ebc9146 to 4fa5424 Compare October 29, 2026 14:44
@jdalton
John-David Dalton (jdalton) merged commit bb5b024 into main Oct 29, 2026
15 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jdalton
John-David Dalton (jdalton) deleted the jdalton/retired-credential-recovery branch October 29, 2026 14:45
@lelia lelia mentioned this pull request Nov 3, 2026
Poll cached full scan results until ready #115
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jwerle Joseph Werle (jwerle) jwerle approved these changes
+1 more reviewer
@github-advanced-security github-advanced-security[bot] github-advanced-security[bot] left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@jdalton @jwerle @github-advanced-security
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.