Skip to content

fix(schema): accept SchemaVersion majors of 0 and 10+ - #240

Open
cvas22 wants to merge 1 commit into
ossf:mainfrom
cvas22:fix/239-schemaversion-pattern
Open

cvas22 wants to merge 1 commit into
ossf:mainfrom
cvas22:fix/239-schemaversion-pattern

Conversation

@cvas22

@cvas22 cvas22 commented Nov 30, 2026

Copy link
Copy Markdown

Fixes #239

The major part of #SchemaVersion was [1-9]+, so 10.0.1 and 0.1.0 failed while 2.10.0 passed. I switched it to (0|[1-9][0-9]*), which takes any major without a leading zero. I updated spec/schema.md, docs/schema.md and the editor fallback to match.

Notes

All examples and .github/security-insights.yml still validate, and I checked with cue vet that 10.0.1 and 0.1.0 now pass while 01.0.0 and 1.2 still fail. I kept 0.x valid since nothing in the spec rules it out, but it's easy to drop the 0| if you'd rather not allow it. This touches the same pattern text #235 unquotes in openapi.yaml, so whichever lands second just needs a regen.

The major part was [1-9]+, so 0.1.0 and 10.0.1 failed validation.
Use (0|[1-9][0-9]*) like the minor and patch parts allow any number,
without a leading zero in the major.

Fixes ossf#239

Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
@cvas22
cvas22 requested a review from a team as a code owner November 30, 2026 22:43

This branch has not been deployed

No deployments
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.

SchemaVersion pattern rejects majors of 10+ and 0.x versions

1 participant