oasis-open / cti-stix2-json-schemas

OASIS TC Open Repository: Non-normative schemas and examples for STIX 2
https://github.com/oasis-open/cti-stix2-json-schemas
BSD 3-Clause "New" or "Revised" License
113 stars 58 forks source link

timestamps are not validated according to RFC 3339 #62

Closed shpandya closed 6 years ago

shpandya commented 6 years ago

Per the STIX2 spec, timestamps are supposed to be RFC 3339 compliant. RFC 3339 requires at least 1, or more fractional digits after the decimal point, or no decimal point. This schema is restricting the number of fractional digits to just 3. RFC 3339 does not have this restriction.
The validator fails to validate timestamps that have nanosecond precision, which are correct as per RFC 3339.

clenk commented 6 years ago

The created and modified properties are timestamps, but they have the additional requirement of being "precise to the nearest millisecond (exactly three digits after the decimal place in seconds)."

These schemas attempt to follow the STIX 2 specification as closely as possible.

shpandya commented 6 years ago

OK I missed that additional requirement. Thanks.