Skip to content

New Security Considerations #1618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jdesrosiers
Copy link
Member

Resolves #1231
Replaces #1600

This is a full rewrite of the Security Considerations sections of the Core spec. It retains most of the original content plus a lot more. The only thing I left out from the original is the part about $comment, which I don't think makes sense. If there's an argument for keeping it, I can add it back in.

This new Security Consideration section is inspired by the guidelines and examples in RFC 3552 - Guidelines for Writing RFC Text on Security Considerations. Some principles I'm trying to follow are,

  • This section should not make SHOULD/MUST requirements. Instead, it should state the implications of the requirements made elsewhere in the document.
  • This section may discuss threats that are mitigated by spec requirements, but also makes recommendations for mitigating threats that aren't specifically addressed by the spec.
  • The audience of the spec is implementers. Schema authors should only be referred to in terms of how implementations should handle their schemas.

Something worth mentioning is that this PR advises not to use file: URIs in $id. However, we use file URIs in a couple tests in the official test suite. We should consider changing, removing, or moving those tests to optional.

Comment on lines 2079 to 2080
recursive schemas create loops, but implementations are advised to detect and
break these cycles when they are encountered.
Copy link
Member

Choose a reason for hiding this comment

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

Earlier in the spec, implementations are required to halt when encountering infinite cycles.

How would one break such a cycle?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't intend to imply that one could somehow continue evaluating the schema. I'll reword to make it more clear that it should stop evaluation when it detects a cycle.

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.

Security considerations should mention treating URIs as URLs (from $ref and $schema)
2 participants