Repository navigation
fix(security): scope model-catalog credentials to the provider origin - #26
Merged
Merged
Conversation
added 2 commits
October 21, 2026 18:45
Discovery attached the provider credential to every configured modelsUrl, including catalogs hosted on a different origin, while the interactive path already applied the same-origin or explicit-modelsAuth rule. Extract that rule into src/models-auth.mjs and use it from both paths. Add unit coverage for every modelsAuth mode and discovery coverage proving that a cross-origin catalog receives no credential.
Security patch release for the discovery credential scope. Align CITATION and the AGENTS protection note with the current single-maintainer branch protection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Live model discovery sent the provider credential to any configured
modelsUrl, even when the catalog lived on a different origin from the provider API. The interactive path already applied the same-origin / explicit-modelsAuthrule; discovery did not. This is finding CPB-1 from the portfolio code review.Change
src/models-auth.mjsand use it from bothdiscovery.mjsandcli.mjs, so the two paths cannot drift.test/models-auth.test.mjscovering everymodelsAuthmode and discovery coverage proving a cross-origin catalog receives no credential.Verification
npm ci,npm run check(lint + 195 tests, 2 skipped),npm pack --dry-run,npm audit --omit=dev --audit-level=high(0 vulnerabilities).modelsAuthexplicitly.