Skip to content

Commit a3067eb

Browse files
committed
Fix timestamp validity in OpenVEX document
Signed-off-by: tdruez <[email protected]>
1 parent 9b9925b commit a3067eb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

dje/outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def get_csaf_security_advisory(product):
357357

358358

359359
def get_openvex_timestamp():
360-
return datetime.now(UTC).strftime("%Y-%m-%dT%H:%M:%S.%f")
360+
return datetime.now(UTC).isoformat()
361361

362362

363363
def get_openvex_vulnerability(vulnerability):

dje/tests/testfiles/outputs/openvex_document.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"@context": "https://openvex.dev/ns/v0.2.0",
33
"@id": "OpenVEX-Document-b2561aa6-1092-44ef-afe2-b0b331514bab",
44
"author": "nexB",
5-
"timestamp": "2024-12-19T12:00:00.000000",
5+
"timestamp": "2024-12-19T12:00:00+00:00",
66
"version": 1,
77
"statements": [
88
{
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"status": "under_investigation",
18-
"timestamp": "2024-12-19T12:00:00.000000",
18+
"timestamp": "2024-12-19T12:00:00+00:00",
1919
"products": [
2020
{
2121
"@id": "pkg:type/[email protected]"
@@ -30,7 +30,7 @@
3030
"aliases": []
3131
},
3232
"status": "under_investigation",
33-
"timestamp": "2024-12-19T12:00:00.000000",
33+
"timestamp": "2024-12-19T12:00:00+00:00",
3434
"products": [
3535
{
3636
"@id": "pkg:type/[email protected]"
@@ -45,13 +45,13 @@
4545
"aliases": []
4646
},
4747
"status": "under_investigation",
48-
"timestamp": "2024-12-19T12:00:00.000000",
48+
"timestamp": "2024-12-19T12:00:00+00:00",
4949
"products": [
5050
{
5151
"@id": "pkg:type/[email protected]"
5252
}
5353
]
5454
}
5555
],
56-
"tooling": "DejaCode-v5.4.1-20-g0f470c0"
56+
"tooling": "DejaCode-v5.4.1-21-g9b9925b"
5757
}

0 commit comments

Comments
 (0)