fix: Harden signing_key to only allowing properties related to public keys#387
Open
sujoyg wants to merge 4 commits intoUniversal-Commerce-Protocol:mainfrom
Open
fix: Harden signing_key to only allowing properties related to public keys#387sujoyg wants to merge 4 commits intoUniversal-Commerce-Protocol:mainfrom
sujoyg wants to merge 4 commits intoUniversal-Commerce-Protocol:mainfrom
Conversation
…are not defined in the schema.
Contributor
|
Also external here, but I pulled this down to try it out since I’ve been looking at discovery profiles too. This seems like a really useful guardrail (hoping this gets merged!) One thing I noticed: it looks like |
Author
|
Thank you @sakinaroufid. This would have been prevented in the future if there was a JSON schema validation as a pre-commit hook and/or a test suite. I will try and look into that. I started a discussion about testing in general here: #388 |
Author
|
Can someone help review this? @ptiper tagging you since you helped assigned reviewers for another PR of mine. |
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.
Description
The
signing_keyschema in discovery profiles defines public key fields (x, y, n, e) but does not set"additionalProperties": false, potentially allowing private key fields (e.g.d,p,q) to be published in discovery profiles without warning.This changes fixes that.
Category (Required)
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
N/A
Checklist
Screenshots / Logs (if applicable)
N/A