Skip to content

Harden the schemas - #104

Merged
jviotti merged 2 commits into
mainfrom
harden-pass-1
Jul 27, 2026
Merged

Harden the schemas#104
jviotti merged 2 commits into
mainfrom
harden-pass-1

Conversation

@jviotti

@jviotti jviotti commented Jul 27, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Jul 27, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR hardens and clarifies a broad set of JSON Schemas by tightening validation rules to better match their upstream specifications and the library’s intended constraints.

Changes:

  • Scaled Celsius-prefixed schemas’ minimum values to preserve the absolute-zero bound under SI prefixes
  • Adjusted POSIX path schemas to exclude exactly two leading slashes from absolute pathnames while still modeling them as valid paths with implementation-defined meaning
  • GeoJSON: constrained bbox to 2D/3D and explicitly allowed nested GeometryCollection items
  • HTTP/URI: tightened http/https URLs to reject empty-host authorities; simplified URL/relative-URI definitions using format assertions
  • URN: refined the grammar to better align with RFC 8141 (e.g., disallow 1-char NIDs) and updated tests accordingly
  • ISO 4217: expanded currency codes to include test/unknown entries and enriched historical metadata with x-withdrawal-dates
  • ISO 8601 durations: simplified patterns and updated tests to reflect quantity semantics in alternative calendar formats
  • JSON-RPC: broadened id to allow fractional numbers per “SHOULD NOT” guidance
  • W3C XSD-derived types: relaxed/updated anyURI, base64Binary, and date/year patterns plus corresponding test expectations

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

"x-links": [ "https://www.w3.org/TR/xmlschema-2/#string" ],
"type": "string"
"type": "string",
"pattern": "^[^\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uFFFE\\uFFFF]*$"

@augmentcode augmentcode Bot Jul 27, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pattern currently blocks most C0 controls and U+FFFE/U+FFFF, but it still permits surrogate code points (U+D800–U+DFFF); if the intent is the XML Char production, those should be excluded as well to avoid validating invalid XML character data.

Severity: medium

Other Locations
  • schemas/2020-12/w3c/xmlschema/2001/any-uri.json:25

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti
jviotti merged commit 7b9b6f8 into main Jul 27, 2026
3 checks passed
@jviotti
jviotti deleted the harden-pass-1 branch July 27, 2026 18:54
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.

1 participant