DashboardclivalidatePinnedGitHubRelease canonical S…

validatePinnedGitHubRelease canonical SemVer

Category: gotcha
Confidence: 1.00
ID: 01a08b34-ccdd-7170-bf69-a17ced4f06e3
Project ID: c760f4f9-42b0-4ce0-b36d-6b8c38d770b2
Cross-project: No
Recalled in other projects: 0
Source session: 1QLo0UWM3EmN2YDvF
Created: 2026-09-10 09:45:33
Updated: 2026-09-10 12:04:48

Content

Trap: semver.valid(version) !== null looks like strict validation, but SemVer normalizes v1.2.3, allowing noncanonical Toolkit tags such as cli@v1.2.3 and direct pinned probes before rejection. Fix: require semver.valid(version) === version before network access; Toolkit accepts canonical cli@VERSION, while legacy normalization remains confined to its adapter. Stable metadata must also reject drafts and GitHub/SemVer prereleases.

Move to: