Skip to content

better self-reference handling and status change improvements - #4

Merged
wagner-intevation merged 4 commits into
mainfrom
fix/handle-missing-tracking-id
Oct 1, 2026
Merged

wagner-intevation merged 4 commits into
mainfrom
fix/handle-missing-tracking-id

Conversation

@wagner-intevation

Copy link
Copy Markdown
Member

Drop the unneeded --basepath, making the self-reference logic fully automatic
Always generate meaningful Tracking IDs (no UUID4)
Replace the obsolete function datetime.datetime.utcnow
Handle status change depending on version
Clarify this is CSAF 2.0 spec

--basepath is not needed for valid documents
We can always derive it from the original self-reference

if the input document was not valid, the output can't be valid anyway
tracking id: don't fallback to uuid4, always use the generated name based on current date/time

replace obsolete datetime.datetime.utcnow
The CSAF specification requires the status `draft` for version specifications with with major version `0` and pre-release versions (CSAF 2.0 specification sections 3.1.11.1 and 3.1.11.2).
With the automatic increament of the major version, a document may loose the requirement for the `draft` state.
Then the status is set to `final`.
@wagner-intevation wagner-intevation changed the title Fix/handle missing tracking better self-reference handling and status change improvements Oct 1, 2026

@JanHoefelmeyer JanHoefelmeyer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@wagner-intevation
wagner-intevation merged commit 37a02ef into main Oct 1, 2026
4 checks passed
@JanHoefelmeyer
JanHoefelmeyer deleted the fix/handle-missing-tracking-id branch October 1, 2026 15:59
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

Successfully merging this pull request may close these issues.

2 participants