Skip to content
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

CVE v5 Schema $id returns a 404 #220

Closed
joshbuker opened this issue Mar 10, 2023 · 5 comments
Closed

CVE v5 Schema $id returns a 404 #220

joshbuker opened this issue Mar 10, 2023 · 5 comments

Comments

@joshbuker
Copy link

Per the v5 schema: https://raw.githubusercontent.com/CVEProject/cve-schema/master/schema/v5.0/CVE_JSON_5.0_schema.json

The canonical URL for the schema is: https://cve.org/cve/record/v5_00/

"$id": "https://cve.org/cve/record/v5_00/",

That page currently returns a 404 instead of the schema json:
image

@chandanbn
Copy link
Collaborator

We discussed this and should fix by pointing to
https://raw.githubusercontent.com/CVEProject/cve-schema/master/schema/v5.0/CVE_JSON_5.0_schema.json

@chandanbn chandanbn added this to the 5.0.1 milestone Mar 16, 2023
@joshbuker
Copy link
Author

@chandanbn so, there is one gotcha that would make providing a specific endpoint as opposed to relying on githubusercontent preferable: JSON schema expects application/schema+json, but githubusercontent serves text/plain causing validators to break.

See also:

Would it be possible to get specific endpoints that provide v4 and v5 schemas with the appropriate content type?

Alternatively, we could reach out to the JSON schema validator maintainers, and see if it's possible to get validators to accept text/plain for schema $ref's (perhaps as an optional flag).

@mprpic
Copy link
Contributor

mprpic commented Jun 22, 2023

Alternatively, it could be published under https://cveproject.github.io/cve-schema/ where the content type should be set based on the file extension: https://github.com/jshttp/mime-db/blob/a76e5a824c228e2e58363c9404e42a54ee1d142f/src/apache-types.json#L195

chandanbn added a commit that referenced this issue Aug 3, 2023
Fix #220 CVE v5 Schema $id returns a 404
@chandanbn
Copy link
Collaborator

Fixed to point to https://cveproject.github.io/cve-schema/schema/v5.0/docs/CVE_JSON_5.0_bundled.json
I see it has the right content type, and the bundles schema should not cause problems with refs.

@joshbuker
Copy link
Author

@chandanbn Heads up that the $id for https://cveproject.github.io/cve-schema/schema/v5.0/docs/CVE_JSON_5.0_bundled.json does not point to itself (still points to the 404ing https://cve.org/cve/record/v5_00/)

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

No branches or pull requests

4 participants