Skip to content

jv: validation fails with YAML input with timestamps #202

@andrewpollock

Description

@andrewpollock
$ jv --version
github.com/santhosh-tekuri/jsonschema/cmd/jv v0.7.0
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1
github.com/spf13/pflag v1.0.5
golang.org/x/text v0.14.0
gopkg.in/yaml.v3 v3.0.1

Validating https://raw.githubusercontent.com/pypa/advisory-database/70de06387b0406a6b9a44f62870ba3cec9642993/vulns/aiocpa/PYSEC-2024-152.yaml seems to be failing unexpectedly:

 ~/go/bin/jv https://raw.githubusercontent.com/ossf/osv-schema/main/validation/schema.json aiocpa/PYSEC-2024-152.yaml 
schema https://raw.githubusercontent.com/ossf/osv-schema/main/validation/schema.json: ok

instance aiocpa/PYSEC-2024-152.yaml: failed
jsonschema validation failed with 'https://raw.githubusercontent.com/ossf/osv-schema/main/validation/schema.json#'
- at '/modified': invalid jsonType time.Time

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions