Skip to content

feat(purl): adopt socketdev typed batch params - #99

Open
lelia wants to merge 1 commit into
mainfrom
lelia/purl-typed-params-ce-360
Open

feat(purl): adopt socketdev typed batch params#99
lelia wants to merge 1 commit into
mainfrom
lelia/purl-typed-params-ce-360

Conversation

@lelia

@lelia lelia commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What & why

The core-tool-watch scoring call in scripts/check_core_tools.py opted into the batch purl API's fail-closed semantics via stringly-typed query-string kwargs (poll="true", timeoutSec="120", alerts="true") — an undocumented SDK passthrough. socketdev (Python SDK) v3.4.2+ promoted these to first-class typed params, so this migrates to the supported surface.

Changes

  • scripts/check_core_tools.py: poll="true"poll=True, timeoutSec="120"timeout_sec=120, alerts="true"alerts=True. Behavior unchanged (still fail-closed).
  • pyproject.toml: socketdev>=3.3.0socketdev>=3.5.0. Typed params landed in 3.4.2 (on 3.3.0, timeout_sec would be sent as a literal timeout_sec query param, silently losing the timeoutSec fail-closed bound); 3.5.0 additionally bounds the SDK's runtime dependency ranges and hardens PyPI install verification.
  • uv.lock: regenerated — socketdev 3.3.03.5.0.

Validation (against the published 3.5.0 wheel)

  • Full test suite: 216 passed via the CI install path (uv sync --locked --extra dev).
  • Wire-level check of analyze_purls through the real SDK transport: the call produces POST orgs/<slug>/purl?license=false&poll=true&timeoutSec=120&alerts=true with the expected components body — typed params map to the exact query params the server expects.
  • Synthetic notFound rows survive the SDK's dedupe hardening and map to status=not_found (fail-closed semantics intact).
  • check_core_tools.py --mode watch end-to-end run against live GitHub APIs works.

Note: core-tool-watch's scan env installs from main's uv.lock, so the typed params take effect there once this merges.

Refs CE-360


Note

Medium Risk
Touches supply-chain guard scoring for pinned core tools; risk is mitigated by intentional behavior parity and a dependency bump with a documented wire-level mapping requirement.

Overview
Core-tool-watch now uses the socketdev SDK’s first-class batch PURL parameters instead of undocumented string query passthroughs. In analyze_purls, poll="true", timeoutSec="120", and alerts="true" become poll=True, timeout_sec=120, and alerts=True — same fail-closed batch semantics (bounded poll, synthetic pendingScan/notFound rows).

The socketdev floor moves from >=3.3.0 to >=3.5.0 in pyproject.toml so typed params (from 3.4.2+) map correctly to API query names like timeoutSec; uv.lock is updated to 3.5.0.

Reviewed by Cursor Bugbot for commit 2820504. Configure here.

@lelia
lelia temporarily deployed to socket-firewall August 5, 2026 03:59 — with GitHub Actions Inactive
@lelia lelia changed the title feat(purl): adopt socketdev 3.4.0 typed batch params (CE-360) feat(purl): adopt socketdev 3.4.0 typed batch params Aug 5, 2026
@lelia lelia changed the title feat(purl): adopt socketdev 3.4.0 typed batch params feat(purl): adopt socketdev 3.4.0 typed batch params Aug 5, 2026
@lelia lelia changed the title feat(purl): adopt socketdev 3.4.0 typed batch params feat(purl): adopt socketdev 3.4.2 typed batch params Aug 5, 2026
@lelia
lelia marked this pull request as ready for review August 5, 2026 20:54
@lelia
lelia requested a review from a team as a code owner August 5, 2026 20:54
Comment thread pyproject.toml Outdated
@lelia
lelia force-pushed the lelia/purl-typed-params-ce-360 branch from cc0c2f9 to 5e801c7 Compare August 6, 2026 02:28
@lelia
lelia temporarily deployed to socket-firewall August 6, 2026 02:28 — with GitHub Actions Inactive
@lelia
lelia temporarily deployed to socket-firewall August 6, 2026 02:28 — with GitHub Actions Inactive
@socket-security

socket-security Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​socketdev@​3.3.0 ⏵ 3.5.098 +1100100100100

View full report

@socket-security-staging

socket-security-staging Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​socketdev@​3.3.0 ⏵ 3.5.098 +1100100100100

View full report

The core-tool-watch scoring call opted into the batch purl API's
fail-closed semantics via stringly-typed query-string kwargs
(poll="true", timeoutSec="120", alerts="true") -- an undocumented
SDK passthrough. socketdev 3.4.2 promoted these to first-class typed
params; migrate to the supported surface. Behavior unchanged (still
fail-closed).

Floor pinned at socketdev>=3.5.0, which additionally bounds the SDK's
runtime dependency ranges and hardens PyPI install verification.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lelia
lelia force-pushed the lelia/purl-typed-params-ce-360 branch from 5e801c7 to 2820504 Compare August 6, 2026 04:21
@lelia
lelia temporarily deployed to socket-firewall August 6, 2026 04:21 — with GitHub Actions Inactive
@lelia lelia changed the title feat(purl): adopt socketdev 3.4.2 typed batch params feat(purl): adopt socketdev typed batch params (SDK >=3.5.0) Aug 6, 2026
@lelia
lelia temporarily deployed to socket-firewall August 6, 2026 04:22 — with GitHub Actions Inactive
@lelia

lelia commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2820504. Configure here.

@lelia lelia mentioned this pull request Aug 6, 2026
lelia added a commit that referenced this pull request Aug 6, 2026
Constraint + lock only; the core-tool-watch typed-params migration remains
in #99, which rebases on this.

Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
@lelia lelia changed the title feat(purl): adopt socketdev typed batch params (SDK >=3.5.0) feat(purl): adopt socketdev typed batch params Aug 6, 2026
@lelia lelia changed the title feat(purl): adopt socketdev typed batch params feat(purl): adopt socketdev typed batch params Aug 6, 2026
@lelia

lelia commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2820504. Configure here.

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