Skip to content

fix(2.0): streamline RFC 3339 - #1231

Open
cvas22 wants to merge 4 commits into
CycloneDX:2.0-devfrom
cvas22:fix/1223-rfc3339
Open

cvas22 wants to merge 4 commits into
CycloneDX:2.0-devfrom
cvas22:fix/1223-rfc3339

Conversation

@cvas22

@cvas22 cvas22 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

This adds an RFC_3339 group to common, shaped like the ISO_3166 one in #1220, with a date-time and a full-date def. All 60 inline "type": "string", "format": "date-time" and "format": "date" properties across the modules now $ref one of them and keep their own title and description. The existing timestamp def builds on date-time too and keeps its Zulu-only pattern.

Validation should be the same as before. The defs only use format, no new pattern, so nothing gets stricter or looser. I kept the JSS module as is since its timestamp follows X.590 and is stricter on purpose.

Notes

The common timestamp def (Zulu only) isn't referenced anywhere right now, all the usages allow offsets. I left that alone, happy to switch usages over if that's the intent. Same if you'd rather have a light pattern on the RFC 3339 defs instead of relying on format.

I checked locally that every 2.0 test resource validates the same before and after. Bundles aren't regenerated here, same as #1206.

@cvas22
cvas22 requested a review from a team as a code owner November 19, 2026 18:04
@jkowalleck jkowalleck added this to the 2.0 milestone Nov 20, 2026
@jkowalleck jkowalleck added defect CDX 2.0 related to release v2.0 and removed defect labels Nov 20, 2026
@jkowalleck jkowalleck linked an issue Nov 20, 2026 that may be closed by this pull request

@jkowalleck jkowalleck left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TO BE DISCUSSED:

What I would like to see is a clarification in the descriptions regarding timezones when issuing - something like "A timezone or Zulu should be provided".

  • for date-time and time a "time-offset" exists.
  • for date there is no such thing - we should clarify that the issued date should be Zulu time.

why "should", not "must"/"shall": sometimes it is just not possible to determine a timezone, and we dont want to force users to make one up.

why "should be provided" - we only want to target the issuers of data, not ingesting systems.

see https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-00#rfc.section.7.3.1

@jkowalleck

Copy link
Copy Markdown
Member

@stevespringett WDYT? #1231 (review)

@jkowalleck

Copy link
Copy Markdown
Member

the JSS descriptions got a revisit lately - per #1255
could you see if they can be streamlined, too?

Add RFC_3339 date-time and full-date defs to common and point all
inline date-time/date properties at them. The common timestamp def now
builds on the date-time def and keeps its Zulu pattern.

Fixes CycloneDX#1223

Signed-off-by: Srinivas Chippagiri <[email protected]>
@cvas22

cvas22 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased and did the JSS timestamps too in 74e155f, same wording as the common one plus format date-time. The X.590 patterns stay as they are. On the timezone note, I can add the "should be provided" sentence to date-time/time and the Zulu one to date once Steve weighs in.

@jkowalleck

Copy link
Copy Markdown
Member

i see you've removed the links in eb32c93

Please bring them links back. They were good and valuable like they were.
I fear we could forget updating the links in #1237 for the reason that they did not exist in the first place. (updated goals of #1237 just in case.)

@jkowalleck

jkowalleck commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Rebased and did the JSS timestamps too in 74e155f, same wording as the common one plus format date-time. The X.590 patterns stay as they are. On the timezone note, I can add the "should be provided" sentence to date-time/time and the Zulu one to date once Steve weighs in.

On the timezone note, I can add the "should be provided" sentence to date-time/time and the Zulu one to date once Steve weighs in.

The thing is: we dont require Zulu time, but we would prefer it. We want users to provide time zones where possible - a "should be provided, Zulu time preferred" is good here.
The JSON schema's date and date-time are implementation-details of JSON schema. So we need to be very vague here in the actual textual description - so that other implementations to come (like ProtoBuf or XML - if they ever come back - or whatever the future brings) could just use the respective implementations they provide.

CC @stevespringett

@cvas22

cvas22 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

Brought the links back and added the time zone wording in 4460f19. date-time says a time zone should be provided, Zulu preferred. date just says Zulu should be preferred when issuing. I kept both vague like you said and left the timestamp description alone since it already requires Z.

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

CDX 2.0 related to release v2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.0] streamline RFC 3339

2 participants