GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — feat(api): batch patch lookups through the public proxy in scan by mikolalysenko · Pull Request #108 · SocketDev/socket-patch Conversation
Collaborator
WhatToken-less (free-user) Legacy-proxy fallbackDeployments that predate the proxy endpoint keep working:
and degrades to the existing per-package GET path. Genuine validation 400s, 401/403 (which keep feeding The 400/503 body markers are a cross-repo contract with the depscan proxy and are documented on the helper. Tests
Docs
Assisted-by: Claude Code:claude-fable-5
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsToken-less (free-user) scans previously issued one GET
/patch/by-package/:purl per package against the public proxy because
the proxy had no batch endpoint. The depscan firewall-api-proxy now
exposes POST /patch/batch (filtered to free-tier patches, served
no-store), so proxy-mode search_patches_batch POSTs the same
CycloneDX-style components body it already sends to the authenticated
/v0/orgs/{slug}/patches/batch endpoint — one request per --batch-size
chunk instead of one per package.
Deployments that predate the proxy endpoint still work: the client
detects the legacy catch-all (400 "Unsupported endpoint"), a missing
route (404/405), or an unconfigured patch API (503 "Patch API is not
configured") and degrades to the per-package GET path. Genuine
validation 400s, rate limits, and over-capacity 503s surface instead
of silently degrading — the latter so an overloaded proxy is not hit
with a tenfold request amplification.
The 400/503 body markers are a cross-repo contract with the depscan
proxy; documented on the helper. Covered by an is_batch_unsupported
unit-test truth table and a wiremock integration suite asserting which
HTTP calls fire (batch POST vs per-package GET fallback) per response.
Assisted-by: Claude Code:claude-fable-5
Wenxin Jiang (Wenxin-Jiang)
approved these changes
# Conflicts: # CHANGELOG.md The proxy batch endpoint validates its component list all-or-nothing, so a single crawled PURL of a type the server doesn't recognize (e.g. pkg:jsr/... from the Deno crawler) rejected the whole chunk and, when every chunk contained one, flipped the entire scan to exit 1. The docker e2e deno JSR test caught this against the production proxy: scan crawled 4 jsr packages, the one batch POST 400'd, and the scan errored where the old per-package GET path had quietly tolerated the unresolvable PURLs one by one. A validation 400 on the proxy batch POST now degrades the chunk to the legacy per-package GET path, whose per-PURL error swallowing is the scan semantic that predates the batch optimization: the valid subset still resolves, the exotic PURLs stay patch-less, and the scan succeeds. Rate limits, auth statuses, and over-capacity 503s still surface. is_batch_unsupported keeps detecting deployment-level absence only; the two fallback causes are logged distinctly. Verified against the real patches-api.socket.dev with a synthetic JSR layout: scan now exits 0 with scannedPackages=4 and the debug trace shows batch POST -> validation 400 -> 4 tolerated per-package GETs. Assisted-by: Claude Code:claude-fable-5 Uh oh!
There was an error while loading. Please reload this page.
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |