Skip to content

Several JSON examples in the spec and ATTESTING.md are invalid JSON or fail the schema #78

Open

Description

@cvas22

I ran every json block in OPENVEX-SPEC.md and ATTESTING.md through a JSON parser and then through openvex_json_schema.json, and 10 of them don't make it.

In OPENVEX-SPEC.md the justification/impact_statement snippet, the vulnerability struct example, the second "Updating Statements with Inherited Data" document and the Spring Boot example all have trailing or missing commas, so they don't parse. In ATTESTING.md both attestation examples have trailing commas in subject, the embedded predicate has "version": "1" while the schema wants an integer (same thing #56 fixed in the README), and the granularity example still uses the old string form for vulnerability and products. The three subject snippets after it use { "pkg:..." }, which isn't JSON and isn't the in-toto shape either, since subject is a list of {name, digest} objects.

There's also a small contradiction in the status labels table: it says not_affected requires a justification, but the statement fields table and the schema both accept a justification or an impact_statement.

People copy these examples into tooling and tests, so it'd be nice if they all validated. I've got a PR ready that fixes them and only touches what's needed to make them valid.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions