Skip to content

Instantly share code, notes, and snippets.

@agrajag9
Last active April 24, 2026 06:03
Show Gist options
  • Select an option

  • Save agrajag9/03cbc9505614dae7dcafd48c3db55677 to your computer and use it in GitHub Desktop.

Select an option

Save agrajag9/03cbc9505614dae7dcafd48c3db55677 to your computer and use it in GitHub Desktop.
enumerate key-value pairs in dict, printing values with full key-paths
{
"dataType": "CVE_RECORD",
"containers": {
"adp": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://nvidia.custhelp.com/app/answers/detail/a_id/5449",
"tags": [
"x_transferred"
]
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-02T05:02:44.102Z"
}
},
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2023-0207",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "total"
}
],
"version": "2.0.3",
"timestamp": "2025-02-04T19:29:27.093628Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2025-02-04T19:29:23.538Z"
}
}
],
"cna": {
"source": {
"discovery": "UNKNOWN"
},
"impacts": [
{
"descriptions": [
{
"lang": "en",
"value": "Denial of service"
}
]
}
],
"metrics": [
{
"format": "CVSS",
"cvssV3_1": {
"scope": "CHANGED",
"version": "3.1",
"baseScore": 7.5,
"attackVector": "LOCAL",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "HIGH",
"availabilityImpact": "HIGH",
"privilegesRequired": "HIGH",
"confidentialityImpact": "HIGH"
},
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"affected": [
{
"vendor": "NVIDIA",
"product": "NVIDIA DGX servers",
"versions": [
{
"status": "affected",
"version": "All SBIOS versions prior to 0.33"
}
],
"defaultStatus": "unaffected"
}
],
"references": [
{
"url": "https://nvidia.custhelp.com/app/answers/detail/a_id/5449"
}
],
"x_generator": {
"engine": "Vulnogram 0.1.0-dev"
},
"descriptions": [
{
"lang": "en",
"value": "NVIDIA DGX-2 SBIOS contains a vulnerability where an attacker may modify the ServerSetup NVRAM variable at runtime by executing privileged code. A successful exploit of this vulnerability may lead to denial of service.",
"supportingMedia": [
{
"type": "text/html",
"value": "NVIDIA DGX-2 SBIOS contains a vulnerability where an attacker may modify the ServerSetup NVRAM variable at runtime by executing privileged code. A successful exploit of this vulnerability may lead to denial of service.",
"base64": true
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"lang": "en",
"type": "CWE",
"cweId": "CWE-732",
"description": "CWE-732 Incorrect Permission Assignment for Critical Resource"
}
]
}
],
"providerMetadata": {
"orgId": "9576f279-3576-44b5-a4af-b9a8644b2de6",
"shortName": "nvidia",
"dateUpdated": "2023-04-22T02:28:08.389Z"
}
}
},
"cveMetadata": {
"cveId": "CVE-2023-0207",
"state": "PUBLISHED",
"dateUpdated": "2025-02-04T19:29:29.893Z",
"dateReserved": "2023-01-11T05:48:56.380Z",
"assignerOrgId": "9576f279-3576-44b5-a4af-b9a8644b2de6",
"datePublished": "2023-04-22T02:28:08.389Z",
"assignerShortName": "nvidia"
},
"dataVersion": "5.1"
}
.dataType : CVE_RECORD
.containers.adp[0].title : CVE Program Container
.containers.adp[0].references[0].url : https://nvidia.custhelp.com/app/answers/detail/a_id/5449
.containers.adp[0].references[0].tags[0] : x_transferred
.containers.adp[0].providerMetadata.orgId : af854a3a-2127-422b-91ae-364da2661108
.containers.adp[0].providerMetadata.shortName : CVE
.containers.adp[0].providerMetadata.dateUpdated : 2024-08-02T05:02:44.102Z
.containers.adp[1].title : CISA ADP Vulnrichment
.containers.adp[1].metrics[0].other.type : ssvc
.containers.adp[1].metrics[0].other.content.id : CVE-2023-0207
.containers.adp[1].metrics[0].other.content.role : CISA Coordinator
.containers.adp[1].metrics[0].other.content.options[0].Exploitation : none
.containers.adp[1].metrics[0].other.content.options[1].Automatable : no
.containers.adp[1].metrics[0].other.content.options[2].Technical Impact : total
.containers.adp[1].metrics[0].other.content.version : 2.0.3
.containers.adp[1].metrics[0].other.content.timestamp : 2025-02-04T19:29:27.093628Z
.containers.adp[1].providerMetadata.orgId : 134c704f-9b21-4f2e-91b3-4a467353bcc0
.containers.adp[1].providerMetadata.shortName : CISA-ADP
.containers.adp[1].providerMetadata.dateUpdated : 2025-02-04T19:29:23.538Z
.containers.cna.source.discovery : UNKNOWN
.containers.cna.impacts[0].descriptions[0].lang : en
.containers.cna.impacts[0].descriptions[0].value : Denial of service
.containers.cna.metrics[0].format : CVSS
.containers.cna.metrics[0].cvssV3_1.scope : CHANGED
.containers.cna.metrics[0].cvssV3_1.version : 3.1
.containers.cna.metrics[0].cvssV3_1.attackVector : LOCAL
.containers.cna.metrics[0].cvssV3_1.baseSeverity : HIGH
.containers.cna.metrics[0].cvssV3_1.vectorString : CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
.containers.cna.metrics[0].cvssV3_1.integrityImpact : HIGH
.containers.cna.metrics[0].cvssV3_1.userInteraction : NONE
.containers.cna.metrics[0].cvssV3_1.attackComplexity : HIGH
.containers.cna.metrics[0].cvssV3_1.availabilityImpact : HIGH
.containers.cna.metrics[0].cvssV3_1.privilegesRequired : HIGH
.containers.cna.metrics[0].cvssV3_1.confidentialityImpact : HIGH
.containers.cna.metrics[0].scenarios[0].lang : en
.containers.cna.metrics[0].scenarios[0].value : GENERAL
.containers.cna.affected[0].vendor : NVIDIA
.containers.cna.affected[0].product : NVIDIA DGX servers
.containers.cna.affected[0].versions[0].status : affected
.containers.cna.affected[0].versions[0].version : All SBIOS versions prior to 0.33
.containers.cna.affected[0].defaultStatus : unaffected
.containers.cna.references[0].url : https://nvidia.custhelp.com/app/answers/detail/a_id/5449
.containers.cna.x_generator.engine : Vulnogram 0.1.0-dev
.containers.cna.descriptions[0].lang : en
.containers.cna.descriptions[0].value : NVIDIA DGX-2 SBIOS contains a vulnerability where an attacker may modify the ServerSetup NVRAM variable at runtime by executing privileged code. A successful exploit of this vulnerability may lead to denial of service.
.containers.cna.descriptions[0].supportingMedia[0].type : text/html
.containers.cna.descriptions[0].supportingMedia[0].value : NVIDIA DGX-2 SBIOS contains a vulnerability where an attacker may modify the ServerSetup NVRAM variable at runtime by executing privileged code. A successful exploit of this vulnerability may lead to denial of service.
.containers.cna.problemTypes[0].descriptions[0].lang : en
.containers.cna.problemTypes[0].descriptions[0].type : CWE
.containers.cna.problemTypes[0].descriptions[0].cweId : CWE-732
.containers.cna.problemTypes[0].descriptions[0].description : CWE-732 Incorrect Permission Assignment for Critical Resource
.containers.cna.providerMetadata.orgId : 9576f279-3576-44b5-a4af-b9a8644b2de6
.containers.cna.providerMetadata.shortName : nvidia
.containers.cna.providerMetadata.dateUpdated : 2023-04-22T02:28:08.389Z
.cveMetadata.cveId : CVE-2023-0207
.cveMetadata.state : PUBLISHED
.cveMetadata.dateUpdated : 2025-02-04T19:29:29.893Z
.cveMetadata.dateReserved : 2023-01-11T05:48:56.380Z
.cveMetadata.assignerOrgId : 9576f279-3576-44b5-a4af-b9a8644b2de6
.cveMetadata.datePublished : 2023-04-22T02:28:08.389Z
.cveMetadata.assignerShortName : nvidia
.dataVersion : 5.1
#!/usr/bin/env python3
import json
json_file = "CVE-2023-0207.json"
data = dict()
with open(json_file, "r") as file:
data = json.loads(file.read())
def print_kvs(data, path=""):
if (isinstance(data, str) or isinstance(data, bool)
or isinstance(data, int) or isinstance(data, float)
or isinstance(data, complex)):
print(f"{path} : {data}")
elif isinstance(data, list):
for i in range(len(data)):
print_kvs(data[i], path=f"{path}[{i}]")
elif isinstance(data, dict):
for key in data.keys():
print_kvs(data.get(key), path=f"{path}.{key}")
print_kvs(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment